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@96524 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2015-02-09 10:17:39 +00:00
parent 4a587ca4d1
commit 3e63485907
2 changed files with 13 additions and 18 deletions

View File

@@ -731,6 +731,7 @@
<bean id="reject" class="org.alfresco.module.org_alfresco_module_rm.action.impl.RejectAction" parent="rmAction"> <bean id="reject" class="org.alfresco.module.org_alfresco_module_rm.action.impl.RejectAction" parent="rmAction">
<property name="publicAction" value="true"/> <property name="publicAction" value="true"/>
<property name="auditedImmediately" value="true" />
</bean> </bean>
<!-- File To --> <!-- File To -->
@@ -844,9 +845,9 @@
<property name="publicAction" value="true"/> <property name="publicAction" value="true"/>
<property name="allowParameterSubstitutions" value="true"/> <property name="allowParameterSubstitutions" value="true"/>
</bean> </bean>
<!-- Unlink Record --> <!-- Unlink Record -->
<bean id="unlinkFrom_proxy" parent="rmProxyAction"> <bean id="unlinkFrom_proxy" parent="rmProxyAction">
<property name="target" ref="unlinkFrom"/> <property name="target" ref="unlinkFrom"/>
<property name="interceptorNames"> <property name="interceptorNames">

View File

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