mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-531: Impossible to declare email record
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.0@42909 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
package org.alfresco.module.org_alfresco_module_rm.forms;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -263,20 +264,31 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
||||
List<FieldDefinition> fieldDefs = form.getFieldDefinitions();
|
||||
for (FieldDefinition fieldDef : fieldDefs)
|
||||
{
|
||||
if (fieldDef.getName().equals("cm:title") ||
|
||||
fieldDef.getName().equals("cm:author") ||
|
||||
fieldDef.getName().equals("rma:originator") ||
|
||||
fieldDef.getName().equals("rma:publicationDate") ||
|
||||
fieldDef.getName().equals("rma:dateReceived") ||
|
||||
fieldDef.getName().equals("rma:address") ||
|
||||
fieldDef.getName().equals("rma:otherAddress"))
|
||||
String prefixName = fieldDef.getName();
|
||||
|
||||
// check the value of the property, if empty then do not mark property
|
||||
// as read only
|
||||
QName qname = QName.createQName(prefixName, namespaceService);
|
||||
Serializable value = nodeService.getProperty(nodeRef, qname);
|
||||
if (value != null)
|
||||
{
|
||||
fieldDef.setProtectedField(true);
|
||||
if (prefixName.equals("cm:title") ||
|
||||
prefixName.equals("cm:author") ||
|
||||
prefixName.equals("rma:originator") ||
|
||||
prefixName.equals("rma:publicationDate") ||
|
||||
prefixName.equals("rma:dateReceived") ||
|
||||
prefixName.equals("rma:address") ||
|
||||
prefixName.equals("rma:otherAddress"))
|
||||
{
|
||||
fieldDef.setProtectedField(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
if (logger.isDebugEnabled() == true)
|
||||
{
|
||||
logger.debug("Set email related fields to be protected");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user