mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-7026 Updated hold name display property
This commit is contained in:
@@ -28,6 +28,7 @@
|
|||||||
package org.alfresco.module.org_alfresco_module_rm.audit.event;
|
package org.alfresco.module.org_alfresco_module_rm.audit.event;
|
||||||
|
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
|
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
import org.alfresco.service.cmr.repository.NodeService;
|
import org.alfresco.service.cmr.repository.NodeService;
|
||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
@@ -44,6 +45,8 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
class HoldUtils
|
class HoldUtils
|
||||||
{
|
{
|
||||||
|
/** A QName to display for the hold name. */
|
||||||
|
public static final QName HOLD_NAME = QName.createQName(RecordsManagementModel.RM_URI, "Hold Name");
|
||||||
/**
|
/**
|
||||||
* Create a properties map containing the hold name for the given hold.
|
* Create a properties map containing the hold name for the given hold.
|
||||||
*
|
*
|
||||||
@@ -55,7 +58,7 @@ class HoldUtils
|
|||||||
{
|
{
|
||||||
Map<QName, Serializable> auditProperties = new HashMap<>();
|
Map<QName, Serializable> auditProperties = new HashMap<>();
|
||||||
|
|
||||||
auditProperties.put(ContentModel.PROP_NAME, nodeService.getProperty(nodeRef, ContentModel.PROP_NAME));
|
auditProperties.put(HOLD_NAME, nodeService.getProperty(nodeRef, ContentModel.PROP_NAME));
|
||||||
|
|
||||||
return auditProperties;
|
return auditProperties;
|
||||||
}
|
}
|
||||||
|
@@ -40,6 +40,7 @@ import org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditQu
|
|||||||
import org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditService;
|
import org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditService;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.audit.event.AuditEvent;
|
import org.alfresco.module.org_alfresco_module_rm.audit.event.AuditEvent;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.capability.RMPermissionModel;
|
import org.alfresco.module.org_alfresco_module_rm.capability.RMPermissionModel;
|
||||||
|
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase;
|
import org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase;
|
||||||
import org.alfresco.repo.security.authentication.AuthenticationException;
|
import org.alfresco.repo.security.authentication.AuthenticationException;
|
||||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||||
@@ -60,6 +61,9 @@ import org.alfresco.util.Pair;
|
|||||||
public class RecordsManagementAuditServiceImplTest extends BaseRMTestCase
|
public class RecordsManagementAuditServiceImplTest extends BaseRMTestCase
|
||||||
implements RMPermissionModel
|
implements RMPermissionModel
|
||||||
{
|
{
|
||||||
|
/** A QName to display for the hold name. */
|
||||||
|
public static final QName HOLD_NAME = QName.createQName(RecordsManagementModel.RM_URI, "Hold Name");
|
||||||
|
|
||||||
/** Test record */
|
/** Test record */
|
||||||
private NodeRef record;
|
private NodeRef record;
|
||||||
|
|
||||||
@@ -606,7 +610,7 @@ public class RecordsManagementAuditServiceImplTest extends BaseRMTestCase
|
|||||||
{
|
{
|
||||||
// check create hold audit event includes the hold name
|
// check create hold audit event includes the hold name
|
||||||
assertEquals("Create Hold event does not include hold name.", holdName,
|
assertEquals("Create Hold event does not include hold name.", holdName,
|
||||||
auditEventProperties.get(PROP_NAME));
|
auditEventProperties.get(HOLD_NAME));
|
||||||
|
|
||||||
// check create hold audit event includes the hold reason
|
// check create hold audit event includes the hold reason
|
||||||
assertEquals("Create Hold event does not include hold reason.", holdReason,
|
assertEquals("Create Hold event does not include hold reason.", holdReason,
|
||||||
|
Reference in New Issue
Block a user