如何在Alfresco中通过CMIS ChangeLog检测重命名? CMIS变更日志
我正在使用标准的功能来跟踪服务器上发生的变化 例如,当我创建如何在Alfresco中通过CMIS ChangeLog检测重命名? CMIS变更日志,alfresco,cmis,changelog,Alfresco,Cmis,Changelog,我正在使用标准的功能来跟踪服务器上发生的变化 例如,当我创建newfile.txt时,ChangeLog标记(的值)从1713变为1735 问题 当我将newfile.txt重命名为myfile.txt时,ChangeLog标记不会更改 问题: 有没有一种方法可以使Alfresco在重命名时碰撞ChangeLog令牌 这是我当前的tomcat/shared/classes/alfresco-global.properties: audit.enabled=true audit.alfresco-
newfile.txt
时,ChangeLog标记(
的值)从1713变为1735
问题
当我将newfile.txt
重命名为myfile.txt
时,ChangeLog标记不会更改
问题:
有没有一种方法可以使Alfresco在重命名时碰撞ChangeLog令牌
这是我当前的tomcat/shared/classes/alfresco-global.properties
:
audit.enabled=true
audit.alfresco-access.enabled=true
audit.alfresco-access.sub-actions.enabled=true
audit.cmischangelog.enabled=true
audit.cmischangelog.sub-actions.enabled=true
要实现这一点,您必须修改Alfresco的审核配置文件,该文件负责生成CMIS变更日志事件。该文件是
alfresco audit cmis.xml
,可以在alfresco-repository-5.2.g.jar
中找到(版本号可能会有所不同),它本身位于alfresco.war
的WEB-INF/lib
文件夹中
您必须向该文件添加路径映射和审核路径,如下所述:
<PathMap source="/alfresco-api/post/FileFolderService/rename"
target="/CMISChangeLog/UPDATED" />
此“解决方案”非常不方便,可能不完整,因此如果您知道任何更好的方法,请发布新的答案,非常感谢!:-) 重命名甚至不是移动/归档。这是一次财产更新。
<AuditPath key="fileFolderRef">
<RecordValue key="value" dataExtractor="simpleValue" />
</AuditPath>
<?xml version="1.0" encoding="UTF-8"?>
<Audit xmlns="http://www.alfresco.org/repo/audit/model/3.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.alfresco.org/repo/audit/model/3.2 alfresco-audit-3.2.xsd">
<DataExtractors>
<DataExtractor name="simpleValue" registeredName="auditModel.extractor.simpleValue"/>
<DataExtractor name="nullValue" registeredName="auditModel.extractor.nullValue"/>
<DataExtractor name="changeLog" registeredName="CMISChangeLogDataExtractor"/>
</DataExtractors>
<PathMappings>
<PathMap source="/CMISChangeLog" target="/CMISChangeLog" />
<PathMap source="/alfresco-api/post/FileFolderService/create" target="/CMISChangeLog/CREATED" />
<PathMap source="/alfresco-api/post/NodeService/createNode" target="/CMISChangeLog/CREATED" />
<PathMap source="/alfresco-api/post/NodeService/setProperties" target="/CMISChangeLog/UPDATED" />
<PathMap source="/alfresco-api/post/NodeService/addProperties" target="/CMISChangeLog/UPDATED" />
<PathMap source="/alfresco-api/post/NodeService/setProperty" target="/CMISChangeLog/UPDATED" />
<PathMap source="/alfresco-api/post/NodeService/removeProperty" target="/CMISChangeLog/UPDATED" />
<PathMap source="/alfresco-node/beforeDeleteNode" target="/CMISChangeLog/DELETED" />
<PathMap source="/alfresco-api/post/PermissionService/setPermission" target="/CMISChangeLog/SECURITY" />
<PathMap source="/alfresco-api/post/PermissionService/setInheritParentPermissions" target="/CMISChangeLog/SECURITY" />
<PathMap source="/alfresco-api/post/PermissionService/clearPermission" target="/CMISChangeLog/SECURITY" />
<PathMap source="/alfresco-api/post/PermissionService/deletePermission" target="/CMISChangeLog/SECURITY" />
<PathMap source="/alfresco-api/post/NodeService/moveNode" target="/CMISChangeLog/UPDATED" />
<PathMap source="/alfresco-api/post/FileFolderService/moveFrom" target="/CMISChangeLog/UPDATED" />
<PathMap source="/alfresco-api/post/FileFolderService/rename" target="/CMISChangeLog/UPDATED" />
</PathMappings>
<Application name="CMISChangeLog" key="CMISChangeLog">
<AuditPath key="CREATED">
<AuditPath key="result">
<RecordValue key="value" dataExtractor="changeLog" />
</AuditPath>
<AuditPath key="error">
<RecordValue key="value" dataExtractor="nullValue" />
</AuditPath>
</AuditPath>
<AuditPath key="UPDATED">
<AuditPath key="args">
<AuditPath key="nodeRef">
<RecordValue key="value" dataExtractor="changeLog" />
</AuditPath>
<AuditPath key="nodeToMoveRef">
<RecordValue key="value" dataExtractor="changeLog" />
</AuditPath>
<AuditPath key="sourceNodeRef">
<RecordValue key="value" dataExtractor="changeLog" />
</AuditPath>
<AuditPath key="fileFolderRef">
<RecordValue key="value" dataExtractor="simpleValue" />
</AuditPath>
</AuditPath>
<AuditPath key="error">
<RecordValue key="value" dataExtractor="nullValue" />
</AuditPath>
</AuditPath>
<AuditPath key="DELETED">
<AuditPath key="node">
<RecordValue key="value" dataExtractor="changeLog" />
</AuditPath>
</AuditPath>
<AuditPath key="SECURITY">
<AuditPath key="args">
<AuditPath key="nodeRef">
<RecordValue key="value" dataExtractor="changeLog" />
</AuditPath>
</AuditPath>
<AuditPath key="error">
<RecordValue key="value" dataExtractor="nullValue" />
</AuditPath>
</AuditPath>
</Application>
</Audit>