mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
RM-1851 (Audit: the "Role" for "Declare as version record" is not displayed)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.3@95095 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -14,3 +14,4 @@ rm.audit.audit-clear=Audit Clear
|
|||||||
rm.audit.audit-view=Audit View
|
rm.audit.audit-view=Audit View
|
||||||
rm.audit.trail-file-fail=Can't generate audit report.
|
rm.audit.trail-file-fail=Can't generate audit report.
|
||||||
rm.audit.audit-report=Audit Report
|
rm.audit.audit-report=Audit Report
|
||||||
|
recordable-version-config=Auto-Declare Options
|
@@ -85,4 +85,9 @@
|
|||||||
<property name="label" value="rm.audit.fileTo"/>
|
<property name="label" value="rm.audit.fileTo"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
<bean id="audit-event.recordableVersionConfig" parent="audit-event" class="org.alfresco.module.org_alfresco_module_rm.audit.event.RecordableVersionPolicyAuditEvent">
|
||||||
|
<property name="name" value="recordableVersionConfig"/>
|
||||||
|
<property name="label" value="recordable-version-config"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
|
@@ -27,9 +27,9 @@ import static org.apache.commons.logging.LogFactory.getLog;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.alfresco.module.org_alfresco_module_rm.action.AuditableActionExecuterAbstractBase;
|
|
||||||
import org.alfresco.module.org_alfresco_module_rm.version.RecordableVersionPolicy;
|
import org.alfresco.module.org_alfresco_module_rm.version.RecordableVersionPolicy;
|
||||||
import org.alfresco.repo.action.ParameterDefinitionImpl;
|
import org.alfresco.repo.action.ParameterDefinitionImpl;
|
||||||
|
import org.alfresco.repo.action.executer.ActionExecuterAbstractBase;
|
||||||
import org.alfresco.service.cmr.action.Action;
|
import org.alfresco.service.cmr.action.Action;
|
||||||
import org.alfresco.service.cmr.action.ParameterDefinition;
|
import org.alfresco.service.cmr.action.ParameterDefinition;
|
||||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||||
@@ -46,7 +46,7 @@ import org.apache.commons.logging.Log;
|
|||||||
* @author Tuna Aksoy
|
* @author Tuna Aksoy
|
||||||
* @since 2.3
|
* @since 2.3
|
||||||
*/
|
*/
|
||||||
public class RecordableVersionConfigAction extends AuditableActionExecuterAbstractBase
|
public class RecordableVersionConfigAction extends ActionExecuterAbstractBase
|
||||||
{
|
{
|
||||||
/** Logger */
|
/** Logger */
|
||||||
private static Log LOGGER = getLog(RecordableVersionConfigAction.class);
|
private static Log LOGGER = getLog(RecordableVersionConfigAction.class);
|
||||||
|
@@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2005-2014 Alfresco Software Limited.
|
||||||
|
*
|
||||||
|
* This file is part of Alfresco
|
||||||
|
*
|
||||||
|
* Alfresco is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Alfresco is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.alfresco.module.org_alfresco_module_rm.audit.event;
|
||||||
|
|
||||||
|
import static org.alfresco.module.org_alfresco_module_rm.version.RecordableVersionModel.PROP_RECORDABLE_VERSION_POLICY;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy;
|
||||||
|
import org.alfresco.repo.policy.annotation.Behaviour;
|
||||||
|
import org.alfresco.repo.policy.annotation.BehaviourBean;
|
||||||
|
import org.alfresco.repo.policy.annotation.BehaviourKind;
|
||||||
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
|
import org.alfresco.service.namespace.QName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Audits recordable version policy property updates
|
||||||
|
*
|
||||||
|
* @author Tuna Aksoy
|
||||||
|
* @since 2.3
|
||||||
|
*/
|
||||||
|
@BehaviourBean
|
||||||
|
public class RecordableVersionPolicyAuditEvent extends AuditEvent implements OnUpdatePropertiesPolicy
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @see org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy#onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef, java.util.Map, java.util.Map)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Behaviour
|
||||||
|
(
|
||||||
|
kind = BehaviourKind.CLASS,
|
||||||
|
type = "cm:cmobject"
|
||||||
|
)
|
||||||
|
public void onUpdateProperties(NodeRef nodeRef, Map<QName, Serializable> before, Map<QName, Serializable> after)
|
||||||
|
{
|
||||||
|
if (before.get(PROP_RECORDABLE_VERSION_POLICY) != after.get(PROP_RECORDABLE_VERSION_POLICY))
|
||||||
|
{
|
||||||
|
recordsManagementAuditService.auditEvent(nodeRef, getName(), before, after, true, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user