RM-1867 (Reject rule works incorrect if set up in File Plan)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.3@95746 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2015-02-02 18:17:26 +00:00
parent 1b54651c6e
commit 68625d9051

View File

@@ -77,19 +77,25 @@ public final class FilePlanNamePathDataExtractor extends AbstractDataExtractor
*/
public Serializable extractData(Serializable value)
{
String extractedData = null;
NodeRef nodeRef = (NodeRef) value;
// Get path from the RM root
List<NodeRef> nodeRefPath = filePlanService.getNodeRefPath(nodeRef);
StringBuilder sb = new StringBuilder(128);
for (NodeRef pathNodeRef : nodeRefPath)
if (nodeService.hasAspect(nodeRef, RecordsManagementModel.ASPECT_FILE_PLAN_COMPONENT))
{
String name = (String)nodeService.getProperty(pathNodeRef, ContentModel.PROP_NAME);
sb.append("/").append(name);
// Get path from the RM root
List<NodeRef> nodeRefPath = filePlanService.getNodeRefPath(nodeRef);
StringBuilder sb = new StringBuilder(128);
for (NodeRef pathNodeRef : nodeRefPath)
{
String name = (String)nodeService.getProperty(pathNodeRef, ContentModel.PROP_NAME);
sb.append("/").append(name);
}
// Done
extractedData = sb.toString();
}
// Done
return sb.toString();
return extractedData;
}
}