示例#1
0
        public async Task <NodeEntry> GetDocument([FromRoute] string nodeId, [FromQuery] BasicNodeQueryParamsWithRelativePath queryParams)
        {
            var nodeInfo = await _alfrescoHttpClient.GetNodeInfo(nodeId, ImmutableList <Parameter> .Empty.AddQueryParams(queryParams));

            try
            {
                var componentPid = nodeInfo?.GetPid();

                await _auditLogService.Record(nodeInfo?.Entry?.Id, SpisumNames.NodeTypes.Document, componentPid, NodeTypeCodes.Dokument, EventCodes.Zobrazeni,
                                              TransactinoHistoryMessages.Document);

                var fileId = await _documentService.GetDocumentFileId(nodeInfo?.Entry?.Id);

                if (fileId != null)
                {
                    await _auditLogService.Record(fileId, SpisumNames.NodeTypes.Document, componentPid, NodeTypeCodes.Dokument, EventCodes.Zobrazeni,
                                                  TransactinoHistoryMessages.Document);
                }
            }
            catch (Exception ex)
            {
                Log.Logger?.Error(ex, "Audit log failed");
            }

            return(nodeInfo);
        }
示例#2
0
 public async Task <NodeChildAssociationPaging> GetChildren([FromRoute] string nodeId, [FromQuery] BasicNodeQueryParamsWithRelativePath queryParams)
 {
     return(await _alfrescoHttpClient.GetNodeChildren(nodeId, ImmutableList <Parameter> .Empty.AddQueryParams(queryParams)));
 }