mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Fixed major issues ("Illegal Throws") reported in Sonar
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@71958 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -32,26 +32,26 @@ import org.springframework.beans.factory.BeanNameAware;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Records management action condition evaluator abstract base implementation.
|
* Records management action condition evaluator abstract base implementation.
|
||||||
*
|
*
|
||||||
* @author Roy Wetherall
|
* @author Roy Wetherall
|
||||||
* @since 2.1
|
* @since 2.1
|
||||||
*/
|
*/
|
||||||
public abstract class RecordsManagementActionConditionEvaluatorAbstractBase extends ActionConditionEvaluatorAbstractBase
|
public abstract class RecordsManagementActionConditionEvaluatorAbstractBase extends ActionConditionEvaluatorAbstractBase
|
||||||
implements RecordsManagementActionCondition,
|
implements RecordsManagementActionCondition,
|
||||||
BeanNameAware
|
BeanNameAware
|
||||||
{
|
{
|
||||||
/** records management action service */
|
/** records management action service */
|
||||||
protected RecordsManagementActionService recordsManagementActionService;
|
protected RecordsManagementActionService recordsManagementActionService;
|
||||||
|
|
||||||
/** File Plan Service */
|
/** File Plan Service */
|
||||||
protected FilePlanService filePlanService;
|
protected FilePlanService filePlanService;
|
||||||
|
|
||||||
/** bean name */
|
/** bean name */
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/** public condition */
|
/** public condition */
|
||||||
protected boolean publicCondition = true;
|
protected boolean publicCondition = true;
|
||||||
|
|
||||||
private RetryingTransactionHelper retryingTransactionHelper;
|
private RetryingTransactionHelper retryingTransactionHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -61,11 +61,11 @@ public abstract class RecordsManagementActionConditionEvaluatorAbstractBase exte
|
|||||||
{
|
{
|
||||||
this.recordsManagementActionService = recordsManagementActionService;
|
this.recordsManagementActionService = recordsManagementActionService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param filePlanService file plan service
|
* @param filePlanService file plan service
|
||||||
*/
|
*/
|
||||||
public void setFilePlanService(FilePlanService filePlanService)
|
public void setFilePlanService(FilePlanService filePlanService)
|
||||||
{
|
{
|
||||||
this.filePlanService = filePlanService;
|
this.filePlanService = filePlanService;
|
||||||
}
|
}
|
||||||
@@ -93,7 +93,7 @@ public abstract class RecordsManagementActionConditionEvaluatorAbstractBase exte
|
|||||||
{
|
{
|
||||||
RetryingTransactionCallback<Void> callback = new RetryingTransactionCallback<Void>()
|
RetryingTransactionCallback<Void> callback = new RetryingTransactionCallback<Void>()
|
||||||
{
|
{
|
||||||
public Void execute() throws Throwable
|
public Void execute()
|
||||||
{
|
{
|
||||||
recordsManagementActionService.register(RecordsManagementActionConditionEvaluatorAbstractBase.this);
|
recordsManagementActionService.register(RecordsManagementActionConditionEvaluatorAbstractBase.this);
|
||||||
|
|
||||||
@@ -107,13 +107,13 @@ public abstract class RecordsManagementActionConditionEvaluatorAbstractBase exte
|
|||||||
}, AuthenticationUtil.getSystemUserName());
|
}, AuthenticationUtil.getSystemUserName());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setPublicCondition(boolean publicCondition)
|
public void setPublicCondition(boolean publicCondition)
|
||||||
{
|
{
|
||||||
this.publicCondition = publicCondition;
|
this.publicCondition = publicCondition;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.alfresco.repo.action.CommonResourceAbstractBase#setBeanName(java.lang.String)
|
* @see org.alfresco.repo.action.CommonResourceAbstractBase#setBeanName(java.lang.String)
|
||||||
*/
|
*/
|
||||||
@@ -123,7 +123,7 @@ public abstract class RecordsManagementActionConditionEvaluatorAbstractBase exte
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
super.setBeanName(name);
|
super.setBeanName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.alfresco.module.org_alfresco_module_rm.RecordsManagementAction#getName()
|
* @see org.alfresco.module.org_alfresco_module_rm.RecordsManagementAction#getName()
|
||||||
*/
|
*/
|
||||||
@@ -131,7 +131,7 @@ public abstract class RecordsManagementActionConditionEvaluatorAbstractBase exte
|
|||||||
{
|
{
|
||||||
return this.name;
|
return this.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction#getLabel()
|
* @see org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction#getLabel()
|
||||||
*/
|
*/
|
||||||
@@ -139,19 +139,19 @@ public abstract class RecordsManagementActionConditionEvaluatorAbstractBase exte
|
|||||||
{
|
{
|
||||||
return getActionConditionDefintion().getTitle();
|
return getActionConditionDefintion().getTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction#getDescription()
|
* @see org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction#getDescription()
|
||||||
*/
|
*/
|
||||||
public String getDescription()
|
public String getDescription()
|
||||||
{
|
{
|
||||||
return getActionConditionDefintion().getDescription();
|
return getActionConditionDefintion().getDescription();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.alfresco.repo.action.evaluator.ActionConditionEvaluatorAbstractBase#getActionConditionDefintion()
|
* @see org.alfresco.repo.action.evaluator.ActionConditionEvaluatorAbstractBase#getActionConditionDefintion()
|
||||||
*
|
*
|
||||||
* TODO base class should provide "createActionDefinition" method that can be over-ridden like the ActionExecuter
|
* TODO base class should provide "createActionDefinition" method that can be over-ridden like the ActionExecuter
|
||||||
* base class to prevent duplication of code and a cleaner extension.
|
* base class to prevent duplication of code and a cleaner extension.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -168,7 +168,7 @@ public abstract class RecordsManagementActionConditionEvaluatorAbstractBase exte
|
|||||||
}
|
}
|
||||||
return this.actionConditionDefinition;
|
return this.actionConditionDefinition;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.alfresco.repo.action.ParameterizedItemAbstractBase#addParameterDefinitions(java.util.List)
|
* @see org.alfresco.repo.action.ParameterizedItemAbstractBase#addParameterDefinitions(java.util.List)
|
||||||
*/
|
*/
|
||||||
@@ -186,7 +186,7 @@ public abstract class RecordsManagementActionConditionEvaluatorAbstractBase exte
|
|||||||
{
|
{
|
||||||
return publicCondition;
|
return publicCondition;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementActionCondition#getRecordsManagementActionConditionDefinition()
|
* @see org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementActionCondition#getRecordsManagementActionConditionDefinition()
|
||||||
*/
|
*/
|
||||||
|
@@ -84,7 +84,7 @@ public final class AuthenticatedUserRolesDataExtractor extends AbstractDataExtra
|
|||||||
/**
|
/**
|
||||||
* @see org.alfresco.repo.audit.extractor.DataExtractor#extractData(java.io.Serializable)
|
* @see org.alfresco.repo.audit.extractor.DataExtractor#extractData(java.io.Serializable)
|
||||||
*/
|
*/
|
||||||
public Serializable extractData(Serializable value) throws Throwable
|
public Serializable extractData(Serializable value)
|
||||||
{
|
{
|
||||||
NodeRef nodeRef = (NodeRef) value;
|
NodeRef nodeRef = (NodeRef) value;
|
||||||
String user = AuthenticationUtil.getFullyAuthenticatedUser();
|
String user = AuthenticationUtil.getFullyAuthenticatedUser();
|
||||||
|
@@ -58,7 +58,7 @@ public final class FilePlanIdentifierDataExtractor extends AbstractDataExtractor
|
|||||||
return nodeService.hasAspect((NodeRef)data, RecordsManagementModel.ASPECT_RECORD_COMPONENT_ID);
|
return nodeService.hasAspect((NodeRef)data, RecordsManagementModel.ASPECT_RECORD_COMPONENT_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Serializable extractData(Serializable value) throws Throwable
|
public Serializable extractData(Serializable value)
|
||||||
{
|
{
|
||||||
NodeRef nodeRef = (NodeRef) value;
|
NodeRef nodeRef = (NodeRef) value;
|
||||||
|
|
||||||
|
@@ -75,7 +75,7 @@ public final class FilePlanNamePathDataExtractor extends AbstractDataExtractor
|
|||||||
/**
|
/**
|
||||||
* @see org.alfresco.repo.audit.extractor.DataExtractor#extractData(java.io.Serializable)
|
* @see org.alfresco.repo.audit.extractor.DataExtractor#extractData(java.io.Serializable)
|
||||||
*/
|
*/
|
||||||
public Serializable extractData(Serializable value) throws Throwable
|
public Serializable extractData(Serializable value)
|
||||||
{
|
{
|
||||||
NodeRef nodeRef = (NodeRef) value;
|
NodeRef nodeRef = (NodeRef) value;
|
||||||
|
|
||||||
|
@@ -68,7 +68,7 @@ public final class FilePlanNodeRefPathDataExtractor extends AbstractDataExtracto
|
|||||||
return nodeService.hasAspect((NodeRef)data, RecordsManagementModel.ASPECT_FILE_PLAN_COMPONENT);
|
return nodeService.hasAspect((NodeRef)data, RecordsManagementModel.ASPECT_FILE_PLAN_COMPONENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Serializable extractData(Serializable value) throws Throwable
|
public Serializable extractData(Serializable value)
|
||||||
{
|
{
|
||||||
NodeRef nodeRef = (NodeRef) value;
|
NodeRef nodeRef = (NodeRef) value;
|
||||||
|
|
||||||
|
@@ -64,7 +64,7 @@ public class BootstrapImporterModuleComponent extends ImporterModuleComponent
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void executeInternal() throws Throwable
|
protected void executeInternal() throws Throwable
|
||||||
{
|
{
|
||||||
NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, CONFIG_NODEID);
|
NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, CONFIG_NODEID);
|
||||||
if (!nodeService.exists(nodeRef))
|
if (!nodeService.exists(nodeRef))
|
||||||
{
|
{
|
||||||
@@ -72,6 +72,6 @@ public class BootstrapImporterModuleComponent extends ImporterModuleComponent
|
|||||||
|
|
||||||
// init module schema number
|
// init module schema number
|
||||||
modulePatchExecuter.initSchemaVersion();
|
modulePatchExecuter.initSchemaVersion();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,7 @@ import org.springframework.extensions.surf.util.AbstractLifecycleBean;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* RM module bootstrap
|
* RM module bootstrap
|
||||||
*
|
*
|
||||||
* @author janv
|
* @author janv
|
||||||
*/
|
*/
|
||||||
public class RecordsManagementBootstrap extends AbstractLifecycleBean
|
public class RecordsManagementBootstrap extends AbstractLifecycleBean
|
||||||
@@ -41,23 +41,23 @@ public class RecordsManagementBootstrap extends AbstractLifecycleBean
|
|||||||
private RMCaveatConfigService caveatConfigService;
|
private RMCaveatConfigService caveatConfigService;
|
||||||
private CustomEmailMappingService customEmailMappingService;
|
private CustomEmailMappingService customEmailMappingService;
|
||||||
private RecordsManagementAdminService adminService;
|
private RecordsManagementAdminService adminService;
|
||||||
|
|
||||||
public void setTransactionService(TransactionService transactionService)
|
public void setTransactionService(TransactionService transactionService)
|
||||||
{
|
{
|
||||||
this.transactionService = transactionService;
|
this.transactionService = transactionService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCaveatConfigService(RMCaveatConfigService caveatConfigService)
|
public void setCaveatConfigService(RMCaveatConfigService caveatConfigService)
|
||||||
{
|
{
|
||||||
this.caveatConfigService = caveatConfigService;
|
this.caveatConfigService = caveatConfigService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCustomEmailMappingService(CustomEmailMappingService customEmailMappingService)
|
public void setCustomEmailMappingService(CustomEmailMappingService customEmailMappingService)
|
||||||
{
|
{
|
||||||
this.customEmailMappingService = customEmailMappingService;
|
this.customEmailMappingService = customEmailMappingService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRecordsManagementAdminService(RecordsManagementAdminService adminService)
|
public void setRecordsManagementAdminService(RecordsManagementAdminService adminService)
|
||||||
{
|
{
|
||||||
this.adminService = adminService;
|
this.adminService = adminService;
|
||||||
}
|
}
|
||||||
@@ -66,7 +66,7 @@ public class RecordsManagementBootstrap extends AbstractLifecycleBean
|
|||||||
{
|
{
|
||||||
return customEmailMappingService;
|
return customEmailMappingService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onBootstrap(ApplicationEvent event)
|
protected void onBootstrap(ApplicationEvent event)
|
||||||
{
|
{
|
||||||
@@ -77,28 +77,28 @@ public class RecordsManagementBootstrap extends AbstractLifecycleBean
|
|||||||
{
|
{
|
||||||
RetryingTransactionCallback<Void> callback = new RetryingTransactionCallback<Void>()
|
RetryingTransactionCallback<Void> callback = new RetryingTransactionCallback<Void>()
|
||||||
{
|
{
|
||||||
public Void execute() throws Throwable
|
public Void execute()
|
||||||
{
|
{
|
||||||
// initialise caveat config
|
// initialise caveat config
|
||||||
caveatConfigService.init();
|
caveatConfigService.init();
|
||||||
|
|
||||||
// Initialise the custom model
|
// Initialise the custom model
|
||||||
adminService.initialiseCustomModel();
|
adminService.initialiseCustomModel();
|
||||||
|
|
||||||
// Initialise the SplitEmailAction
|
// Initialise the SplitEmailAction
|
||||||
SplitEmailAction action = (SplitEmailAction)getApplicationContext().getBean("splitEmail");
|
SplitEmailAction action = (SplitEmailAction)getApplicationContext().getBean("splitEmail");
|
||||||
action.bootstrap();
|
action.bootstrap();
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
transactionService.getRetryingTransactionHelper().doInTransaction(callback);
|
transactionService.getRetryingTransactionHelper().doInTransaction(callback);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}, AuthenticationUtil.getSystemUserName());
|
}, AuthenticationUtil.getSystemUserName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onShutdown(ApplicationEvent event)
|
protected void onShutdown(ApplicationEvent event)
|
||||||
{
|
{
|
||||||
|
@@ -392,7 +392,7 @@ public class CustomEmailMappingServiceImpl extends AbstractLifecycleBean impleme
|
|||||||
{
|
{
|
||||||
RetryingTransactionCallback<Void> callback = new RetryingTransactionCallback<Void>()
|
RetryingTransactionCallback<Void> callback = new RetryingTransactionCallback<Void>()
|
||||||
{
|
{
|
||||||
public Void execute() throws Throwable
|
public Void execute()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@@ -53,10 +53,10 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
|
|||||||
{
|
{
|
||||||
/** logger */
|
/** logger */
|
||||||
private static Log logger = LogFactory.getLog(DispositionLifecycleJobExecuter.class);
|
private static Log logger = LogFactory.getLog(DispositionLifecycleJobExecuter.class);
|
||||||
|
|
||||||
/** list of disposition actions to automatically execute */
|
/** list of disposition actions to automatically execute */
|
||||||
private List<String> dispositionActions;
|
private List<String> dispositionActions;
|
||||||
|
|
||||||
/** query string */
|
/** query string */
|
||||||
private String query;
|
private String query;
|
||||||
|
|
||||||
@@ -71,14 +71,14 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* List of disposition actions to automatically execute when eligible.
|
* List of disposition actions to automatically execute when eligible.
|
||||||
*
|
*
|
||||||
* @param dispositionActions disposition actions
|
* @param dispositionActions disposition actions
|
||||||
*/
|
*/
|
||||||
public void setDispositionActions(List<String> dispositionActions)
|
public void setDispositionActions(List<String> dispositionActions)
|
||||||
{
|
{
|
||||||
this.dispositionActions = dispositionActions;
|
this.dispositionActions = dispositionActions;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param recordsManagementActionService records management action service
|
* @param recordsManagementActionService records management action service
|
||||||
*/
|
*/
|
||||||
@@ -102,21 +102,21 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
|
|||||||
{
|
{
|
||||||
this.searchService = searchService;
|
this.searchService = searchService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the search query string.
|
* Get the search query string.
|
||||||
*
|
*
|
||||||
* @return job query string
|
* @return job query string
|
||||||
*/
|
*/
|
||||||
private String getQuery()
|
private String getQuery()
|
||||||
{
|
{
|
||||||
if (query == null)
|
if (query == null)
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
sb.append("+TYPE:\"rma:dispositionAction\" ");
|
sb.append("+TYPE:\"rma:dispositionAction\" ");
|
||||||
sb.append("+(@rma\\:dispositionAction:(");
|
sb.append("+(@rma\\:dispositionAction:(");
|
||||||
|
|
||||||
boolean bFirst = true;
|
boolean bFirst = true;
|
||||||
for (String dispositionAction : dispositionActions)
|
for (String dispositionAction : dispositionActions)
|
||||||
{
|
{
|
||||||
@@ -128,20 +128,20 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
|
|||||||
{
|
{
|
||||||
sb.append(" OR ");
|
sb.append(" OR ");
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append("\"").append(dispositionAction).append("\"");
|
sb.append("\"").append(dispositionAction).append("\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append("))");
|
sb.append("))");
|
||||||
sb.append("+ISNULL:\"rma:dispositionActionCompletedAt\" ");
|
sb.append("+ISNULL:\"rma:dispositionActionCompletedAt\" ");
|
||||||
sb.append("+( ");
|
sb.append("+( ");
|
||||||
sb.append("@rma\\:dispositionEventsEligible:true ");
|
sb.append("@rma\\:dispositionEventsEligible:true ");
|
||||||
sb.append("OR @rma\\:dispositionAsOf:[MIN TO NOW] ");
|
sb.append("OR @rma\\:dispositionAsOf:[MIN TO NOW] ");
|
||||||
sb.append(") ");
|
sb.append(") ");
|
||||||
|
|
||||||
query = sb.toString();
|
query = sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,30 +153,30 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
logger.debug("Job Starting");
|
logger.debug("Job Starting");
|
||||||
|
|
||||||
if (dispositionActions != null && !dispositionActions.isEmpty())
|
if (dispositionActions != null && !dispositionActions.isEmpty())
|
||||||
{
|
{
|
||||||
// execute search
|
// execute search
|
||||||
ResultSet results = searchService.query(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, SearchService.LANGUAGE_LUCENE, getQuery());
|
ResultSet results = searchService.query(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, SearchService.LANGUAGE_LUCENE, getQuery());
|
||||||
List<NodeRef> resultNodes = results.getNodeRefs();
|
List<NodeRef> resultNodes = results.getNodeRefs();
|
||||||
results.close();
|
results.close();
|
||||||
|
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
{
|
{
|
||||||
logger.debug("Processing " + resultNodes.size() + " nodes");
|
logger.debug("Processing " + resultNodes.size() + " nodes");
|
||||||
}
|
}
|
||||||
|
|
||||||
// process search results
|
// process search results
|
||||||
for (NodeRef node : resultNodes)
|
for (NodeRef node : resultNodes)
|
||||||
{
|
{
|
||||||
final NodeRef currentNode = node;
|
final NodeRef currentNode = node;
|
||||||
|
|
||||||
RetryingTransactionCallback<Boolean> processTranCB = new RetryingTransactionCallback<Boolean>()
|
RetryingTransactionCallback<Boolean> processTranCB = new RetryingTransactionCallback<Boolean>()
|
||||||
{
|
{
|
||||||
public Boolean execute() throws Throwable
|
public Boolean execute()
|
||||||
{
|
{
|
||||||
final String dispAction = (String) nodeService.getProperty(currentNode, RecordsManagementModel.PROP_DISPOSITION_ACTION);
|
final String dispAction = (String) nodeService.getProperty(currentNode, RecordsManagementModel.PROP_DISPOSITION_ACTION);
|
||||||
|
|
||||||
// Run disposition action
|
// Run disposition action
|
||||||
if (dispAction != null && dispositionActions.contains(dispAction))
|
if (dispAction != null && dispositionActions.contains(dispAction))
|
||||||
{
|
{
|
||||||
@@ -185,21 +185,21 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
|
|||||||
{
|
{
|
||||||
Map<String, Serializable> props = new HashMap<String, Serializable>(1);
|
Map<String, Serializable> props = new HashMap<String, Serializable>(1);
|
||||||
props.put(RMDispositionActionExecuterAbstractBase.PARAM_NO_ERROR_CHECK, Boolean.FALSE);
|
props.put(RMDispositionActionExecuterAbstractBase.PARAM_NO_ERROR_CHECK, Boolean.FALSE);
|
||||||
|
|
||||||
// execute disposition action
|
// execute disposition action
|
||||||
recordsManagementActionService.executeRecordsManagementAction(parent.getParentRef(), dispAction, props);
|
recordsManagementActionService.executeRecordsManagementAction(parent.getParentRef(), dispAction, props);
|
||||||
|
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
{
|
{
|
||||||
logger.debug("Processed action: " + dispAction + "on" + parent);
|
logger.debug("Processed action: " + dispAction + "on" + parent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// if exists
|
// if exists
|
||||||
if (nodeService.exists(currentNode))
|
if (nodeService.exists(currentNode))
|
||||||
{
|
{
|
||||||
|
@@ -107,7 +107,7 @@ public class NotifyOfRecordsDueForReviewJobExecuter extends RecordsManagementJob
|
|||||||
RetryingTransactionCallback<Boolean> txCallbackSendEmail = new RetryingTransactionCallback<Boolean>()
|
RetryingTransactionCallback<Boolean> txCallbackSendEmail = new RetryingTransactionCallback<Boolean>()
|
||||||
{
|
{
|
||||||
// Set the notification issued property.
|
// Set the notification issued property.
|
||||||
public Boolean execute() throws Throwable
|
public Boolean execute()
|
||||||
{
|
{
|
||||||
// Send notification
|
// Send notification
|
||||||
recordsManagementNotificationHelper.recordsDueForReviewEmailNotification(resultNodes);
|
recordsManagementNotificationHelper.recordsDueForReviewEmailNotification(resultNodes);
|
||||||
@@ -119,7 +119,7 @@ public class NotifyOfRecordsDueForReviewJobExecuter extends RecordsManagementJob
|
|||||||
RetryingTransactionCallback<Boolean> txUpdateNodesCallback = new RetryingTransactionCallback<Boolean>()
|
RetryingTransactionCallback<Boolean> txUpdateNodesCallback = new RetryingTransactionCallback<Boolean>()
|
||||||
{
|
{
|
||||||
// Set the notification issued property.
|
// Set the notification issued property.
|
||||||
public Boolean execute() throws Throwable
|
public Boolean execute()
|
||||||
{
|
{
|
||||||
for (NodeRef node : resultNodes)
|
for (NodeRef node : resultNodes)
|
||||||
{
|
{
|
||||||
|
@@ -201,7 +201,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
|||||||
new RetryingTransactionHelper.RetryingTransactionCallback<List<NodeRef>>()
|
new RetryingTransactionHelper.RetryingTransactionCallback<List<NodeRef>>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public List<NodeRef> execute() throws Throwable
|
public List<NodeRef> execute()
|
||||||
{
|
{
|
||||||
// Build the query string
|
// Build the query string
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
@@ -251,7 +251,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
|||||||
new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public Void execute() throws Throwable
|
public Void execute()
|
||||||
{
|
{
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
{
|
{
|
||||||
@@ -287,7 +287,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
|||||||
new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public Void execute() throws Throwable
|
public Void execute()
|
||||||
{
|
{
|
||||||
behaviourFilter.disableBehaviour(nodeRef, TYPE_DISPOSITION_ACTION_DEFINITION);
|
behaviourFilter.disableBehaviour(nodeRef, TYPE_DISPOSITION_ACTION_DEFINITION);
|
||||||
try
|
try
|
||||||
@@ -358,7 +358,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
|||||||
new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public Void execute() throws Throwable
|
public Void execute()
|
||||||
{
|
{
|
||||||
behaviourFilter.disableBehaviour(nodeRef, TYPE_DISPOSITION_ACTION_DEFINITION);
|
behaviourFilter.disableBehaviour(nodeRef, TYPE_DISPOSITION_ACTION_DEFINITION);
|
||||||
try
|
try
|
||||||
|
@@ -63,7 +63,7 @@ public abstract class RecordsManagementJobExecuter implements RecordsManagementM
|
|||||||
retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<Void>()
|
retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<Void>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public Void execute() throws Throwable
|
public Void execute()
|
||||||
{
|
{
|
||||||
executeImpl();
|
executeImpl();
|
||||||
|
|
||||||
|
@@ -233,7 +233,7 @@ public abstract class AbstractModulePatch implements ModulePatch, BeanNameAware
|
|||||||
* @see org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback#execute()
|
* @see org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback#execute()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Void execute() throws Throwable
|
public Void execute()
|
||||||
{
|
{
|
||||||
applyInternal();
|
applyInternal();
|
||||||
return null;
|
return null;
|
||||||
|
@@ -97,7 +97,7 @@ public class ModulePatchExecuterImpl extends AbstractModuleComponent
|
|||||||
* @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
|
* @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void executeInternal() throws Throwable
|
protected void executeInternal()
|
||||||
{
|
{
|
||||||
// get current schema version
|
// get current schema version
|
||||||
int currentSchema = getCurrentSchema();
|
int currentSchema = getCurrentSchema();
|
||||||
|
@@ -85,7 +85,7 @@ public abstract class ModulePatchComponent extends AbstractModuleComponent
|
|||||||
* @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
|
* @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void executeInternal() throws Throwable
|
protected void executeInternal()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -98,7 +98,7 @@ public abstract class ModulePatchComponent extends AbstractModuleComponent
|
|||||||
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
retryingTransactionHelper.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public Void execute() throws Throwable
|
public Void execute()
|
||||||
{
|
{
|
||||||
behaviourFilter.disableBehaviour();
|
behaviourFilter.disableBehaviour();
|
||||||
try
|
try
|
||||||
@@ -132,8 +132,6 @@ public abstract class ModulePatchComponent extends AbstractModuleComponent
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute patch work.
|
* Execute patch work.
|
||||||
*
|
|
||||||
* @throws Throwable
|
|
||||||
*/
|
*/
|
||||||
protected abstract void executePatch() throws Throwable;
|
protected abstract void executePatch();
|
||||||
}
|
}
|
||||||
|
@@ -126,7 +126,7 @@ public class NotificationTemplatePatch extends ModulePatchComponent
|
|||||||
* @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
|
* @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void executePatch() throws Throwable
|
protected void executePatch()
|
||||||
{
|
{
|
||||||
NodeRef supersededTemplate = notificationHelper.getSupersededTemplate();
|
NodeRef supersededTemplate = notificationHelper.getSupersededTemplate();
|
||||||
updateTemplate(supersededTemplate, PATH_SUPERSEDED);
|
updateTemplate(supersededTemplate, PATH_SUPERSEDED);
|
||||||
|
@@ -106,7 +106,7 @@ public class RMv2FilePlanNodeRefPatch extends ModulePatchComponent
|
|||||||
* @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
|
* @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void executePatch() throws Throwable
|
protected void executePatch()
|
||||||
{
|
{
|
||||||
Pair<Long, QName> aspectPair = qnameDAO.getQName(RecordsManagementModel.ASPECT_FILE_PLAN_COMPONENT);
|
Pair<Long, QName> aspectPair = qnameDAO.getQName(RecordsManagementModel.ASPECT_FILE_PLAN_COMPONENT);
|
||||||
if (aspectPair != null)
|
if (aspectPair != null)
|
||||||
|
@@ -66,7 +66,7 @@ public class RMv2ModelPatch extends ModulePatchComponent
|
|||||||
* @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
|
* @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void executePatch() throws Throwable
|
protected void executePatch()
|
||||||
{
|
{
|
||||||
updateQName(QName.createQName(DOD_URI, "filePlan"), TYPE_FILE_PLAN, "TYPE");
|
updateQName(QName.createQName(DOD_URI, "filePlan"), TYPE_FILE_PLAN, "TYPE");
|
||||||
updateQName(QName.createQName(DOD_URI, "recordCategory"), TYPE_RECORD_CATEGORY, "TYPE");
|
updateQName(QName.createQName(DOD_URI, "recordCategory"), TYPE_RECORD_CATEGORY, "TYPE");
|
||||||
|
@@ -82,7 +82,7 @@ public class RMv2SavedSearchPatch extends ModulePatchComponent
|
|||||||
* @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
|
* @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void executePatch() throws Throwable
|
protected void executePatch()
|
||||||
{
|
{
|
||||||
if (siteService.getSite(RM_SITE_ID) != null)
|
if (siteService.getSite(RM_SITE_ID) != null)
|
||||||
{
|
{
|
||||||
|
@@ -82,7 +82,7 @@ public class NotificationTemplatePatch_v21 extends RMv21PatchComponent
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void executePatch() throws Throwable
|
protected void executePatch()
|
||||||
{
|
{
|
||||||
NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, CONFIG_NODEID);
|
NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, CONFIG_NODEID);
|
||||||
// get the parent node
|
// get the parent node
|
||||||
|
@@ -85,7 +85,7 @@ public class RMv21BehaviorScriptsPatch extends RMv21PatchComponent implements Be
|
|||||||
* @see org.alfresco.module.org_alfresco_module_rm.patch.compatibility.ModulePatchComponent#executePatch()
|
* @see org.alfresco.module.org_alfresco_module_rm.patch.compatibility.ModulePatchComponent#executePatch()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void executePatch() throws Throwable
|
protected void executePatch()
|
||||||
{
|
{
|
||||||
// check that the rm config root has been correctly bootstrapped
|
// check that the rm config root has been correctly bootstrapped
|
||||||
if (!nodeService.exists(RM_CONFIG))
|
if (!nodeService.exists(RM_CONFIG))
|
||||||
|
@@ -123,7 +123,7 @@ public class RMv21CapabilityPatch extends RMv21PatchComponent
|
|||||||
* @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
|
* @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void executePatch() throws Throwable
|
protected void executePatch()
|
||||||
{
|
{
|
||||||
Set<NodeRef> filePlans = getFilePlans();
|
Set<NodeRef> filePlans = getFilePlans();
|
||||||
|
|
||||||
|
@@ -134,7 +134,7 @@ public class RMv21InPlacePatch extends RMv21PatchComponent
|
|||||||
* @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
|
* @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void executePatch() throws Throwable
|
protected void executePatch()
|
||||||
{
|
{
|
||||||
Set<NodeRef> filePlans = filePlanService.getFilePlans();
|
Set<NodeRef> filePlans = filePlanService.getFilePlans();
|
||||||
|
|
||||||
|
@@ -109,7 +109,7 @@ public class RMv21RMAdminUserPatch extends RMv21PatchComponent implements BeanNa
|
|||||||
* @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
|
* @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void executePatch() throws Throwable
|
protected void executePatch()
|
||||||
{
|
{
|
||||||
String user = filePlanAuthenticationService.getRmAdminUserName();
|
String user = filePlanAuthenticationService.getRmAdminUserName();
|
||||||
String firstName = I18NUtil.getMessage(MSG_FIRST_NAME);
|
String firstName = I18NUtil.getMessage(MSG_FIRST_NAME);
|
||||||
|
@@ -102,7 +102,7 @@ public class RMv21RecordInheritancePatch extends RMv21PatchComponent
|
|||||||
* @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
|
* @see org.alfresco.repo.module.AbstractModuleComponent#executeInternal()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void executePatch() throws Throwable
|
protected void executePatch()
|
||||||
{
|
{
|
||||||
Pair<Long, QName> aspectPair = qnameDAO.getQName(ASPECT_RECORD);
|
Pair<Long, QName> aspectPair = qnameDAO.getQName(ASPECT_RECORD);
|
||||||
if (aspectPair != null)
|
if (aspectPair != null)
|
||||||
|
@@ -69,7 +69,7 @@ public class RMv21ReportServicePatch extends RMv21PatchComponent
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void executePatch() throws Throwable
|
protected void executePatch()
|
||||||
{
|
{
|
||||||
// check whether report dir exists or not
|
// check whether report dir exists or not
|
||||||
if (nodeService.exists(RM_CONFIG_FOLDER) && !nodeService.exists(TEMPLATE_ROOT))
|
if (nodeService.exists(RM_CONFIG_FOLDER) && !nodeService.exists(TEMPLATE_ROOT))
|
||||||
|
@@ -67,7 +67,7 @@ public class RMv21RolesPatch extends RMv21PatchComponent implements BeanNameAwar
|
|||||||
* @see org.alfresco.module.org_alfresco_module_rm.patch.compatibility.ModulePatchComponent#executePatch()
|
* @see org.alfresco.module.org_alfresco_module_rm.patch.compatibility.ModulePatchComponent#executePatch()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void executePatch() throws Throwable
|
protected void executePatch()
|
||||||
{
|
{
|
||||||
Set<NodeRef> filePlans = filePlanService.getFilePlans();
|
Set<NodeRef> filePlans = filePlanService.getFilePlans();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user