RM-694: A records manager has the following list of available rule conditions:

* New action conditions added:

Is classified
Is cutoff
Is frozen
Is record folder closed
Is vital
Has Disposition Action
Is kind
Is Record Type

* Action conditions dropdown list on the edit rule page reorganised


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@51812 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Craig Tan
2013-06-28 01:39:17 +00:00
parent 5d2d370696
commit 752c26c743
15 changed files with 760 additions and 20 deletions

View File

@@ -25,8 +25,12 @@ import java.util.Set;
import org.alfresco.module.org_alfresco_module_rm.FilePlanComponentKind;
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementService;
import org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementActionDefinition;
import org.alfresco.repo.action.evaluator.ActionConditionEvaluator;
import org.alfresco.service.cmr.action.ActionConditionDefinition;
import org.alfresco.service.cmr.action.ActionDefinition;
import org.alfresco.service.cmr.repository.NodeRef;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
/**
* Extended action service implementation.
@@ -34,11 +38,19 @@ import org.alfresco.service.cmr.repository.NodeRef;
* @author Roy Wetherall
* @since 2.1
*/
public class ExtendedActionServiceImpl extends ActionServiceImpl
public class ExtendedActionServiceImpl extends ActionServiceImpl implements ApplicationContextAware
{
/** Records management service */
private RecordsManagementService recordsManagementService;
private ApplicationContext extendedApplicationContext;
public void setApplicationContext(ApplicationContext applicationContext)
{
super.setApplicationContext(applicationContext);
extendedApplicationContext = applicationContext;
}
/**
* @param recordsManagementService records management service
*/
@@ -47,6 +59,19 @@ public class ExtendedActionServiceImpl extends ActionServiceImpl
this.recordsManagementService = recordsManagementService;
}
public ActionConditionDefinition getActionConditionDefinition(String name)
{
// get direct access to action condition definition (i.e. ignoring public flag of executer)
ActionConditionDefinition definition = null;
Object bean = extendedApplicationContext.getBean(name);
if (bean != null && bean instanceof ActionConditionEvaluator)
{
ActionConditionEvaluator evaluator = (ActionConditionEvaluator) bean;
definition = evaluator.getActionConditionDefintion();
}
return definition;
}
/**
* @see org.alfresco.repo.action.ActionServiceImpl#getActionDefinitions(org.alfresco.service.cmr.repository.NodeRef)
*/