如何修改Alfresco的现成审核配置 [英] How to modify Alfresco's out-of-the-box audit configuration

查看:101
本文介绍了如何修改Alfresco的现成审核配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试修改Alfresco 5中现成捆绑的 CMISChangeLog审核应用程序的PathMappings。

I am trying to modify the PathMappings of the "CMISChangeLog" audit application bundled out-of-the-box in Alfresco 5.

我在以下位置找到了这些PathMappings: alfresco-audit-cmis.xml (可以在Alfresco的源代码中找到),因此我修改了此XML文件并将其放入 tomcat / shared / classes /alfresco/extension/audit/alfresco-audit-cmis.xml (这种想法会覆盖现成的应用程序),然后重新启动Alfresco。问题:

I have found these PathMappings in alfresco-audit-cmis.xml which can be found in Alfresco's source code, so I modified this XML file and put it into tomcat/shared/classes/alfresco/extension/audit/alfresco-audit-cmis.xml (thinking that would override the out-of-the-box application) before restarting Alfresco. Problem:

ERROR [audit.model.AuditModelRegistryImpl] Failed to load audit model: file:/home/nico/alfresco/tomcat/shared/classes/alfresco/extension/audit/alfresco-audit-cmis.xml
org.alfresco.repo.audit.model.AuditModelException: 00120000 Audit application key 'CMISChangeLog' is used by: AuditApplication[ name=CMISChangeLog, id=3, disabledPathsId=381]
  at org.alfresco.repo.audit.model.AuditModelRegistryImpl$AuditModelRegistryState.cacheAuditElements(AuditModelRegistryImpl.java:646)

如何覆盖此开箱即用的审计应用程序?

How to override this out-of-the-box audit application?

通过我的服务器进行抓捕确认默认审核应用程序的XML文件存储在 alf_data / contentstore / 2017/12/22/18/23 / 82dfdccd-6ab9-4091-8b7c-d37d4bcf1627.bin 我在节点浏览器中找不到它:

Grepping through my server I found out that the default audit application's XML file is stored at alf_data/contentstore/2017/12/22/18/23/82dfdccd-6ab9-4091-8b7c-d37d4bcf1627.bin but I haven't found it in the Node Browser:

注意:我不想创建 new 审核应用程序。我必须修改现有的(,因为我希望Alfresco的CMIS ChangeLog能够考虑到更多事件)。

Note: I don't want to create a new audit application. I must modify the existing one (because I want Alfresco's CMIS ChangeLog to take into account more events).

推荐答案

该XML文件实际上位于 alfresco-repository-5.2.g.jar 中,该文件本身可以在Alfresco的WAR文件中找到。

The XML file is actually in alfresco-repository-5.2.g.jar, which itself can be found in Alfresco's WAR file.

因此,如果您已经在运行Alfresco服务器,请执行以下步骤:

So, if you have an already running Alfresco server, here is the procedure:


  1. 停止Alfresco

  2. mkdir -p / tmp / unjar

  3. cd / tmp / unjar

  4. 解压缩$ ALFRESCO / tomcat / webapps / alfresco / WEB-INF / lib / alfresco-repository-5.2.g.jar (如有必要,可使用其他版本号)

  5. 在提取的文件内进行所需的修改 alfresco / audit / alfresco-audit-cmis .xml

  6. zip -r ../alfresco-repository-5.2.g-custom.jar *

  7. cp ../alfresco-repository-5.2.g-custom.jar ALFRESCO / tomcat / webapps / alfresco / WEB-INF / lib /

  8. 重新启动露天演出

  1. Stop Alfresco
  2. mkdir -p /tmp/unjar
  3. cd /tmp/unjar
  4. unzip $ALFRESCO/tomcat/webapps/alfresco/WEB-INF/lib/alfresco-repository-5.2.g.jar (adapt for another version number if necessary)
  5. Do the modifications you want inside the extracted file alfresco/audit/alfresco-audit-cmis.xml
  6. zip -r ../alfresco-repository-5.2.g-custom.jar *
  7. cp ../alfresco-repository-5.2.g-custom.jar ALFRESCO/tomcat/webapps/alfresco/WEB-INF/lib/
  8. Restart Alfresco

这篇关于如何修改Alfresco的现成审核配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆