mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Fixed major issues reported by sonar (Simplify Boolean Expression)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@63886 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -94,7 +94,7 @@ public abstract class AuditableActionExecuterAbstractBase extends ActionExecuter
|
||||
super.init();
|
||||
}
|
||||
|
||||
if (auditable == true)
|
||||
if (auditable)
|
||||
{
|
||||
getAuditService().registerAuditEvent(this.getActionDefinition().getName(), this.getActionDefinition().getTitle());
|
||||
}
|
||||
@@ -107,9 +107,9 @@ public abstract class AuditableActionExecuterAbstractBase extends ActionExecuter
|
||||
public void execute(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
// audit the execution of the action
|
||||
if (auditable == true)
|
||||
if (auditable)
|
||||
{
|
||||
if (auditedImmediately == true)
|
||||
if (auditedImmediately)
|
||||
{
|
||||
// To be audited immediately before the action is executed, eg. to audit before actionedUponNodeRef gets deleted during the execution.
|
||||
getAuditService().auditEvent(actionedUponNodeRef, this.getActionDefinition().getName(), null, null, true);
|
||||
|
@@ -61,7 +61,7 @@ public abstract class PropertySubActionExecuterAbstractBase extends AuditableAct
|
||||
public void execute(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
// do the property subs (if any exist)
|
||||
if (allowParameterSubstitutions == true)
|
||||
if (allowParameterSubstitutions)
|
||||
{
|
||||
parameterProcessorComponent.process(action, getActionDefinition(), actionedUponNodeRef);
|
||||
}
|
||||
|
@@ -522,7 +522,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
{
|
||||
for (EventCompletionDetails event : events)
|
||||
{
|
||||
if (event.isEventComplete() == true)
|
||||
if (event.isEventComplete())
|
||||
{
|
||||
eligible = true;
|
||||
break;
|
||||
|
@@ -117,15 +117,15 @@ public abstract class RMDispositionActionExecuterAbstractBase extends RMActionEx
|
||||
{
|
||||
// Check the eligibility of the action
|
||||
if (checkEligibility(actionedUponNodeRef) == false ||
|
||||
dispositionService.isNextDispositionActionEligible(actionedUponNodeRef) == true)
|
||||
dispositionService.isNextDispositionActionEligible(actionedUponNodeRef))
|
||||
{
|
||||
if (di.isRecordLevelDisposition() == true)
|
||||
if (di.isRecordLevelDisposition())
|
||||
{
|
||||
// Check that we do indeed have a record
|
||||
if (recordService.isRecord(actionedUponNodeRef) == true)
|
||||
if (recordService.isRecord(actionedUponNodeRef))
|
||||
{
|
||||
// Can only execute disposition action on record if declared
|
||||
if (recordService.isDeclared(actionedUponNodeRef) == true)
|
||||
if (recordService.isDeclared(actionedUponNodeRef))
|
||||
{
|
||||
// Indicate that the disposition action is underway
|
||||
nodeService.setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_STARTED_AT, new Date());
|
||||
@@ -134,8 +134,8 @@ public abstract class RMDispositionActionExecuterAbstractBase extends RMActionEx
|
||||
// Execute record level disposition
|
||||
executeRecordLevelDisposition(action, actionedUponNodeRef);
|
||||
|
||||
if (nodeService.exists(nextDispositionActionNodeRef) == true &&
|
||||
getSetDispositionActionComplete() == true)
|
||||
if (nodeService.exists(nextDispositionActionNodeRef) &&
|
||||
getSetDispositionActionComplete())
|
||||
{
|
||||
nodeService.setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_COMPLETED_AT, new Date());
|
||||
nodeService.setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_COMPLETED_BY, AuthenticationUtil.getRunAsUser());
|
||||
@@ -153,9 +153,9 @@ public abstract class RMDispositionActionExecuterAbstractBase extends RMActionEx
|
||||
}
|
||||
else
|
||||
{
|
||||
if (recordFolderService.isRecordFolder(actionedUponNodeRef) == true)
|
||||
if (recordFolderService.isRecordFolder(actionedUponNodeRef))
|
||||
{
|
||||
if (recordFolderService.isRecordFolderDeclared(actionedUponNodeRef) == true)
|
||||
if (recordFolderService.isRecordFolderDeclared(actionedUponNodeRef))
|
||||
{
|
||||
// Indicate that the disposition action is underway
|
||||
nodeService.setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_STARTED_AT, new Date());
|
||||
@@ -164,8 +164,8 @@ public abstract class RMDispositionActionExecuterAbstractBase extends RMActionEx
|
||||
executeRecordFolderLevelDisposition(action, actionedUponNodeRef);
|
||||
|
||||
// Indicate that the disposition action is compelte
|
||||
if (nodeService.exists(nextDispositionActionNodeRef) == true &&
|
||||
getSetDispositionActionComplete() == true)
|
||||
if (nodeService.exists(nextDispositionActionNodeRef) &&
|
||||
getSetDispositionActionComplete())
|
||||
{
|
||||
nodeService.setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_COMPLETED_AT, new Date());
|
||||
nodeService.setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_COMPLETED_BY, AuthenticationUtil.getRunAsUser());
|
||||
@@ -184,7 +184,7 @@ public abstract class RMDispositionActionExecuterAbstractBase extends RMActionEx
|
||||
|
||||
}
|
||||
|
||||
if (nodeService.exists(actionedUponNodeRef) == true && getSetDispositionActionComplete() == true)
|
||||
if (nodeService.exists(actionedUponNodeRef) && getSetDispositionActionComplete())
|
||||
{
|
||||
// Update the disposition schedule
|
||||
dispositionService.updateNextDispositionAction(actionedUponNodeRef);
|
||||
@@ -251,7 +251,7 @@ public abstract class RMDispositionActionExecuterAbstractBase extends RMActionEx
|
||||
}
|
||||
}
|
||||
|
||||
if (checkNextDispositionAction(nodeRef) == true)
|
||||
if (checkNextDispositionAction(nodeRef))
|
||||
{
|
||||
// Check this the next disposition action
|
||||
NodeRef nextDispositionAction = nextDispositionActionNodeRef;
|
||||
|
@@ -108,7 +108,7 @@ public class RecordsManagementActionServiceImpl implements RecordsManagementActi
|
||||
{
|
||||
rmActions.put(rmAction.getName(), rmAction);
|
||||
|
||||
if (rmAction.isDispositionAction() == true)
|
||||
if (rmAction.isDispositionAction())
|
||||
{
|
||||
dispositionActions.put(rmAction.getName(), rmAction);
|
||||
}
|
||||
@@ -261,7 +261,7 @@ public class RecordsManagementActionServiceImpl implements RecordsManagementActi
|
||||
// Execute action
|
||||
invokeBeforeRMActionExecution(nodeRef, name, parameters);
|
||||
RecordsManagementActionResult result = rmAction.execute(nodeRef, parameters);
|
||||
if (nodeService.exists(nodeRef) == true)
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
invokeOnRMActionExecution(nodeRef, name, parameters);
|
||||
}
|
||||
|
@@ -67,7 +67,7 @@ public class ScheduledDispositionJob implements Job
|
||||
final String currentDate = padString(year, 2) + "-" + padString(month, 2) +
|
||||
"-" + padString(dayOfMonth, 2) + "T00:00:00.00Z";
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
StringBuilder msg = new StringBuilder();
|
||||
msg.append("Executing ")
|
||||
@@ -89,7 +89,7 @@ public class ScheduledDispositionJob implements Job
|
||||
List<NodeRef> resultNodes = results.getNodeRefs();
|
||||
results.close();
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
StringBuilder msg = new StringBuilder();
|
||||
msg.append("Found ")
|
||||
@@ -108,7 +108,7 @@ public class ScheduledDispositionJob implements Job
|
||||
{
|
||||
rmActionService.executeRecordsManagementAction(node, dispActionName);
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Performing " + dispActionName + " dispoition action on disposable item " + node.toString());
|
||||
}
|
||||
|
@@ -129,7 +129,7 @@ public class CreateRecordAction extends AuditableActionExecuterAbstractBase
|
||||
if (nodeService.exists(actionedUponNodeRef) == false)
|
||||
{
|
||||
// do not create record if the actioned upon node does not exist!
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Can not create record, because " + actionedUponNodeRef.toString() + " does not exist.");
|
||||
}
|
||||
@@ -137,40 +137,40 @@ public class CreateRecordAction extends AuditableActionExecuterAbstractBase
|
||||
else if (dictionaryService.isSubClass(nodeService.getType(actionedUponNodeRef), ContentModel.TYPE_CONTENT) == false)
|
||||
{
|
||||
// TODO eventually we should support other types .. either as record folders or as composite records
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Can not create record, because " + actionedUponNodeRef.toString() + " is not a supported type.");
|
||||
}
|
||||
}
|
||||
else if (nodeService.hasAspect(actionedUponNodeRef, ASPECT_RECORD) == true)
|
||||
else if (nodeService.hasAspect(actionedUponNodeRef, ASPECT_RECORD))
|
||||
{
|
||||
// Do not create record if the actioned upon node is already a record!
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Can not create record, because " + actionedUponNodeRef.toString() + " is already a record.");
|
||||
}
|
||||
}
|
||||
else if (nodeService.hasAspect(actionedUponNodeRef, ContentModel.ASPECT_WORKING_COPY) == true)
|
||||
else if (nodeService.hasAspect(actionedUponNodeRef, ContentModel.ASPECT_WORKING_COPY))
|
||||
{
|
||||
// We can not create records from working copies
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Can node create record, because " + actionedUponNodeRef.toString() + " is a working copy.");
|
||||
}
|
||||
|
||||
}
|
||||
else if (nodeService.hasAspect(actionedUponNodeRef, ASPECT_RECORD_REJECTION_DETAILS) == true)
|
||||
else if (nodeService.hasAspect(actionedUponNodeRef, ASPECT_RECORD_REJECTION_DETAILS))
|
||||
{
|
||||
// can not create a record from a previously rejected one
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Can not create record, because " + actionedUponNodeRef.toString() + " has previously been rejected.");
|
||||
}
|
||||
}
|
||||
else if (nodeService.hasAspect(actionedUponNodeRef, ASPECT_SYNCED) == true)
|
||||
else if (nodeService.hasAspect(actionedUponNodeRef, ASPECT_SYNCED))
|
||||
{
|
||||
// can't declare the record if the node is sync'ed
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Can't declare as record, because " + actionedUponNodeRef.toString() + " is synched content.");
|
||||
}
|
||||
@@ -193,7 +193,7 @@ public class CreateRecordAction extends AuditableActionExecuterAbstractBase
|
||||
// if the file plan is still null, raise an exception
|
||||
if (filePlan == null)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Can not create record, because the default file plan can not be determined. Make sure at least one file plan has been created.");
|
||||
}
|
||||
@@ -205,7 +205,7 @@ public class CreateRecordAction extends AuditableActionExecuterAbstractBase
|
||||
// verify that the provided file plan is actually a file plan
|
||||
if (filePlanService.isFilePlan(filePlan) == false)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Can not create record, because the provided file plan node reference is not a file plan.");
|
||||
}
|
||||
|
@@ -79,7 +79,7 @@ public class HideRecordAction extends AuditableActionExecuterAbstractBase
|
||||
if (nodeService.hasAspect(actionedUponNodeRef, ASPECT_RECORD) == false)
|
||||
{
|
||||
// we cannot hide a document which is not a record
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Cannot hide the document, because '" + actionedUponNodeRef.toString() + "' is not a record.");
|
||||
}
|
||||
|
@@ -69,7 +69,7 @@ public class HasDispositionActionEvaluator extends RecordsManagementActionCondit
|
||||
String action = ((QName) actionCondition.getParameterValue(PARAM_DISPOSITION_ACTION)).getLocalName();
|
||||
|
||||
|
||||
if (dispositionService.isDisposableItem(actionedUponNodeRef) == true)
|
||||
if (dispositionService.isDisposableItem(actionedUponNodeRef))
|
||||
{
|
||||
|
||||
if (position.equals(DispositionActionRelativePositions.ANY.toString()))
|
||||
@@ -80,7 +80,7 @@ public class HasDispositionActionEvaluator extends RecordsManagementActionCondit
|
||||
{
|
||||
for (DispositionActionDefinition dispositionActionDefinition : dispositionSchedule.getDispositionActionDefinitions())
|
||||
{
|
||||
if (dispositionActionDefinition.getName().equals(action) == true)
|
||||
if (dispositionActionDefinition.getName().equals(action))
|
||||
{
|
||||
result = true;
|
||||
break;
|
||||
@@ -95,7 +95,7 @@ public class HasDispositionActionEvaluator extends RecordsManagementActionCondit
|
||||
{
|
||||
// Get the disposition actions name
|
||||
String actionName = nextDispositionAction.getName();
|
||||
if (actionName.equals(action) == true)
|
||||
if (actionName.equals(action))
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
@@ -108,7 +108,7 @@ public class HasDispositionActionEvaluator extends RecordsManagementActionCondit
|
||||
{
|
||||
// Get the disposition actions name
|
||||
String actionName = lastCompletedDispositionAction.getName();
|
||||
if (actionName.equals(action) == true)
|
||||
if (actionName.equals(action))
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
|
@@ -61,14 +61,14 @@ public class AddRecordTypeAction extends RMActionExecuterAbstractBase
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (eligibleForAction(actionedUponNodeRef) == true)
|
||||
if (eligibleForAction(actionedUponNodeRef))
|
||||
{
|
||||
for (String type : getRecordTypes(action))
|
||||
{
|
||||
recordService.addRecordType(actionedUponNodeRef, QName.createQName(type, namespaceService));
|
||||
}
|
||||
}
|
||||
else if (logger.isWarnEnabled() == true)
|
||||
else if (logger.isWarnEnabled())
|
||||
{
|
||||
logger.warn(I18NUtil.getMessage(MSG_ACTIONED_UPON_NOT_RECORD, this.getClass().getSimpleName(), actionedUponNodeRef.toString()));
|
||||
}
|
||||
@@ -88,9 +88,9 @@ public class AddRecordTypeAction extends RMActionExecuterAbstractBase
|
||||
private boolean eligibleForAction(NodeRef actionedUponNodeRef)
|
||||
{
|
||||
boolean result = false;
|
||||
if (nodeService.exists(actionedUponNodeRef) == true &&
|
||||
if (nodeService.exists(actionedUponNodeRef) &&
|
||||
freezeService.isFrozen(actionedUponNodeRef) == false &&
|
||||
recordService.isRecord(actionedUponNodeRef) == true &&
|
||||
recordService.isRecord(actionedUponNodeRef) &&
|
||||
recordService.isDeclared(actionedUponNodeRef) == false)
|
||||
{
|
||||
result = true;
|
||||
|
@@ -69,13 +69,13 @@ public class ApplyCustomTypeAction extends RMActionExecuterAbstractBase
|
||||
logger.debug("Executing action [" + action.getActionDefinitionName() + "] on " + actionedUponNodeRef);
|
||||
}
|
||||
|
||||
if (recordService.isRecord(actionedUponNodeRef) == true)
|
||||
if (recordService.isRecord(actionedUponNodeRef))
|
||||
{
|
||||
// Apply the appropriate aspect and set the properties.
|
||||
Map<QName, Serializable> aspectProps = getPropertyValues(action);
|
||||
this.nodeService.addAspect(actionedUponNodeRef, customTypeAspect, aspectProps);
|
||||
}
|
||||
else if (logger.isWarnEnabled() == true)
|
||||
else if (logger.isWarnEnabled())
|
||||
{
|
||||
logger.warn(I18NUtil.getMessage(MSG_ACTIONED_UPON_NOT_RECORD, this.getClass().getSimpleName(), actionedUponNodeRef.toString()));
|
||||
}
|
||||
|
@@ -109,7 +109,7 @@ public class BroadcastDispositionActionDefinitionUpdateAction extends RMActionEx
|
||||
// has been updated
|
||||
DispositionSchedule itemDs = dispositionService.getDispositionSchedule(disposableItem);
|
||||
if (itemDs != null &&
|
||||
itemDs.getNodeRef().equals(ds.getNodeRef()) == true)
|
||||
itemDs.getNodeRef().equals(ds.getNodeRef()))
|
||||
{
|
||||
if (nodeService.hasAspect(disposableItem, ASPECT_DISPOSITION_LIFECYCLE))
|
||||
{
|
||||
|
@@ -39,7 +39,7 @@ public class CloseRecordFolderAction extends RMActionExecuterAbstractBase
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (eligibleForAction(actionedUponNodeRef) == true)
|
||||
if (eligibleForAction(actionedUponNodeRef))
|
||||
{
|
||||
recordFolderService.closeRecordFolder(actionedUponNodeRef);
|
||||
}
|
||||
@@ -57,7 +57,7 @@ public class CloseRecordFolderAction extends RMActionExecuterAbstractBase
|
||||
private boolean eligibleForAction(NodeRef actionedUponNodeRef)
|
||||
{
|
||||
boolean result = false;
|
||||
if (nodeService.exists(actionedUponNodeRef) == true &&
|
||||
if (nodeService.exists(actionedUponNodeRef) &&
|
||||
freezeService.isFrozen(actionedUponNodeRef) == false)
|
||||
{
|
||||
result = true;
|
||||
|
@@ -63,14 +63,14 @@ public class CompleteEventAction extends RMActionExecuterAbstractBase
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (nodeService.exists(actionedUponNodeRef) == true &&
|
||||
if (nodeService.exists(actionedUponNodeRef) &&
|
||||
freezeService.isFrozen(actionedUponNodeRef) == false)
|
||||
{
|
||||
String eventName = (String)action.getParameterValue(PARAM_EVENT_NAME);
|
||||
String eventCompletedBy = (String)action.getParameterValue(PARAM_EVENT_COMPLETED_BY);
|
||||
Date eventCompletedAt = (Date)action.getParameterValue(PARAM_EVENT_COMPLETED_AT);
|
||||
|
||||
if (this.nodeService.hasAspect(actionedUponNodeRef, ASPECT_DISPOSITION_LIFECYCLE) == true)
|
||||
if (this.nodeService.hasAspect(actionedUponNodeRef, ASPECT_DISPOSITION_LIFECYCLE))
|
||||
{
|
||||
// Get the next disposition action
|
||||
DispositionAction da = this.dispositionService.getNextDispositionAction(actionedUponNodeRef);
|
||||
@@ -125,7 +125,7 @@ public class CompleteEventAction extends RMActionExecuterAbstractBase
|
||||
List<EventCompletionDetails> events = da.getEventCompletionDetails();
|
||||
for (EventCompletionDetails event : events)
|
||||
{
|
||||
if (eventName.equals(event.getEventName()) == true)
|
||||
if (eventName.equals(event.getEventName()))
|
||||
{
|
||||
result = event;
|
||||
break;
|
||||
|
@@ -52,7 +52,7 @@ public class CreateDispositionScheduleAction extends RMActionExecuterAbstractBas
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (eligibleForAction(actionedUponNodeRef) == true)
|
||||
if (eligibleForAction(actionedUponNodeRef))
|
||||
{
|
||||
// Create the disposition schedule
|
||||
dispositionService.createDispositionSchedule(actionedUponNodeRef, null);
|
||||
@@ -75,8 +75,8 @@ public class CreateDispositionScheduleAction extends RMActionExecuterAbstractBas
|
||||
private boolean eligibleForAction(NodeRef actionedUponNodeRef)
|
||||
{
|
||||
boolean result = false;
|
||||
if (nodeService.exists(actionedUponNodeRef) == true &&
|
||||
filePlanService.isRecordCategory(actionedUponNodeRef) == true)
|
||||
if (nodeService.exists(actionedUponNodeRef) &&
|
||||
filePlanService.isRecordCategory(actionedUponNodeRef))
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
|
@@ -61,15 +61,15 @@ public class DeclareRecordAction extends RMActionExecuterAbstractBase
|
||||
@Override
|
||||
protected void executeImpl(final Action action, final NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (nodeService.exists(actionedUponNodeRef) == true &&
|
||||
recordService.isRecord(actionedUponNodeRef) == true &&
|
||||
if (nodeService.exists(actionedUponNodeRef) &&
|
||||
recordService.isRecord(actionedUponNodeRef) &&
|
||||
freezeService.isFrozen(actionedUponNodeRef) == false)
|
||||
{
|
||||
if (recordService.isDeclared(actionedUponNodeRef) == false)
|
||||
{
|
||||
List<String> missingProperties = new ArrayList<String>(5);
|
||||
// Aspect not already defined - check mandatory properties then add
|
||||
if (mandatoryPropertiesSet(actionedUponNodeRef, missingProperties) == true)
|
||||
if (mandatoryPropertiesSet(actionedUponNodeRef, missingProperties))
|
||||
{
|
||||
recordService.disablePropertyEditableCheck();
|
||||
try
|
||||
|
@@ -64,11 +64,11 @@ public class DelegateAction extends RMActionExecuterAbstractBase
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (nodeService.exists(actionedUponNodeRef) == true &&
|
||||
if (nodeService.exists(actionedUponNodeRef) &&
|
||||
(checkFrozen == false || freezeService.isFrozen(actionedUponNodeRef) == false))
|
||||
{
|
||||
// do the property subs (if any exist)
|
||||
if (allowParameterSubstitutions == true)
|
||||
if (allowParameterSubstitutions)
|
||||
{
|
||||
parameterProcessorComponent.process(action, delegateActionExecuter.getActionDefinition(), actionedUponNodeRef);
|
||||
}
|
||||
|
@@ -105,7 +105,7 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
|
||||
private boolean checkForDestroyRecordsCapability(NodeRef actionedUponNodeRef)
|
||||
{
|
||||
boolean result = true;
|
||||
if (AccessStatus.ALLOWED.equals(capabilityService.getCapability("DestroyRecords").hasPermission(actionedUponNodeRef)) == true)
|
||||
if (AccessStatus.ALLOWED.equals(capabilityService.getCapability("DestroyRecords").hasPermission(actionedUponNodeRef)))
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
@@ -124,7 +124,7 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
|
||||
executeRecordLevelDisposition(action, record);
|
||||
}
|
||||
|
||||
if (ghostingEnabled == true)
|
||||
if (ghostingEnabled)
|
||||
{
|
||||
nodeService.addAspect(recordFolder, ASPECT_GHOSTED, Collections.<QName, Serializable> emptyMap());
|
||||
}
|
||||
@@ -156,7 +156,7 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
|
||||
// Clear thumbnail content
|
||||
clearThumbnails(nodeRef);
|
||||
|
||||
if (ghostingEnabled == true)
|
||||
if (ghostingEnabled)
|
||||
{
|
||||
// Add the ghosted aspect
|
||||
nodeService.addAspect(nodeRef, ASPECT_GHOSTED, null);
|
||||
|
@@ -48,7 +48,7 @@ public class EditDispositionActionAsOfDateAction extends RMActionExecuterAbstrac
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (this.nodeService.hasAspect(actionedUponNodeRef, ASPECT_DISPOSITION_LIFECYCLE) == true)
|
||||
if (this.nodeService.hasAspect(actionedUponNodeRef, ASPECT_DISPOSITION_LIFECYCLE))
|
||||
{
|
||||
// Get the action parameter
|
||||
Date asOfDate = (Date)action.getParameterValue(PARAM_AS_OF_DATE);
|
||||
|
@@ -47,8 +47,8 @@ public class EditReviewAsOfDateAction extends RMActionExecuterAbstractBase
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (recordService.isRecord(actionedUponNodeRef) == true &&
|
||||
nodeService.hasAspect(actionedUponNodeRef, ASPECT_VITAL_RECORD) == true)
|
||||
if (recordService.isRecord(actionedUponNodeRef) &&
|
||||
nodeService.hasAspect(actionedUponNodeRef, ASPECT_VITAL_RECORD))
|
||||
{
|
||||
// Get the action parameter
|
||||
Date reviewAsOf = (Date)action.getParameterValue(PARAM_AS_OF_DATE);
|
||||
|
@@ -54,10 +54,10 @@ public class FreezeAction extends RMActionExecuterAbstractBase
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
// NOTE: we can only freeze records and record folders so ignore everything else
|
||||
if (nodeService.exists(actionedUponNodeRef) == true &&
|
||||
if (nodeService.exists(actionedUponNodeRef) &&
|
||||
nodeService.hasAspect(actionedUponNodeRef, ContentModel.ASPECT_PENDING_DELETE) == false &&
|
||||
(recordService.isRecord(actionedUponNodeRef) == true ||
|
||||
recordFolderService.isRecordFolder(actionedUponNodeRef) == true) &&
|
||||
(recordService.isRecord(actionedUponNodeRef) ||
|
||||
recordFolderService.isRecordFolder(actionedUponNodeRef)) &&
|
||||
freezeService.isFrozen(actionedUponNodeRef) == false)
|
||||
{
|
||||
freezeService.freeze((String) action.getParameterValue(PARAM_REASON), actionedUponNodeRef);
|
||||
|
@@ -49,7 +49,7 @@ public class OpenRecordFolderAction extends RMActionExecuterAbstractBase
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (nodeService.exists(actionedUponNodeRef) == true &&
|
||||
if (nodeService.exists(actionedUponNodeRef) &&
|
||||
freezeService.isFrozen(actionedUponNodeRef) == false)
|
||||
{
|
||||
// TODO move re-open logic into a service method
|
||||
@@ -64,10 +64,10 @@ public class OpenRecordFolderAction extends RMActionExecuterAbstractBase
|
||||
}
|
||||
}
|
||||
|
||||
if (recordFolderService.isRecordFolder(actionedUponNodeRef) == true)
|
||||
if (recordFolderService.isRecordFolder(actionedUponNodeRef))
|
||||
{
|
||||
Boolean isClosed = (Boolean) nodeService.getProperty(actionedUponNodeRef, PROP_IS_CLOSED);
|
||||
if (Boolean.TRUE.equals(isClosed) == true)
|
||||
if (Boolean.TRUE.equals(isClosed))
|
||||
{
|
||||
nodeService.setProperty(actionedUponNodeRef, PROP_IS_CLOSED, false);
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ public class RejectAction extends RMActionExecuterAbstractBase
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (nodeService.exists(actionedUponNodeRef) == true &&
|
||||
if (nodeService.exists(actionedUponNodeRef) &&
|
||||
freezeService.isFrozen(actionedUponNodeRef) == false &&
|
||||
nodeService.getProperty(actionedUponNodeRef, PROP_RECORD_ORIGINATING_LOCATION) != null)
|
||||
{
|
||||
|
@@ -79,9 +79,9 @@ public class RequestInfoAction extends RMActionExecuterAbstractBase
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (nodeService.exists(actionedUponNodeRef) == true &&
|
||||
if (nodeService.exists(actionedUponNodeRef) &&
|
||||
nodeService.hasAspect(actionedUponNodeRef, ContentModel.ASPECT_PENDING_DELETE) == false &&
|
||||
recordService.isRecord(actionedUponNodeRef) == true &&
|
||||
recordService.isRecord(actionedUponNodeRef) &&
|
||||
recordService.isDeclared(actionedUponNodeRef) == false)
|
||||
{
|
||||
String workflowDefinitionId = workflowService.getDefinitionByName(REQUEST_INFO_WORKFLOW_DEFINITION_NAME).getId();
|
||||
@@ -96,7 +96,7 @@ public class RequestInfoAction extends RMActionExecuterAbstractBase
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.info("Can't start the request information workflow for node '" + actionedUponNodeRef.toString() + "'." );
|
||||
logger.info("Can't start the request information workflow for node '" + actionedUponNodeRef.toString() + "'.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -84,7 +84,7 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||
Map<QName, AssociationDefinition> map = recordsManagementAdminService.getCustomReferenceDefinitions();
|
||||
for (Map.Entry<QName, AssociationDefinition> entry : map.entrySet())
|
||||
{
|
||||
if (compoundId.equals(entry.getValue().getTitle(dictionaryService)) == true)
|
||||
if (compoundId.equals(entry.getValue().getTitle(dictionaryService)))
|
||||
{
|
||||
relationshipQName = entry.getKey();
|
||||
break;
|
||||
@@ -107,12 +107,12 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||
// get node type
|
||||
nodeService.getType(actionedUponNodeRef);
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("split email:" + actionedUponNodeRef);
|
||||
}
|
||||
|
||||
if (recordService.isRecord(actionedUponNodeRef) == true)
|
||||
if (recordService.isRecord(actionedUponNodeRef))
|
||||
{
|
||||
if (recordService.isDeclared(actionedUponNodeRef) == false)
|
||||
{
|
||||
@@ -124,7 +124,7 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||
List<AssociationRef> refs = nodeService.getTargetAssocs(actionedUponNodeRef, ImapModel.ASSOC_IMAP_ATTACHMENT);
|
||||
if(refs.size() > 0)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("mail message has already been split - do nothing");
|
||||
}
|
||||
|
@@ -43,8 +43,8 @@ public class UnCutoffAction extends RMActionExecuterAbstractBase
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (nodeService.hasAspect(actionedUponNodeRef, ASPECT_DISPOSITION_LIFECYCLE) == true &&
|
||||
nodeService.hasAspect(actionedUponNodeRef, ASPECT_CUT_OFF) == true)
|
||||
if (nodeService.hasAspect(actionedUponNodeRef, ASPECT_DISPOSITION_LIFECYCLE) &&
|
||||
nodeService.hasAspect(actionedUponNodeRef, ASPECT_CUT_OFF))
|
||||
{
|
||||
// Get the last disposition action
|
||||
DispositionAction da = dispositionService.getLastCompletedDispostionAction(actionedUponNodeRef);
|
||||
@@ -58,7 +58,7 @@ public class UnCutoffAction extends RMActionExecuterAbstractBase
|
||||
|
||||
// Remove the cutoff aspect
|
||||
nodeService.removeAspect(actionedUponNodeRef, ASPECT_CUT_OFF);
|
||||
if (recordFolderService.isRecordFolder(actionedUponNodeRef) == true)
|
||||
if (recordFolderService.isRecordFolder(actionedUponNodeRef))
|
||||
{
|
||||
List<NodeRef> records = recordService.getRecords(actionedUponNodeRef);
|
||||
for (NodeRef record : records)
|
||||
|
@@ -44,12 +44,12 @@ public class UndeclareRecordAction extends RMActionExecuterAbstractBase
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (nodeService.exists(actionedUponNodeRef) == true)
|
||||
if (nodeService.exists(actionedUponNodeRef))
|
||||
{
|
||||
if (recordService.isRecord(actionedUponNodeRef) == true)
|
||||
if (recordService.isRecord(actionedUponNodeRef))
|
||||
{
|
||||
// repoen if already complete and not frozen
|
||||
if (recordService.isDeclared(actionedUponNodeRef) == true &&
|
||||
if (recordService.isDeclared(actionedUponNodeRef) &&
|
||||
freezeService.isFrozen(actionedUponNodeRef) == false)
|
||||
{
|
||||
// Remove the declared aspect
|
||||
|
@@ -53,7 +53,7 @@ public class UndoEventAction extends RMActionExecuterAbstractBase
|
||||
{
|
||||
String eventName = (String)action.getParameterValue(PARAM_EVENT_NAME);
|
||||
|
||||
if (this.nodeService.hasAspect(actionedUponNodeRef, ASPECT_DISPOSITION_LIFECYCLE) == true)
|
||||
if (this.nodeService.hasAspect(actionedUponNodeRef, ASPECT_DISPOSITION_LIFECYCLE))
|
||||
{
|
||||
// Get the next disposition action
|
||||
DispositionAction da = this.dispositionService.getNextDispositionAction(actionedUponNodeRef);
|
||||
@@ -96,7 +96,7 @@ public class UndoEventAction extends RMActionExecuterAbstractBase
|
||||
List<EventCompletionDetails> events = da.getEventCompletionDetails();
|
||||
for (EventCompletionDetails event : events)
|
||||
{
|
||||
if (eventName.equals(event.getEventName()) == true)
|
||||
if (eventName.equals(event.getEventName()))
|
||||
{
|
||||
result = event;
|
||||
break;
|
||||
@@ -131,7 +131,7 @@ public class UndoEventAction extends RMActionExecuterAbstractBase
|
||||
{
|
||||
for (EventCompletionDetails event : events)
|
||||
{
|
||||
if (event.isEventComplete() == true)
|
||||
if (event.isEventComplete())
|
||||
{
|
||||
eligible = true;
|
||||
break;
|
||||
|
@@ -291,7 +291,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
@Override
|
||||
public void registerAuditEvent(AuditEvent auditEvent)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Registering audit event " + auditEvent.getName());
|
||||
}
|
||||
@@ -475,7 +475,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
public void auditEvent(NodeRef nodeRef, String eventName, Map<QName, Serializable> before, Map<QName, Serializable> after, boolean immediate, boolean removeIfNoPropertyChanged)
|
||||
{
|
||||
// deal with immediate auditing if required
|
||||
if (immediate == true)
|
||||
if (immediate)
|
||||
{
|
||||
Map<String, Serializable> auditMap = buildAuditMap(nodeRef, eventName, before, after, removeIfNoPropertyChanged);
|
||||
auditComponent.recordAuditValues(RM_AUDIT_PATH_ROOT, auditMap);
|
||||
@@ -552,7 +552,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
Pair<Map<QName, Serializable>, Map<QName, Serializable>> deltaPair = PropertyMap.getBeforeAndAfterMapsForChanges(propertiesBefore, propertiesAfter);
|
||||
|
||||
// If both the first and second Map in the deltaPair are empty and removeOnNoPropertyChange is true, the entire auditMap is discarded so it won't be audited.
|
||||
if (deltaPair.getFirst().isEmpty() && deltaPair.getSecond().isEmpty() && removeOnNoPropertyChange == true)
|
||||
if (deltaPair.getFirst().isEmpty() && deltaPair.getSecond().isEmpty() && removeOnNoPropertyChange)
|
||||
{
|
||||
auditMap.clear();
|
||||
}
|
||||
@@ -1371,7 +1371,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
json.put("fullName", entry.getFullName() == null ? "": entry.getFullName());
|
||||
json.put("nodeRef", entry.getNodeRef() == null ? "": entry.getNodeRef());
|
||||
|
||||
if (entry.getEvent().equals("createPerson") == true && entry.getNodeRef() != null)
|
||||
if (entry.getEvent().equals("createPerson") && entry.getNodeRef() != null)
|
||||
{
|
||||
NodeRef nodeRef = entry.getNodeRef();
|
||||
String userName = (String)nodeService.getProperty(nodeRef, ContentModel.PROP_USERNAME);
|
||||
|
@@ -53,7 +53,7 @@ public class CopyAuditEvent extends AuditEvent implements OnCopyCompletePolicy
|
||||
boolean copyToNewNode,
|
||||
Map<NodeRef, NodeRef> copyMap)
|
||||
{
|
||||
if (copyToNewNode == true)
|
||||
if (copyToNewNode)
|
||||
{
|
||||
recordsManagementAuditService.auditEvent(targetNodeRef, getName());
|
||||
}
|
||||
|
@@ -105,7 +105,7 @@ public abstract class AbstractCapability extends RMSecurityCommon
|
||||
if (StringUtils.isBlank(title))
|
||||
{
|
||||
title = I18NUtil.getMessage("capability." + getName() + ".title");
|
||||
if (StringUtils.isBlank(title) == true)
|
||||
if (StringUtils.isBlank(title))
|
||||
{
|
||||
title = getName();
|
||||
}
|
||||
|
@@ -81,7 +81,7 @@ public class CapabilityServiceImpl implements CapabilityService
|
||||
public Set<Capability> getCapabilities(boolean includePrivate)
|
||||
{
|
||||
Set<Capability> result = null;
|
||||
if (includePrivate == true)
|
||||
if (includePrivate)
|
||||
{
|
||||
result = new HashSet<Capability>(capabilities.values());
|
||||
}
|
||||
|
@@ -125,7 +125,7 @@ public class RMEntryVoter extends RMSecurityCommon
|
||||
{
|
||||
MethodInvocation mi = (MethodInvocation)object;
|
||||
|
||||
if (TransactionalResourceHelper.isResourcePresent("voting") == true)
|
||||
if (TransactionalResourceHelper.isResourcePresent("voting"))
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
|
@@ -173,11 +173,11 @@ public class RMSecurityCommon implements ApplicationContextAware
|
||||
{
|
||||
int result = AccessDecisionVoter.ACCESS_ABSTAIN;
|
||||
|
||||
if (nodeService.hasAspect(nodeRef, RecordsManagementModel.ASPECT_FILE_PLAN_COMPONENT)== true)
|
||||
if (nodeService.hasAspect(nodeRef, RecordsManagementModel.ASPECT_FILE_PLAN_COMPONENT))
|
||||
{
|
||||
result = checkRmRead(nodeRef);
|
||||
}
|
||||
else if (allowDMRead == true)
|
||||
else if (allowDMRead)
|
||||
{
|
||||
// Check DM read for copy etc
|
||||
// DM does not grant - it can only deny
|
||||
|
@@ -214,7 +214,7 @@ public class DeclarativeCapability extends AbstractCapability
|
||||
{
|
||||
result = false;
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("FAIL: Condition " + condition.getName() + " failed for capability " + getName() + " on nodeRef " + nodeRef.toString());
|
||||
}
|
||||
@@ -258,7 +258,7 @@ public class DeclarativeCapability extends AbstractCapability
|
||||
for (String kindString : kinds)
|
||||
{
|
||||
FilePlanComponentKind kind = FilePlanComponentKind.valueOf(kindString);
|
||||
if (actualKind.equals(kind) == true)
|
||||
if (actualKind.equals(kind))
|
||||
{
|
||||
result = true;
|
||||
break;
|
||||
@@ -285,10 +285,10 @@ public class DeclarativeCapability extends AbstractCapability
|
||||
int result = AccessDecisionVoter.ACCESS_ABSTAIN;
|
||||
|
||||
// Check we are dealing with a file plan component
|
||||
if (getFilePlanService().isFilePlanComponent(nodeRef) == true)
|
||||
if (getFilePlanService().isFilePlanComponent(nodeRef))
|
||||
{
|
||||
// Check the kind of the object, the permissions and the conditions
|
||||
if (checkKinds(nodeRef) == true && checkPermissions(nodeRef) == true && checkConditions(nodeRef) == true)
|
||||
if (checkKinds(nodeRef) && checkPermissions(nodeRef) && checkConditions(nodeRef))
|
||||
{
|
||||
// Opportunity for child implementations to extend
|
||||
result = evaluateImpl(nodeRef);
|
||||
@@ -303,7 +303,7 @@ public class DeclarativeCapability extends AbstractCapability
|
||||
result = onEvaluate(nodeRef, result);
|
||||
|
||||
// log access denied to help with debug
|
||||
if (logger.isDebugEnabled() == true && AccessDecisionVoter.ACCESS_DENIED == result)
|
||||
if (logger.isDebugEnabled() && AccessDecisionVoter.ACCESS_DENIED == result)
|
||||
{
|
||||
logger.debug("FAIL: Capability " + getName() + " returned an Access Denied result during evaluation of node " + nodeRef.toString());
|
||||
}
|
||||
@@ -331,7 +331,7 @@ public class DeclarativeCapability extends AbstractCapability
|
||||
protected int evaluateImpl(NodeRef nodeRef)
|
||||
{
|
||||
int result = AccessDecisionVoter.ACCESS_GRANTED;
|
||||
if (isUndetermined == true)
|
||||
if (isUndetermined)
|
||||
{
|
||||
result = AccessDecisionVoter.ACCESS_ABSTAIN;
|
||||
}
|
||||
|
@@ -65,7 +65,7 @@ public class DeclarativeCompositeCapability extends DeclarativeCapability
|
||||
// Check each capability using 'OR' logic
|
||||
for (Capability capability : capabilities)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Evaluating child capability " + capability.getName() + " on nodeRef " + nodeRef.toString() + " for composite capability " + name);
|
||||
}
|
||||
@@ -82,7 +82,7 @@ public class DeclarativeCompositeCapability extends DeclarativeCapability
|
||||
}
|
||||
else
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Access denied for child capability " + capability.getName() + " on nodeRef " + nodeRef.toString() + " for composite capability " + name);
|
||||
}
|
||||
@@ -103,11 +103,11 @@ public class DeclarativeCompositeCapability extends DeclarativeCapability
|
||||
int result = AccessDecisionVoter.ACCESS_ABSTAIN;
|
||||
|
||||
// Check we are dealing with a file plan component
|
||||
if (getFilePlanService().isFilePlanComponent(source) == true &&
|
||||
getFilePlanService().isFilePlanComponent(target) == true)
|
||||
if (getFilePlanService().isFilePlanComponent(source) &&
|
||||
getFilePlanService().isFilePlanComponent(target))
|
||||
{
|
||||
// Check the kind of the object, the permissions and the conditions
|
||||
if (checkKinds(source) == true && checkPermissions(source) == true && checkConditions(source) == true)
|
||||
if (checkKinds(source) && checkPermissions(source) && checkConditions(source))
|
||||
{
|
||||
if (targetCapability != null)
|
||||
{
|
||||
|
@@ -55,7 +55,7 @@ public class AtLeastOneCondition extends AbstractCapabilityCondition
|
||||
{
|
||||
for (CapabilityCondition condition : conditions)
|
||||
{
|
||||
if (condition.evaluate(nodeRef) == true)
|
||||
if (condition.evaluate(nodeRef))
|
||||
{
|
||||
result = true;
|
||||
break;
|
||||
|
@@ -38,18 +38,18 @@ public class ClosedCapabilityCondition extends AbstractCapabilityCondition
|
||||
public boolean evaluate(NodeRef nodeRef)
|
||||
{
|
||||
boolean result = false;
|
||||
if (recordFolderService.isRecordFolder(nodeRef) == true)
|
||||
if (recordFolderService.isRecordFolder(nodeRef))
|
||||
{
|
||||
result = recordFolderService.isRecordFolderClosed(nodeRef);
|
||||
}
|
||||
else if (recordService.isRecord(nodeRef) == true)
|
||||
else if (recordService.isRecord(nodeRef))
|
||||
{
|
||||
List<ChildAssociationRef> assocs = nodeService.getParentAssocs(nodeRef, ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);
|
||||
for (ChildAssociationRef assoc : assocs)
|
||||
{
|
||||
NodeRef parent = assoc.getParentRef();
|
||||
if (recordFolderService.isRecordFolder(parent) == true &&
|
||||
recordFolderService.isRecordFolderClosed(parent) == true)
|
||||
if (recordFolderService.isRecordFolder(parent) &&
|
||||
recordFolderService.isRecordFolderClosed(parent))
|
||||
{
|
||||
result = true;
|
||||
break;
|
||||
|
@@ -31,7 +31,7 @@ public class DeclaredCapabilityCondition extends AbstractCapabilityCondition
|
||||
public boolean evaluate(NodeRef nodeRef)
|
||||
{
|
||||
boolean result = false;
|
||||
if (FilePlanComponentKind.RECORD.equals(filePlanService.getFilePlanComponentKind(nodeRef)) == true)
|
||||
if (FilePlanComponentKind.RECORD.equals(filePlanService.getFilePlanComponentKind(nodeRef)))
|
||||
{
|
||||
result = recordService.isDeclared(nodeRef);
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@ private boolean checkChildren = false;
|
||||
public boolean evaluate(NodeRef nodeRef)
|
||||
{
|
||||
boolean result = freezeService.isFrozen(nodeRef);
|
||||
if (result == false && checkChildren == true)
|
||||
if (result == false && checkChildren)
|
||||
{
|
||||
result = freezeService.hasFrozenChildren(nodeRef);
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ public class HasEventsCapabilityCondition extends AbstractCapabilityCondition
|
||||
{
|
||||
boolean result = false;
|
||||
|
||||
if (dispositionService.isDisposableItem(nodeRef) == true)
|
||||
if (dispositionService.isDisposableItem(nodeRef))
|
||||
{
|
||||
DispositionAction da = dispositionService.getNextDispositionAction(nodeRef);
|
||||
if (da != null)
|
||||
|
@@ -65,8 +65,8 @@ public class IsScheduledCapabilityCondition extends AbstractCapabilityCondition
|
||||
{
|
||||
// Get the disposition actions name
|
||||
String actionName = nextDispositionAction.getName();
|
||||
if (actionName.equals(dispositionAction) == true &&
|
||||
dispositionService.isNextDispositionActionEligible(nodeRef) == true)
|
||||
if (actionName.equals(dispositionAction) &&
|
||||
dispositionService.isNextDispositionActionEligible(nodeRef))
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
|
@@ -36,7 +36,7 @@ public class IsTransferAccessionCapabilityCondition extends AbstractCapabilityCo
|
||||
boolean result = false;
|
||||
|
||||
FilePlanComponentKind kind = filePlanService.getFilePlanComponentKind(nodeRef);
|
||||
if (FilePlanComponentKind.TRANSFER.equals(kind) == true)
|
||||
if (FilePlanComponentKind.TRANSFER.equals(kind))
|
||||
{
|
||||
Boolean value = (Boolean)nodeService.getProperty(nodeRef, PROP_TRANSFER_ACCESSION_INDICATOR);
|
||||
if (value != null)
|
||||
|
@@ -53,7 +53,7 @@ public class LastDispositionActionCondition extends AbstractCapabilityCondition
|
||||
boolean result = false;
|
||||
DispositionAction dispositionAction = dispositionService.getLastCompletedDispostionAction(nodeRef);
|
||||
if (dispositionAction != null &&
|
||||
dispositionActionName.equals(dispositionAction.getName()) == true)
|
||||
dispositionActionName.equals(dispositionAction.getName()))
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
|
@@ -32,12 +32,12 @@ public class VitalRecordOrFolderCapabilityCondition extends AbstractCapabilityCo
|
||||
{
|
||||
boolean result = false;
|
||||
|
||||
if (recordService.isRecord(nodeRef) == true)
|
||||
if (recordService.isRecord(nodeRef))
|
||||
{
|
||||
// Check the record for the vital record aspect
|
||||
result = nodeService.hasAspect(nodeRef, RecordsManagementModel.ASPECT_VITAL_RECORD);
|
||||
}
|
||||
else if (recordFolderService.isRecordFolder(nodeRef) == true)
|
||||
else if (recordFolderService.isRecordFolder(nodeRef))
|
||||
{
|
||||
// Check the folder for the vital record indicator
|
||||
Boolean value = (Boolean)nodeService.getProperty(nodeRef, RecordsManagementModel.PROP_VITAL_RECORD_INDICATOR);
|
||||
|
@@ -35,13 +35,13 @@ public final class ViewRecordsCapability extends DeclarativeCapability
|
||||
{
|
||||
if (nodeRef != null)
|
||||
{
|
||||
if (getFilePlanService().isFilePlanComponent(nodeRef) == true)
|
||||
if (getFilePlanService().isFilePlanComponent(nodeRef))
|
||||
{
|
||||
return checkRmRead(nodeRef);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("View Records capability abstains, because node is not a file plan component. (nodeRef=" + nodeRef.toString() + ")");
|
||||
}
|
||||
|
@@ -355,7 +355,7 @@ public class DataSetServiceImpl implements DataSetService, RecordsManagementMode
|
||||
logger.info("Bootstraping " + rmRoots.size() + " rm roots ...");
|
||||
for (NodeRef rmRoot : rmRoots)
|
||||
{
|
||||
if (permissionService.getInheritParentPermissions(rmRoot) == true)
|
||||
if (permissionService.getInheritParentPermissions(rmRoot))
|
||||
{
|
||||
logger.info("Updating permissions for rm root: " + rmRoot);
|
||||
permissionService.setInheritParentPermissions(rmRoot, false);
|
||||
@@ -397,7 +397,7 @@ public class DataSetServiceImpl implements DataSetService, RecordsManagementMode
|
||||
String containerName = (String) nodeService.getProperty(container, ContentModel.PROP_NAME);
|
||||
|
||||
// Set permissions
|
||||
if (permissionService.getInheritParentPermissions(container) == true)
|
||||
if (permissionService.getInheritParentPermissions(container))
|
||||
{
|
||||
logger.info("Updating permissions for record container: " + containerName);
|
||||
permissionService.setInheritParentPermissions(container, false);
|
||||
@@ -422,7 +422,7 @@ public class DataSetServiceImpl implements DataSetService, RecordsManagementMode
|
||||
String folderName = (String) nodeService.getProperty(recordFolder, ContentModel.PROP_NAME);
|
||||
|
||||
// Set permissions
|
||||
if (permissionService.getInheritParentPermissions(recordFolder) == true)
|
||||
if (permissionService.getInheritParentPermissions(recordFolder))
|
||||
{
|
||||
logger.info("Updating permissions for record folder: " + folderName);
|
||||
permissionService.setInheritParentPermissions(recordFolder, false);
|
||||
|
@@ -202,7 +202,7 @@ public class DispositionActionDefinitionImpl implements DispositionActionDefinit
|
||||
{
|
||||
boolean result = true;
|
||||
String value = (String)nodeService.getProperty(this.dispositionActionNodeRef, PROP_DISPOSITION_EVENT_COMBINATION);
|
||||
if (value != null && value.equals("and") == true)
|
||||
if (value != null && value.equals("and"))
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
|
@@ -178,7 +178,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
||||
if (nodeService.hasAspect(nodeRef, ASPECT_DISPOSITION_LIFECYCLE) == false)
|
||||
{
|
||||
DispositionSchedule di = getDispositionSchedule(nodeRef);
|
||||
if (di != null && di.isRecordLevelDisposition() == true)
|
||||
if (di != null && di.isRecordLevelDisposition())
|
||||
{
|
||||
nodeService.addAspect(nodeRef, ASPECT_DISPOSITION_LIFECYCLE, null);
|
||||
}
|
||||
@@ -231,7 +231,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
||||
for (DispositionProperty dispositionProperty : values)
|
||||
{
|
||||
boolean test = dispositionProperty.applies(isRecordLevel, dispositionAction);
|
||||
if (test == true)
|
||||
if (test)
|
||||
{
|
||||
result.add(dispositionProperty);
|
||||
}
|
||||
@@ -257,7 +257,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
||||
{
|
||||
DispositionSchedule di = null;
|
||||
NodeRef diNodeRef = null;
|
||||
if (isRecord(nodeRef) == true)
|
||||
if (isRecord(nodeRef))
|
||||
{
|
||||
// Get the record folders for the record
|
||||
List<NodeRef> recordFolders = recordFolderService.getRecordFolders(nodeRef);
|
||||
@@ -292,7 +292,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
||||
if (result == null)
|
||||
{
|
||||
NodeRef parent = this.nodeService.getPrimaryParent(nodeRef).getParentRef();
|
||||
if (parent != null && filePlanService.isRecordCategory(parent) == true)
|
||||
if (parent != null && filePlanService.isRecordCategory(parent))
|
||||
{
|
||||
result = getDispositionScheduleImpl(parent);
|
||||
}
|
||||
@@ -309,7 +309,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
||||
|
||||
// Check the noderef parameter
|
||||
ParameterCheck.mandatory("nodeRef", nodeRef);
|
||||
if (nodeService.exists(nodeRef) == true)
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
// Get the associated disposition schedule node reference
|
||||
NodeRef dsNodeRef = getAssociatedDispositionScheduleImpl(nodeRef);
|
||||
@@ -340,7 +340,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
||||
throw new AlfrescoRuntimeException("Can not find the associated disposition schedule for a non records management component. (nodeRef=" + nodeRef.toString() + ")");
|
||||
}
|
||||
|
||||
if (this.nodeService.hasAspect(nodeRef, ASPECT_SCHEDULED) == true)
|
||||
if (this.nodeService.hasAspect(nodeRef, ASPECT_SCHEDULED))
|
||||
{
|
||||
List<ChildAssociationRef> childAssocs = this.nodeService.getChildAssocs(nodeRef, ASSOC_DISPOSITION_SCHEDULE, RegexQNamePattern.MATCH_ALL);
|
||||
if (childAssocs.size() != 0)
|
||||
@@ -363,7 +363,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
||||
NodeRef result = null;
|
||||
|
||||
NodeRef dsNodeRef = dispositionSchedule.getNodeRef();
|
||||
if (nodeService.exists(dsNodeRef) == true)
|
||||
if (nodeService.exists(dsNodeRef))
|
||||
{
|
||||
List<ChildAssociationRef> assocs = this.nodeService.getParentAssocs(dsNodeRef, ASSOC_DISPOSITION_SCHEDULE, RegexQNamePattern.MATCH_ALL);
|
||||
if (assocs.size() != 0)
|
||||
@@ -372,7 +372,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
||||
{
|
||||
// TODO in the future we should be able to support disposition schedule reuse, but for now just warn that
|
||||
// only the first disposition schedule will be considered
|
||||
if (logger.isWarnEnabled() == true)
|
||||
if (logger.isWarnEnabled())
|
||||
{
|
||||
logger.warn("Disposition schedule has more than one associated records management container. " +
|
||||
"This is not currently supported so only the first container will be considered. " +
|
||||
@@ -434,9 +434,9 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
||||
List<NodeRef> result = new ArrayList<NodeRef>(items.size());
|
||||
for (NodeRef item : items)
|
||||
{
|
||||
if (recordFolderService.isRecordFolder(item) == true)
|
||||
if (recordFolderService.isRecordFolder(item))
|
||||
{
|
||||
if (isRecordLevelDisposition == true)
|
||||
if (isRecordLevelDisposition)
|
||||
{
|
||||
result.addAll(recordService.getRecords(item));
|
||||
}
|
||||
@@ -445,7 +445,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
||||
result.add(item);
|
||||
}
|
||||
}
|
||||
else if (filePlanService.isRecordCategory(item) == true)
|
||||
else if (filePlanService.isRecordCategory(item))
|
||||
{
|
||||
if (getAssociatedDispositionScheduleImpl(item) == null)
|
||||
{
|
||||
@@ -564,7 +564,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
||||
public void removeDispositionActionDefinition(DispositionSchedule schedule, DispositionActionDefinition actionDefinition)
|
||||
{
|
||||
// check first whether action definitions can be removed
|
||||
if (hasDisposableItems(schedule) == true)
|
||||
if (hasDisposableItems(schedule))
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Can not remove action definitions from schedule '" +
|
||||
schedule.getNodeRef() + "' as one or more record or record folders are present.");
|
||||
@@ -703,13 +703,13 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
||||
DispositionSchedule di = getDispositionSchedule(nodeRef);
|
||||
NodeRef nextDa = getNextDispositionActionNodeRef(nodeRef);
|
||||
if (di != null &&
|
||||
this.nodeService.hasAspect(nodeRef, ASPECT_DISPOSITION_LIFECYCLE) == true &&
|
||||
this.nodeService.hasAspect(nodeRef, ASPECT_DISPOSITION_LIFECYCLE) &&
|
||||
nextDa != null)
|
||||
{
|
||||
// If it has an asOf date and it is greater than now the action is eligible
|
||||
Date asOf = (Date)this.nodeService.getProperty(nextDa, PROP_DISPOSITION_AS_OF);
|
||||
if (asOf != null &&
|
||||
asOf.before(new Date()) == true)
|
||||
asOf.before(new Date()))
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
@@ -733,10 +733,10 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
||||
isComplete = isCompleteValue.booleanValue();
|
||||
|
||||
// implement AND and OR combination of event completions
|
||||
if (isComplete == true)
|
||||
if (isComplete)
|
||||
{
|
||||
result = true;
|
||||
if (firstComplete == true)
|
||||
if (firstComplete)
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -855,7 +855,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
||||
{
|
||||
// Get the current action node
|
||||
NodeRef currentDispositionAction = null;
|
||||
if (nodeService.hasAspect(nodeRef, ASPECT_DISPOSITION_LIFECYCLE) == true)
|
||||
if (nodeService.hasAspect(nodeRef, ASPECT_DISPOSITION_LIFECYCLE))
|
||||
{
|
||||
List<ChildAssociationRef> assocs = nodeService.getChildAssocs(nodeRef, ASSOC_NEXT_DISPOSITION_ACTION, RegexQNamePattern.MATCH_ALL);
|
||||
if (assocs.size() > 0)
|
||||
|
@@ -152,8 +152,8 @@ public class DispositionProperty extends BaseBehaviourBean
|
||||
{
|
||||
boolean result = false;
|
||||
|
||||
if ((isRecordLevel == true && appliesToRecordLevel == true) ||
|
||||
(isRecordLevel == false && appliesToFolderLevel == true))
|
||||
if ((isRecordLevel && appliesToRecordLevel) ||
|
||||
(isRecordLevel == false && appliesToFolderLevel))
|
||||
{
|
||||
if (excludedDispositionActions != null && excludedDispositionActions.size() != 0)
|
||||
{
|
||||
@@ -186,10 +186,10 @@ public class DispositionProperty extends BaseBehaviourBean
|
||||
final Map<QName, Serializable> before,
|
||||
final Map<QName, Serializable> after)
|
||||
{
|
||||
if (nodeService.exists(nodeRef) == true)
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
// has the property we care about changed?
|
||||
if (isPropertyUpdated(before, after) == true)
|
||||
if (isPropertyUpdated(before, after))
|
||||
{
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||
{
|
||||
@@ -206,7 +206,7 @@ public class DispositionProperty extends BaseBehaviourBean
|
||||
if (daDefinition != null)
|
||||
{
|
||||
// check whether the next disposition action matches this disposition property
|
||||
if (propertyName.equals(daDefinition.getPeriodProperty()) == true)
|
||||
if (propertyName.equals(daDefinition.getPeriodProperty()))
|
||||
{
|
||||
Period period = daDefinition.getPeriod();
|
||||
Date updatedAsOf = period.getNextDate(updatedDateValue);
|
||||
|
@@ -84,7 +84,7 @@ public class DOD5015RecordAspect extends BaseBehaviourBean
|
||||
boolean result = false;
|
||||
|
||||
NodeRef filePlan = filePlanService.getFilePlan(record);
|
||||
if (filePlan != null && nodeService.exists(filePlan) == true)
|
||||
if (filePlan != null && nodeService.exists(filePlan))
|
||||
{
|
||||
result = TYPE_DOD_5015_FILE_PLAN.equals(nodeService.getType(filePlan));
|
||||
}
|
||||
|
@@ -150,7 +150,7 @@ public class CustomEmailMappingServiceImpl extends AbstractLifecycleBean impleme
|
||||
if (customMappings == null)
|
||||
{
|
||||
// if we have a config file
|
||||
if (nodeService.exists(CONFIG_NODE_REF) == true)
|
||||
if (nodeService.exists(CONFIG_NODE_REF))
|
||||
{
|
||||
// load the contents of the config file
|
||||
customMappings = loadConfig();
|
||||
@@ -213,7 +213,7 @@ public class CustomEmailMappingServiceImpl extends AbstractLifecycleBean impleme
|
||||
|
||||
// check whether we already have this mapping or not
|
||||
Set<CustomMapping> customMappings = getCustomMappings();
|
||||
if (customMappings.contains(customMapping) == true)
|
||||
if (customMappings.contains(customMapping))
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Can not add custom email mapping, because duplicate mapping already exists.");
|
||||
}
|
||||
@@ -244,7 +244,7 @@ public class CustomEmailMappingServiceImpl extends AbstractLifecycleBean impleme
|
||||
|
||||
// check whether we already have this mapping or not
|
||||
Set<CustomMapping> customMappings = getCustomMappings();
|
||||
if (customMappings.contains(customMapping) == true)
|
||||
if (customMappings.contains(customMapping))
|
||||
{
|
||||
// else remove the custom mapping (since we have already called getCustomMapping we can be sure
|
||||
// the member variable is populated)
|
||||
@@ -402,7 +402,7 @@ public class CustomEmailMappingServiceImpl extends AbstractLifecycleBean impleme
|
||||
catch (Throwable e)
|
||||
{
|
||||
// log a warning
|
||||
if (logger.isWarnEnabled() == true)
|
||||
if (logger.isWarnEnabled())
|
||||
{
|
||||
logger.warn(e.getMessage());
|
||||
}
|
||||
|
@@ -66,7 +66,7 @@ public class RFC822MetadataExtracter extends org.alfresco.repo.content.metadata.
|
||||
Map<QName, Serializable> clone = new HashMap<QName, Serializable>(systemProperties);
|
||||
for (QName propName : clone.keySet())
|
||||
{
|
||||
if (RecordsManagementModel.RM_URI.equals(propName.getNamespaceURI()) == true)
|
||||
if (RecordsManagementModel.RM_URI.equals(propName.getNamespaceURI()))
|
||||
{
|
||||
systemProperties.remove(propName);
|
||||
}
|
||||
|
@@ -109,7 +109,7 @@ public class OnReferenceCreateEventType extends SimpleRecordsManagementEventType
|
||||
public Object doWork() throws Exception
|
||||
{
|
||||
// Check whether it is the reference type we care about
|
||||
if (reference.equals(OnReferenceCreateEventType.this.reference) == true)
|
||||
if (reference.equals(OnReferenceCreateEventType.this.reference))
|
||||
{
|
||||
DispositionAction da = dispositionService.getNextDispositionAction(toNodeRef);
|
||||
if (da != null)
|
||||
@@ -119,7 +119,7 @@ public class OnReferenceCreateEventType extends SimpleRecordsManagementEventType
|
||||
{
|
||||
RecordsManagementEvent rmEvent = recordsManagementEventService.getEvent(event.getEventName());
|
||||
if (event.isEventComplete() == false &&
|
||||
rmEvent.getType().equals(getName()) == true)
|
||||
rmEvent.getType().equals(getName()))
|
||||
{
|
||||
// Complete the event
|
||||
Map<String, Serializable> params = new HashMap<String, Serializable>(3);
|
||||
|
@@ -147,17 +147,17 @@ public class RecordsManagementEventServiceImpl implements RecordsManagementEvent
|
||||
|
||||
boolean canCreateEvent = true;
|
||||
|
||||
if (existsEvent(eventName) == true)
|
||||
if (existsEvent(eventName))
|
||||
{
|
||||
canCreateEvent = false;
|
||||
}
|
||||
|
||||
if (canCreateEvent == true)
|
||||
if (canCreateEvent)
|
||||
{
|
||||
for (Iterator iterator = getEventMap().values().iterator(); iterator.hasNext();)
|
||||
{
|
||||
RecordsManagementEvent recordsManagementEvent = (RecordsManagementEvent) iterator.next();
|
||||
if (recordsManagementEvent.getDisplayLabel().equalsIgnoreCase(eventDisplayLabel) == true)
|
||||
if (recordsManagementEvent.getDisplayLabel().equalsIgnoreCase(eventDisplayLabel))
|
||||
{
|
||||
canCreateEvent = false;
|
||||
break;
|
||||
@@ -188,9 +188,9 @@ public class RecordsManagementEventServiceImpl implements RecordsManagementEvent
|
||||
for (Iterator iterator = getEventMap().values().iterator(); iterator.hasNext();)
|
||||
{
|
||||
RecordsManagementEvent recordsManagementEvent = (RecordsManagementEvent) iterator.next();
|
||||
if (recordsManagementEvent.getDisplayLabel().equalsIgnoreCase(eventDisplayLabel) == true)
|
||||
if (recordsManagementEvent.getDisplayLabel().equalsIgnoreCase(eventDisplayLabel))
|
||||
{
|
||||
if (recordsManagementEvent.getName().equalsIgnoreCase(eventName) == true)
|
||||
if (recordsManagementEvent.getName().equalsIgnoreCase(eventName))
|
||||
{
|
||||
if (recordsManagementEvent.getType().equalsIgnoreCase(eventType) == false)
|
||||
{
|
||||
|
@@ -179,8 +179,8 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
|
||||
public boolean isFilePlanComponent(NodeRef nodeRef)
|
||||
{
|
||||
boolean result = false;
|
||||
if (getInternalNodeService().exists(nodeRef) == true &&
|
||||
getInternalNodeService().hasAspect(nodeRef, ASPECT_FILE_PLAN_COMPONENT) == true)
|
||||
if (getInternalNodeService().exists(nodeRef) &&
|
||||
getInternalNodeService().hasAspect(nodeRef, ASPECT_FILE_PLAN_COMPONENT))
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
@@ -194,23 +194,23 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
|
||||
{
|
||||
FilePlanComponentKind result = null;
|
||||
|
||||
if (isFilePlanComponent(nodeRef) == true)
|
||||
if (isFilePlanComponent(nodeRef))
|
||||
{
|
||||
result = FilePlanComponentKind.FILE_PLAN_COMPONENT;
|
||||
|
||||
if (isFilePlan(nodeRef) == true)
|
||||
if (isFilePlan(nodeRef))
|
||||
{
|
||||
result = FilePlanComponentKind.FILE_PLAN;
|
||||
}
|
||||
else if (isRecordCategory(nodeRef) == true)
|
||||
else if (isRecordCategory(nodeRef))
|
||||
{
|
||||
result = FilePlanComponentKind.RECORD_CATEGORY;
|
||||
}
|
||||
else if (getRecordFolderService().isRecordFolder(nodeRef) == true)
|
||||
else if (getRecordFolderService().isRecordFolder(nodeRef))
|
||||
{
|
||||
result = FilePlanComponentKind.RECORD_FOLDER;
|
||||
}
|
||||
else if (getRecordService().isRecord(nodeRef) == true)
|
||||
else if (getRecordService().isRecord(nodeRef))
|
||||
{
|
||||
result = FilePlanComponentKind.RECORD;
|
||||
}
|
||||
@@ -222,23 +222,23 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
|
||||
{
|
||||
result = FilePlanComponentKind.HOLD_CONTAINER_CHILD;
|
||||
}
|
||||
else if (getFreezeService().isHold(nodeRef) == true)
|
||||
else if (getFreezeService().isHold(nodeRef))
|
||||
{
|
||||
result = FilePlanComponentKind.HOLD;
|
||||
}
|
||||
else if (getTransferService().isTransfer(nodeRef) == true)
|
||||
else if (getTransferService().isTransfer(nodeRef))
|
||||
{
|
||||
result = FilePlanComponentKind.TRANSFER;
|
||||
}
|
||||
else if (instanceOf(nodeRef, TYPE_DISPOSITION_SCHEDULE) == true || instanceOf(nodeRef, TYPE_DISPOSITION_ACTION_DEFINITION) == true)
|
||||
else if (instanceOf(nodeRef, TYPE_DISPOSITION_SCHEDULE) || instanceOf(nodeRef, TYPE_DISPOSITION_ACTION_DEFINITION))
|
||||
{
|
||||
result = FilePlanComponentKind.DISPOSITION_SCHEDULE;
|
||||
}
|
||||
else if (instanceOf(nodeRef, TYPE_UNFILED_RECORD_CONTAINER) == true)
|
||||
else if (instanceOf(nodeRef, TYPE_UNFILED_RECORD_CONTAINER))
|
||||
{
|
||||
result = FilePlanComponentKind.UNFILED_RECORD_CONTAINER;
|
||||
}
|
||||
else if (instanceOf(nodeRef, TYPE_UNFILED_RECORD_CONTAINER_CHILD) == true)
|
||||
else if (instanceOf(nodeRef, TYPE_UNFILED_RECORD_CONTAINER_CHILD))
|
||||
{
|
||||
result = FilePlanComponentKind.UNFILED_RECORD_CONTAINER_CHILD;
|
||||
}
|
||||
@@ -255,36 +255,36 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
|
||||
{
|
||||
FilePlanComponentKind result = null;
|
||||
|
||||
if (ASPECT_FILE_PLAN_COMPONENT.equals(type) == true)
|
||||
if (ASPECT_FILE_PLAN_COMPONENT.equals(type))
|
||||
{
|
||||
result = FilePlanComponentKind.FILE_PLAN_COMPONENT;
|
||||
}
|
||||
else if (dictionaryService.isSubClass(type, ASPECT_RECORD) == true)
|
||||
else if (dictionaryService.isSubClass(type, ASPECT_RECORD))
|
||||
{
|
||||
result = FilePlanComponentKind.RECORD;
|
||||
}
|
||||
else if (dictionaryService.isSubClass(type, TYPE_FILE_PLAN) == true)
|
||||
else if (dictionaryService.isSubClass(type, TYPE_FILE_PLAN))
|
||||
{
|
||||
result = FilePlanComponentKind.FILE_PLAN;
|
||||
}
|
||||
else if (dictionaryService.isSubClass(type, TYPE_RECORD_CATEGORY) == true)
|
||||
else if (dictionaryService.isSubClass(type, TYPE_RECORD_CATEGORY))
|
||||
{
|
||||
result = FilePlanComponentKind.RECORD_CATEGORY;
|
||||
}
|
||||
else if (dictionaryService.isSubClass(type, TYPE_RECORD_FOLDER) == true)
|
||||
else if (dictionaryService.isSubClass(type, TYPE_RECORD_FOLDER))
|
||||
{
|
||||
result = FilePlanComponentKind.RECORD_FOLDER;
|
||||
}
|
||||
else if (dictionaryService.isSubClass(type, TYPE_HOLD) == true)
|
||||
else if (dictionaryService.isSubClass(type, TYPE_HOLD))
|
||||
{
|
||||
result = FilePlanComponentKind.HOLD;
|
||||
}
|
||||
else if (dictionaryService.isSubClass(type, TYPE_TRANSFER) == true)
|
||||
else if (dictionaryService.isSubClass(type, TYPE_TRANSFER))
|
||||
{
|
||||
result = FilePlanComponentKind.TRANSFER;
|
||||
}
|
||||
else if (dictionaryService.isSubClass(type, TYPE_DISPOSITION_SCHEDULE) == true ||
|
||||
dictionaryService.isSubClass(type, TYPE_DISPOSITION_ACTION_DEFINITION) == true)
|
||||
else if (dictionaryService.isSubClass(type, TYPE_DISPOSITION_SCHEDULE) ||
|
||||
dictionaryService.isSubClass(type, TYPE_DISPOSITION_ACTION_DEFINITION))
|
||||
{
|
||||
result = FilePlanComponentKind.DISPOSITION_SCHEDULE;
|
||||
}
|
||||
@@ -326,7 +326,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
|
||||
public boolean handle(Pair<Long, NodeRef> nodePair)
|
||||
{
|
||||
NodeRef nodeRef = nodePair.getSecond();
|
||||
if (storeRef.equals(nodeRef.getStoreRef()) == true)
|
||||
if (storeRef.equals(nodeRef.getStoreRef()))
|
||||
{
|
||||
results.add(nodeRef);
|
||||
}
|
||||
@@ -348,10 +348,10 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
|
||||
SiteInfo siteInfo = getSiteService().getSite(siteId);
|
||||
if (siteInfo != null)
|
||||
{
|
||||
if (getSiteService().hasContainer(siteId, FILE_PLAN_CONTAINER) == true)
|
||||
if (getSiteService().hasContainer(siteId, FILE_PLAN_CONTAINER))
|
||||
{
|
||||
NodeRef nodeRef = getSiteService().getContainer(siteId, FILE_PLAN_CONTAINER);
|
||||
if (instanceOf(nodeRef, TYPE_FILE_PLAN) == true)
|
||||
if (instanceOf(nodeRef, TYPE_FILE_PLAN))
|
||||
{
|
||||
filePlan = nodeRef;
|
||||
}
|
||||
@@ -517,7 +517,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
|
||||
|
||||
// Check the parent is not already an RM component node
|
||||
// ie: you can't create a rm root in an existing rm hierarchy
|
||||
if (isFilePlanComponent(parent) == true)
|
||||
if (isFilePlanComponent(parent))
|
||||
{
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_DUP_ROOT));
|
||||
}
|
||||
@@ -742,16 +742,16 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
|
||||
NodeRef child = assoc.getChildRef();
|
||||
QName childType = nodeService.getType(child);
|
||||
if (typeFilter == null ||
|
||||
typeFilter.equals(childType) == true ||
|
||||
dictionaryService.isSubClass(childType, typeFilter) == true)
|
||||
typeFilter.equals(childType) ||
|
||||
dictionaryService.isSubClass(childType, typeFilter))
|
||||
{
|
||||
result.add(child);
|
||||
}
|
||||
|
||||
// Inspect the containers and add children if deep
|
||||
if (deep == true &&
|
||||
(TYPE_RECORD_CATEGORY.equals(childType) == true ||
|
||||
dictionaryService.isSubClass(childType, TYPE_RECORD_CATEGORY) == true))
|
||||
if (deep &&
|
||||
(TYPE_RECORD_CATEGORY.equals(childType) ||
|
||||
dictionaryService.isSubClass(childType, TYPE_RECORD_CATEGORY)))
|
||||
{
|
||||
result.addAll(getContained(child, typeFilter, deep));
|
||||
}
|
||||
|
@@ -142,7 +142,7 @@ public abstract class RecordsManagementFormFilter<ItemType> extends AbstractFilt
|
||||
|
||||
form.addField(field);
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Adding custom property .. " + prop.getName().toString() + " .. with value " + value + ".. to group .. " + setId);
|
||||
}
|
||||
|
@@ -103,13 +103,13 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
||||
Form form,
|
||||
Map<String, Object> context)
|
||||
{
|
||||
if (filePlanService.isFilePlanComponent(nodeRef) == true)
|
||||
if (filePlanService.isFilePlanComponent(nodeRef))
|
||||
{
|
||||
// add all the custom properties
|
||||
addCustomPropertyFieldsToGroup(form, nodeRef);
|
||||
|
||||
FilePlanComponentKind kind = filePlanService.getFilePlanComponentKind(nodeRef);
|
||||
if (FilePlanComponentKind.RECORD.equals(kind) == true)
|
||||
if (FilePlanComponentKind.RECORD.equals(kind))
|
||||
{
|
||||
// add all the record meta-data aspect properties
|
||||
addRecordMetadataPropertyFieldsToGroup(form, nodeRef);
|
||||
@@ -129,7 +129,7 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
||||
protectEmailExtractedFields(form, nodeRef);
|
||||
}
|
||||
}
|
||||
else if (FilePlanComponentKind.RECORD_FOLDER.equals(kind) == true)
|
||||
else if (FilePlanComponentKind.RECORD_FOLDER.equals(kind))
|
||||
{
|
||||
// add the supplemental marking list property
|
||||
forceSupplementalMarkingListProperty(form, nodeRef);
|
||||
@@ -137,13 +137,13 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
||||
// add required transient properties
|
||||
addTransientProperties(form, nodeRef);
|
||||
}
|
||||
else if (FilePlanComponentKind.DISPOSITION_SCHEDULE.equals(kind) == true)
|
||||
else if (FilePlanComponentKind.DISPOSITION_SCHEDULE.equals(kind))
|
||||
{
|
||||
// use the same mechanism used to determine whether steps can be removed from the
|
||||
// schedule to determine whether the disposition level can be changed i.e. record
|
||||
// level or folder level.
|
||||
DispositionSchedule schedule = new DispositionScheduleImpl(this.rmServiceRegistry, this.nodeService, nodeRef);
|
||||
if (dispositionService.hasDisposableItems(schedule) == true)
|
||||
if (dispositionService.hasDisposableItems(schedule))
|
||||
{
|
||||
protectRecordLevelDispositionPropertyField(form);
|
||||
}
|
||||
@@ -163,7 +163,7 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
||||
|
||||
// Compatibility support: don't show category properties if node of type series
|
||||
QName type = nodeService.getType(nodeRef);
|
||||
if (CompatibilityModel.TYPE_RECORD_SERIES.equals(type) == true)
|
||||
if (CompatibilityModel.TYPE_RECORD_SERIES.equals(type))
|
||||
{
|
||||
// remove record category from the list of customisable types to apply to the form
|
||||
customisables.remove(TYPE_RECORD_CATEGORY);
|
||||
@@ -186,7 +186,7 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
||||
|
||||
for (QName aspect : aspects)
|
||||
{
|
||||
if (nodeService.hasAspect(nodeRef, aspect) == true)
|
||||
if (nodeService.hasAspect(nodeRef, aspect))
|
||||
{
|
||||
String aspectName = aspect.getPrefixedQName(namespaceService).toPrefixString().replace(":", "-");
|
||||
String setId = RM_METADATA_PREFIX + aspectName;
|
||||
@@ -240,7 +240,7 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
||||
*/
|
||||
protected void addTransientProperties(Form form, NodeRef nodeRef)
|
||||
{
|
||||
if (recordService.isRecord(nodeRef) == true)
|
||||
if (recordService.isRecord(nodeRef))
|
||||
{
|
||||
addTransientPropertyField(form, TRANSIENT_DECLARED, DataTypeDefinition.BOOLEAN, recordService.isDeclared(nodeRef));
|
||||
}
|
||||
@@ -308,7 +308,7 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
||||
prefixName = fieldDef.getName();
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Checking property " + prefixName + " is editable by user " + AuthenticationUtil.getFullyAuthenticatedUser());
|
||||
}
|
||||
@@ -316,7 +316,7 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
||||
QName qname = QName.createQName(prefixName, namespaceService);
|
||||
if (recordService.isPropertyEditable(nodeRef, qname) == false)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... protected property");
|
||||
}
|
||||
@@ -360,7 +360,7 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
||||
}
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Set email related fields to be protected");
|
||||
}
|
||||
|
@@ -93,7 +93,7 @@ public class RecordsManagementTypeFormFilter extends RecordsManagementFormFilter
|
||||
Map<String, Object> context)
|
||||
{
|
||||
QName typeName = type.getName();
|
||||
if (rmAdminService.isCustomisable(typeName) == true)
|
||||
if (rmAdminService.isCustomisable(typeName))
|
||||
{
|
||||
addCustomRMProperties(typeName, form);
|
||||
}
|
||||
@@ -102,7 +102,7 @@ public class RecordsManagementTypeFormFilter extends RecordsManagementFormFilter
|
||||
Set<QName> aspects = type.getDefaultAspectNames();
|
||||
for (QName aspect : aspects)
|
||||
{
|
||||
if (rmAdminService.isCustomisable(aspect) == true)
|
||||
if (rmAdminService.isCustomisable(aspect))
|
||||
{
|
||||
addCustomRMProperties(aspect, form);
|
||||
}
|
||||
@@ -113,17 +113,17 @@ public class RecordsManagementTypeFormFilter extends RecordsManagementFormFilter
|
||||
for (FieldDefinition fieldDef : fieldDefs)
|
||||
{
|
||||
String prefixName = fieldDef.getName();
|
||||
if (prefixName.equals("rma:identifier") == true)
|
||||
if (prefixName.equals("rma:identifier"))
|
||||
{
|
||||
String defaultId = identifierService.generateIdentifier(typeName, null);
|
||||
fieldDef.setDefaultValue(defaultId);
|
||||
}
|
||||
// NOTE: we set these defaults in the form for backwards compatibility reasons (RM-753)
|
||||
else if (prefixName.equals("rma:vitalRecordIndicator") == true)
|
||||
else if (prefixName.equals("rma:vitalRecordIndicator"))
|
||||
{
|
||||
fieldDef.setDefaultValue(Boolean.FALSE.toString());
|
||||
}
|
||||
else if (prefixName.equals("rma:reviewPeriod") == true)
|
||||
else if (prefixName.equals("rma:reviewPeriod"))
|
||||
{
|
||||
fieldDef.setDefaultValue("none|0");
|
||||
}
|
||||
@@ -147,7 +147,7 @@ public class RecordsManagementTypeFormFilter extends RecordsManagementFormFilter
|
||||
|
||||
if (customProps != null && customProps.isEmpty() == false)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Found " + customProps.size() + " custom properties for customisable type " + customisableType);
|
||||
}
|
||||
|
@@ -612,7 +612,7 @@ public class FreezeServiceImpl extends ServiceBaseImpl
|
||||
|
||||
// Remove the freezes on the child records as long as there is no other
|
||||
// hold referencing them
|
||||
if (recordFolderService.isRecordFolder(nodeRef) == true)
|
||||
if (recordFolderService.isRecordFolder(nodeRef))
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
|
@@ -135,7 +135,7 @@ public class IdentifierServiceImpl implements IdentifierService
|
||||
IdentifierGenerator idGen = lookupGenerator(type);
|
||||
if (idGen == null)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Unable to generate id for object of type " + type.toString() + ", because no identifier generator was found.");
|
||||
}
|
||||
@@ -163,7 +163,7 @@ public class IdentifierServiceImpl implements IdentifierService
|
||||
{
|
||||
ParameterCheck.mandatory("type", type);
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Looking for idGenerator for type " + type.toString());
|
||||
}
|
||||
@@ -185,7 +185,7 @@ public class IdentifierServiceImpl implements IdentifierService
|
||||
}
|
||||
else
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Unable to find type definition for " + type.toString() + " when generating identifier.");
|
||||
}
|
||||
|
@@ -95,7 +95,7 @@ public class NotifyOfRecordsDueForReviewJobExecuter extends RecordsManagementJob
|
||||
final List<NodeRef> resultNodes = results.getNodeRefs();
|
||||
results.close();
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Found " + resultNodes.size() + " nodes due for review and without notification.");
|
||||
}
|
||||
|
@@ -109,7 +109,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
||||
*/
|
||||
public void executeImpl()
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Job Starting");
|
||||
}
|
||||
@@ -118,7 +118,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
||||
{
|
||||
public Object doWork() throws Exception
|
||||
{
|
||||
if (rmLoaded() == true)
|
||||
if (rmLoaded())
|
||||
{
|
||||
// Get a list of the nodes that have updates that need to be published
|
||||
List<NodeRef> nodeRefs = getUpdatedNodes();
|
||||
@@ -126,14 +126,14 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
||||
// Deal with each updated disposition action in turn
|
||||
for (NodeRef nodeRef : nodeRefs)
|
||||
{
|
||||
if (nodeService.exists(nodeRef) == true)
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
// Mark the update node as publishing in progress
|
||||
markPublishInProgress(nodeRef);
|
||||
try
|
||||
{
|
||||
Date start = new Date();
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Starting publish of updates ...");
|
||||
logger.debug(" - for " + nodeRef.toString());
|
||||
@@ -144,7 +144,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
||||
publishUpdates(nodeRef);
|
||||
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
Date end = new Date();
|
||||
long duration = end.getTime() - start.getTime();
|
||||
@@ -166,7 +166,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
||||
};
|
||||
}, AuthenticationUtil.getSystemUserName());
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Job Finished");
|
||||
}
|
||||
@@ -209,7 +209,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
||||
sb.append("@rma\\:").append(PROP_PUBLISH_IN_PROGRESS.getLocalName()).append(":false ");
|
||||
String query = sb.toString();
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Executing query " + query);
|
||||
}
|
||||
@@ -229,7 +229,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
||||
results.close();
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Found " + resultNodes.size() + " disposition action definitions updates awaiting publishing.");
|
||||
}
|
||||
@@ -253,7 +253,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
||||
@Override
|
||||
public Void execute() throws Throwable
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Marking updated node as publish in progress. (node=" + nodeRef.toString() + ")");
|
||||
}
|
||||
@@ -261,7 +261,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
||||
behaviourFilter.disableBehaviour(nodeRef, TYPE_DISPOSITION_ACTION_DEFINITION);
|
||||
try
|
||||
{
|
||||
if (nodeService.exists(nodeRef) == true)
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
// Mark the node as publish in progress
|
||||
nodeService.setProperty(nodeRef, PROP_PUBLISH_IN_PROGRESS, true);
|
||||
@@ -297,7 +297,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
||||
|
||||
if (updateTo != null)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Node update to " + updateTo + " (noderef=" + nodeRef.toString() + ")");
|
||||
}
|
||||
@@ -306,14 +306,14 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
||||
PublishExecutor executor = publishExecutorRegistry.get(updateTo);
|
||||
if (executor == null)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Unable to find a corresponding publish executor. (noderef=" + nodeRef.toString() + ", updateTo=" + updateTo + ")");
|
||||
}
|
||||
throw new AlfrescoRuntimeException("Unable to find a corresponding publish executor. (noderef=" + nodeRef.toString() + ", updateTo=" + updateTo + ")");
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Attempting to publish updates. (nodeRef=" + nodeRef.toString() + ")");
|
||||
}
|
||||
@@ -323,7 +323,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
||||
}
|
||||
else
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Unable to publish, because publish executor is not set.");
|
||||
}
|
||||
@@ -332,7 +332,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
||||
// Remove the unpublished update aspect
|
||||
nodeService.removeAspect(nodeRef, ASPECT_UNPUBLISHED_UPDATE);
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Publish updates complete. (nodeRef=" + nodeRef.toString() + ")");
|
||||
}
|
||||
@@ -364,10 +364,10 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
|
||||
try
|
||||
{
|
||||
// Assuming the node still has unpublished information, then unmark it in progress
|
||||
if (nodeService.exists(nodeRef) == true &&
|
||||
nodeService.hasAspect(nodeRef, ASPECT_UNPUBLISHED_UPDATE) == true)
|
||||
if (nodeService.exists(nodeRef) &&
|
||||
nodeService.hasAspect(nodeRef, ASPECT_UNPUBLISHED_UPDATE))
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Removing publish in progress marker from updated node, because update was not successful. (node=" + nodeRef.toString() + ")");
|
||||
}
|
||||
|
@@ -63,7 +63,7 @@ public class ScriptRecordsManagmentNode extends ScriptNode
|
||||
if (capability != null)
|
||||
{
|
||||
Map<Capability, AccessStatus> map = capabilityService.getCapabilitiesAccessState(nodeRef, Collections.singletonList(capabilityName));
|
||||
if (map.containsKey(capability) == true)
|
||||
if (map.containsKey(capability))
|
||||
{
|
||||
AccessStatus accessStatus = map.get(capability);
|
||||
if (accessStatus.equals(AccessStatus.DENIED) == false)
|
||||
|
@@ -70,7 +70,7 @@ public class ScriptRecordsManagmentService extends BaseScopableProcessorExtensio
|
||||
{
|
||||
ScriptRecordsManagmentNode result = null;
|
||||
|
||||
if (rmServices.getNodeService().hasAspect(node.getNodeRef(), ASPECT_FILE_PLAN_COMPONENT) == true)
|
||||
if (rmServices.getNodeService().hasAspect(node.getNodeRef(), ASPECT_FILE_PLAN_COMPONENT))
|
||||
{
|
||||
// TODO .. at this point determine what type of records management node is it and
|
||||
// create the appropriate sub-type
|
||||
|
@@ -223,9 +223,9 @@ public abstract class BaseEvaluator implements RecordsManagementModel
|
||||
boolean result = false;
|
||||
|
||||
// Check that we are dealing with the correct kind of RM object
|
||||
if ((kinds == null || checkKinds(nodeRef) == true) &&
|
||||
if ((kinds == null || checkKinds(nodeRef)) &&
|
||||
// Check we have the required capabilities
|
||||
(capabilities == null || checkCapabilities(nodeRef) == true))
|
||||
(capabilities == null || checkCapabilities(nodeRef)))
|
||||
{
|
||||
result = evaluateImpl(nodeRef);
|
||||
}
|
||||
@@ -259,7 +259,7 @@ public abstract class BaseEvaluator implements RecordsManagementModel
|
||||
Map<Capability, AccessStatus> accessStatus = capabilityService.getCapabilitiesAccessState(nodeRef, capabilities);
|
||||
for (AccessStatus value : accessStatus.values())
|
||||
{
|
||||
if (AccessStatus.DENIED.equals(value) == true)
|
||||
if (AccessStatus.DENIED.equals(value))
|
||||
{
|
||||
result = false;
|
||||
break;
|
||||
|
@@ -110,13 +110,13 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
|
||||
NodeRef nodeRef = nodeInfo.getNodeRef();
|
||||
|
||||
if (AccessStatus.ALLOWED.equals(capabilityService.getCapabilityAccessState(nodeRef,
|
||||
RMPermissionModel.VIEW_RECORDS)) == true)
|
||||
RMPermissionModel.VIEW_RECORDS)))
|
||||
{
|
||||
// Indicate whether the node is a RM object or not
|
||||
boolean isFilePlanComponent = filePlanService.isFilePlanComponent(nodeInfo.getNodeRef());
|
||||
rootJSONObject.put("isRmNode", isFilePlanComponent);
|
||||
|
||||
if (isFilePlanComponent == true)
|
||||
if (isFilePlanComponent)
|
||||
{
|
||||
rootJSONObject.put("rmNode", setRmNodeValues(nodeRef, rootJSONObject, useShortQNames));
|
||||
}
|
||||
@@ -173,7 +173,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
|
||||
|
||||
for (BaseEvaluator indicator : indicators)
|
||||
{
|
||||
if (indicator.evaluate(nodeRef) == true)
|
||||
if (indicator.evaluate(nodeRef))
|
||||
{
|
||||
jsonIndicators.add(indicator.getName());
|
||||
}
|
||||
@@ -192,7 +192,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
|
||||
|
||||
for (BaseEvaluator action : actions)
|
||||
{
|
||||
if (action.evaluate(nodeRef) == true)
|
||||
if (action.evaluate(nodeRef))
|
||||
{
|
||||
jsonActions.add(action.getName());
|
||||
}
|
||||
@@ -226,7 +226,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
|
||||
}
|
||||
case RECORD_FOLDER:
|
||||
{
|
||||
if (recordService.isMetadataStub(nodeRef) == true)
|
||||
if (recordService.isMetadataStub(nodeRef))
|
||||
{
|
||||
result = "metadata-stub-folder";
|
||||
}
|
||||
@@ -238,13 +238,13 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
|
||||
}
|
||||
case RECORD:
|
||||
{
|
||||
if (recordService.isMetadataStub(nodeRef) == true)
|
||||
if (recordService.isMetadataStub(nodeRef))
|
||||
{
|
||||
result = "metadata-stub";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (recordService.isDeclared(nodeRef) == true)
|
||||
if (recordService.isDeclared(nodeRef))
|
||||
{
|
||||
result = "record";
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ public class MultiParentEvaluator extends BaseEvaluator
|
||||
int count = 0;
|
||||
for (ChildAssociationRef parent : parents)
|
||||
{
|
||||
if (nodeService.hasAspect(parent.getParentRef(), ASPECT_FILE_PLAN_COMPONENT) == true)
|
||||
if (nodeService.hasAspect(parent.getParentRef(), ASPECT_FILE_PLAN_COMPONENT))
|
||||
{
|
||||
count++;
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ public class NonElectronicEvaluator extends BaseEvaluator
|
||||
{
|
||||
boolean result = false;
|
||||
QName qName = nodeService.getType(nodeRef);
|
||||
if (qName != null && dictionaryService.isSubClass(qName, TYPE_NON_ELECTRONIC_DOCUMENT) == true)
|
||||
if (qName != null && dictionaryService.isSubClass(qName, TYPE_NON_ELECTRONIC_DOCUMENT))
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
|
@@ -42,8 +42,8 @@ public class SplitEmailActionEvaluator extends BaseEvaluator
|
||||
{
|
||||
String mimetype = contentData.getMimetype();
|
||||
if (mimetype != null &&
|
||||
(MimetypeMap.MIMETYPE_RFC822.equals(mimetype) == true ||
|
||||
MimetypeMap.MIMETYPE_OUTLOOK_MSG.equals(mimetype) == true))
|
||||
(MimetypeMap.MIMETYPE_RFC822.equals(mimetype) ||
|
||||
MimetypeMap.MIMETYPE_OUTLOOK_MSG.equals(mimetype)))
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ public abstract class BaseBehaviourBean extends ServiceBaseImpl
|
||||
@Override
|
||||
public void registerBehaviour(String name, org.alfresco.repo.policy.Behaviour behaviour)
|
||||
{
|
||||
if (behaviours.containsKey(name) == true)
|
||||
if (behaviours.containsKey(name))
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Can not register behaviour, because name " + name + "has already been used.");
|
||||
}
|
||||
|
@@ -291,7 +291,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
||||
*/
|
||||
public void dispositionActionPropertiesUpdate(final NodeRef nodeRef, final Map<QName, Serializable> before, final Map<QName, Serializable> after)
|
||||
{
|
||||
if (nodeService.exists(nodeRef) == true)
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||
{
|
||||
@@ -299,7 +299,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
||||
public Void doWork() throws Exception
|
||||
{
|
||||
ChildAssociationRef assoc = nodeService.getPrimaryParent(nodeRef);
|
||||
if (assoc.getTypeQName().equals(ASSOC_NEXT_DISPOSITION_ACTION) == true)
|
||||
if (assoc.getTypeQName().equals(ASSOC_NEXT_DISPOSITION_ACTION))
|
||||
{
|
||||
// Get the record (or record folder)
|
||||
NodeRef record = assoc.getParentRef();
|
||||
@@ -356,7 +356,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
{
|
||||
if (nodeService.exists(nodeRef) == true && nodeService.hasAspect(nodeRef, ASPECT_RECORD) == true)
|
||||
if (nodeService.exists(nodeRef) && nodeService.hasAspect(nodeRef, ASPECT_RECORD))
|
||||
{
|
||||
applySearchAspect(nodeRef);
|
||||
setupDispositionScheduleProperties(nodeRef);
|
||||
@@ -380,7 +380,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
||||
public Void doWork() throws Exception
|
||||
{
|
||||
NodeRef nodeRef = childAssocRef.getChildRef();
|
||||
if (nodeService.exists(nodeRef) == true)
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
applySearchAspect(nodeRef);
|
||||
setupDispositionScheduleProperties(nodeRef);
|
||||
@@ -424,8 +424,8 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
||||
public void dispositionActionCreate(ChildAssociationRef childAssocRef)
|
||||
{
|
||||
NodeRef child = childAssocRef.getChildRef();
|
||||
if (nodeService.exists(child) == true &&
|
||||
childAssocRef.getTypeQName().equals(ASSOC_NEXT_DISPOSITION_ACTION) == true)
|
||||
if (nodeService.exists(child) &&
|
||||
childAssocRef.getTypeQName().equals(ASSOC_NEXT_DISPOSITION_ACTION))
|
||||
{
|
||||
// Get the record (or record folder)
|
||||
NodeRef record = childAssocRef.getParentRef();
|
||||
@@ -502,11 +502,11 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
||||
NodeRef dispositionAction = childAssocRef.getParentRef();
|
||||
NodeRef eventExecution = childAssocRef.getChildRef();
|
||||
|
||||
if (nodeService.exists(dispositionAction) == true &&
|
||||
nodeService.exists(eventExecution) == true)
|
||||
if (nodeService.exists(dispositionAction) &&
|
||||
nodeService.exists(eventExecution))
|
||||
{
|
||||
ChildAssociationRef assoc = nodeService.getPrimaryParent(dispositionAction);
|
||||
if (assoc.getTypeQName().equals(ASSOC_NEXT_DISPOSITION_ACTION) == true)
|
||||
if (assoc.getTypeQName().equals(ASSOC_NEXT_DISPOSITION_ACTION))
|
||||
{
|
||||
// Get the record (or record folder)
|
||||
NodeRef record = assoc.getParentRef();
|
||||
@@ -538,7 +538,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
||||
if (nodeService.exists(dispositionActionNode))
|
||||
{
|
||||
ChildAssociationRef assoc = nodeService.getPrimaryParent(dispositionActionNode);
|
||||
if (assoc.getTypeQName().equals(ASSOC_NEXT_DISPOSITION_ACTION) == true)
|
||||
if (assoc.getTypeQName().equals(ASSOC_NEXT_DISPOSITION_ACTION))
|
||||
{
|
||||
// Get the record (or record folder)
|
||||
NodeRef record = assoc.getParentRef();
|
||||
@@ -596,7 +596,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
{
|
||||
if (nodeService.exists(nodeRef) == true)
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
// Initialise the search parameteres as required
|
||||
setVitalRecordDefintionDetails(nodeRef);
|
||||
@@ -646,7 +646,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
||||
public Void doWork() throws Exception
|
||||
{
|
||||
// Only care about record folders
|
||||
if (nodeService.exists(nodeRef) && recordFolderService.isRecordFolder(nodeRef) == true)
|
||||
if (nodeService.exists(nodeRef) && recordFolderService.isRecordFolder(nodeRef))
|
||||
{
|
||||
Set<QName> props = new HashSet<QName>(1);
|
||||
props.add(PROP_REVIEW_PERIOD);
|
||||
@@ -694,7 +694,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
||||
{
|
||||
VitalRecordDefinition vrd = vitalRecordService.getVitalRecordDefinition(nodeRef);
|
||||
|
||||
if (vrd != null && vrd.isEnabled() == true && vrd.getReviewPeriod() != null)
|
||||
if (vrd != null && vrd.isEnabled() && vrd.getReviewPeriod() != null)
|
||||
{
|
||||
// Set the property values
|
||||
nodeService.setProperty(nodeRef, PROP_RS_VITAL_RECORD_REVIEW_PERIOD, vrd.getReviewPeriod().getPeriodType());
|
||||
@@ -724,7 +724,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
||||
*/
|
||||
public void onRemoveFrozenAspect(NodeRef nodeRef, QName aspectTypeQName)
|
||||
{
|
||||
if (nodeService.exists(nodeRef) == true &&
|
||||
if (nodeService.exists(nodeRef) &&
|
||||
nodeService.hasAspect(nodeRef, ASPECT_RM_SEARCH))
|
||||
{
|
||||
nodeService.setProperty(nodeRef, PROP_RS_HOLD_REASON, null);
|
||||
@@ -745,7 +745,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
{
|
||||
if (nodeService.exists(nodeRef) == true)
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
// get the changed hold reason
|
||||
String holdReason = (String)nodeService.getProperty(nodeRef, PROP_HOLD_REASON);
|
||||
@@ -778,7 +778,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
|
||||
*/
|
||||
public void dispositionSchedulePropertiesUpdate(NodeRef nodeRef, Map<QName, Serializable> before, Map<QName, Serializable> after)
|
||||
{
|
||||
if (nodeService.exists(nodeRef) == true)
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
// create the schedule object and get the record category for it
|
||||
DispositionSchedule schedule = new DispositionScheduleImpl(recordsManagementServiceRegistry, nodeService, nodeRef);
|
||||
|
@@ -81,7 +81,7 @@ public class DispositionLifecycleAspect extends BaseBehaviourBean
|
||||
)
|
||||
public void onAddAspect(final NodeRef nodeRef, final QName aspect)
|
||||
{
|
||||
if (nodeService.exists(nodeRef) == true)
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
|
@@ -113,7 +113,7 @@ public class FilePlanComponentAspect extends BaseBehaviourBean
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
{
|
||||
if (nodeService.exists(nodeRef) == true)
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
lookupAndExecuteScripts(nodeRef, before, after);
|
||||
}
|
||||
@@ -203,7 +203,7 @@ public class FilePlanComponentAspect extends BaseBehaviourBean
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
{
|
||||
if (nodeService.exists(nodeRef) == true)
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
// Look up the root and set on the aspect if found
|
||||
NodeRef root = filePlanService.getFilePlan(nodeRef);
|
||||
@@ -234,8 +234,8 @@ public class FilePlanComponentAspect extends BaseBehaviourBean
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
{
|
||||
if (nodeService.exists(newChildAssocRef.getParentRef()) == true &&
|
||||
nodeService.exists(newChildAssocRef.getChildRef()) == true)
|
||||
if (nodeService.exists(newChildAssocRef.getParentRef()) &&
|
||||
nodeService.exists(newChildAssocRef.getChildRef()))
|
||||
{
|
||||
// Look up the root and re-set the value currently stored on the aspect
|
||||
NodeRef root = filePlanService.getFilePlan(newChildAssocRef.getParentRef());
|
||||
|
@@ -87,10 +87,10 @@ public class FrozenAspect extends BaseBehaviourBean
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
{
|
||||
if (nodeService.exists(nodeRef) == true &&
|
||||
filePlanService.isFilePlanComponent(nodeRef) == true)
|
||||
if (nodeService.exists(nodeRef) &&
|
||||
filePlanService.isFilePlanComponent(nodeRef))
|
||||
{
|
||||
if (freezeService.isFrozen(nodeRef) == true)
|
||||
if (freezeService.isFrozen(nodeRef))
|
||||
{
|
||||
// never allowed to delete a frozen node
|
||||
throw new AccessDeniedException("Frozen nodes can not be deleted.");
|
||||
@@ -115,10 +115,10 @@ public class FrozenAspect extends BaseBehaviourBean
|
||||
for (ChildAssociationRef assoc : assocs)
|
||||
{
|
||||
// we only care about primary children
|
||||
if (assoc.isPrimary() == true)
|
||||
if (assoc.isPrimary())
|
||||
{
|
||||
NodeRef nodeRef = assoc.getChildRef();
|
||||
if (freezeService.isFrozen(nodeRef) == true)
|
||||
if (freezeService.isFrozen(nodeRef))
|
||||
{
|
||||
// never allowed to delete a node with a frozen child
|
||||
throw new AccessDeniedException("Can not delete node, because it contains a frozen child node.");
|
||||
|
@@ -107,7 +107,7 @@ public class RecordAspect extends BaseBehaviourBean
|
||||
{
|
||||
NodeRef thumbnail = childAssocRef.getChildRef();
|
||||
|
||||
if (nodeService.exists(thumbnail) == true)
|
||||
if (nodeService.exists(thumbnail))
|
||||
{
|
||||
// apply file plan component aspect to thumbnail
|
||||
nodeService.addAspect(thumbnail, ASPECT_FILE_PLAN_COMPONENT, null);
|
||||
@@ -139,7 +139,7 @@ public class RecordAspect extends BaseBehaviourBean
|
||||
public void onCreateReference(NodeRef fromNodeRef, NodeRef toNodeRef, QName reference)
|
||||
{
|
||||
// Deal with versioned records
|
||||
if (reference.equals(QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "versions")) == true)
|
||||
if (reference.equals(QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "versions")))
|
||||
{
|
||||
// Apply the versioned aspect to the from node
|
||||
nodeService.addAspect(fromNodeRef, ASPECT_VERSIONED_RECORD, null);
|
||||
@@ -161,7 +161,7 @@ public class RecordAspect extends BaseBehaviourBean
|
||||
public void onRemoveReference(NodeRef fromNodeRef, NodeRef toNodeRef, QName reference)
|
||||
{
|
||||
// Deal with versioned records
|
||||
if (reference.equals(QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "versions")) == true)
|
||||
if (reference.equals(QName.createQName(RecordsManagementCustomModel.RM_CUSTOM_URI, "versions")))
|
||||
{
|
||||
// Apply the versioned aspect to the from node
|
||||
nodeService.removeAspect(fromNodeRef, ASPECT_VERSIONED_RECORD);
|
||||
@@ -224,7 +224,7 @@ public class RecordAspect extends BaseBehaviourBean
|
||||
{
|
||||
public Object doWork() throws Exception
|
||||
{
|
||||
if (nodeService.exists(newNodeRef) == true)
|
||||
if (nodeService.exists(newNodeRef))
|
||||
{
|
||||
// only remove the search details .. the rest will be resolved automatically
|
||||
nodeService.removeAspect(newNodeRef, RecordsManagementSearchBehaviour.ASPECT_RM_SEARCH);
|
||||
|
@@ -63,7 +63,7 @@ public class ScheduledAspect extends BaseBehaviourBean
|
||||
)
|
||||
public void onAddAspect(NodeRef nodeRef, QName aspectTypeQName)
|
||||
{
|
||||
if (nodeService.exists(nodeRef) == true &&
|
||||
if (nodeService.exists(nodeRef) &&
|
||||
dispositionService.getAssociatedDispositionSchedule(nodeRef) == null)
|
||||
{
|
||||
dispositionService.createDispositionSchedule(nodeRef, null);
|
||||
|
@@ -80,13 +80,13 @@ public class VitalRecordDefinitionAspect extends BaseBehaviourBean
|
||||
)
|
||||
public void onUpdateProperties(final NodeRef nodeRef, Map<QName, Serializable> before, Map<QName, Serializable> after)
|
||||
{
|
||||
if (nodeService.exists(nodeRef) == true &&
|
||||
nodeService.hasAspect(nodeRef, ASPECT_FILE_PLAN_COMPONENT) == true)
|
||||
if (nodeService.exists(nodeRef) &&
|
||||
nodeService.hasAspect(nodeRef, ASPECT_FILE_PLAN_COMPONENT))
|
||||
{
|
||||
// check that vital record definition has been changed in the first place
|
||||
Map<QName, Serializable> changedProps = PropertyMap.getChangedProperties(before, after);
|
||||
if (changedProps.containsKey(PROP_VITAL_RECORD_INDICATOR) == true ||
|
||||
changedProps.containsKey(PROP_REVIEW_PERIOD) == true)
|
||||
if (changedProps.containsKey(PROP_VITAL_RECORD_INDICATOR) ||
|
||||
changedProps.containsKey(PROP_REVIEW_PERIOD))
|
||||
{
|
||||
filePlanAuthenticationService.runAsRmAdmin(new RunAsWork<Void>()
|
||||
{
|
||||
|
@@ -63,7 +63,7 @@ public class DispositionActionDefinitionType extends BaseBehaviourBean
|
||||
)
|
||||
public void onUpdateProperties(NodeRef nodeRef, Map<QName, Serializable> before, Map<QName, Serializable> after)
|
||||
{
|
||||
if (nodeService.exists(nodeRef) == true)
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
// Determine the properties that have changed
|
||||
Set<QName> changedProps = new HashSet<QName>(PropertyMap.getChangedProperties(before, after).keySet());
|
||||
@@ -82,7 +82,7 @@ public class DispositionActionDefinitionType extends BaseBehaviourBean
|
||||
Map<QName, Serializable> props = nodeService.getProperties(nodeRef);
|
||||
|
||||
// Check that there isn't a update currently being published
|
||||
if ((Boolean)props.get(PROP_PUBLISH_IN_PROGRESS).equals(Boolean.TRUE) == true)
|
||||
if ((Boolean)props.get(PROP_PUBLISH_IN_PROGRESS).equals(Boolean.TRUE))
|
||||
{
|
||||
// Can not update the disposition schedule since there is an outstanding update being published
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_UPDATE_DISP_ACT_DEF));
|
||||
|
@@ -107,14 +107,14 @@ public class FilePlanType extends BaseBehaviourBean
|
||||
{
|
||||
// ensure we are not trying to put content in the file plan root node
|
||||
NodeRef nodeRef = childAssocRef.getChildRef();
|
||||
if (instanceOf(nodeRef, ContentModel.TYPE_CONTENT) == true)
|
||||
if (instanceOf(nodeRef, ContentModel.TYPE_CONTENT))
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Operation failed, because you can't place content in the root of the file plan.");
|
||||
}
|
||||
|
||||
// ensure we are not trying to put a record folder in the root of the file plan
|
||||
NodeRef parent = childAssocRef.getParentRef();
|
||||
if (filePlanService.isFilePlan(parent) == true && recordFolderService.isRecordFolder(nodeRef) == true)
|
||||
if (filePlanService.isFilePlan(parent) && recordFolderService.isRecordFolder(nodeRef))
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Operation failed, because you can not place a record folder in the root of the file plan.");
|
||||
}
|
||||
@@ -138,7 +138,7 @@ public class FilePlanType extends BaseBehaviourBean
|
||||
{
|
||||
public Object doWork() throws Exception
|
||||
{
|
||||
if (nodeService.hasAspect(filePlan, ASPECT_FILE_PLAN_COMPONENT) == true &&
|
||||
if (nodeService.hasAspect(filePlan, ASPECT_FILE_PLAN_COMPONENT) &&
|
||||
nodeService.getProperty(filePlan, PROP_IDENTIFIER) == null)
|
||||
{
|
||||
String id = identifierService.generateIdentifier(filePlan);
|
||||
|
@@ -99,7 +99,7 @@ public class RecordCategoryType extends BaseBehaviourBean
|
||||
{
|
||||
// ensure content is not placed directly into a record category
|
||||
NodeRef nodeRef = childAssocRef.getChildRef();
|
||||
if (instanceOf(nodeRef, ContentModel.TYPE_CONTENT) == true)
|
||||
if (instanceOf(nodeRef, ContentModel.TYPE_CONTENT))
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Operation failed, because you can't place content directly into a record category.");
|
||||
}
|
||||
@@ -156,7 +156,7 @@ public class RecordCategoryType extends BaseBehaviourBean
|
||||
)
|
||||
public void onCreateNode(final ChildAssociationRef childAssocRef)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("rma:recordCategory|alf:onCreateNode|this.onCreateNode()|TRANSATION_COMMIT");
|
||||
}
|
||||
|
@@ -210,11 +210,11 @@ public class RecordFolderType extends BaseBehaviourBean
|
||||
{
|
||||
boolean result = true;
|
||||
|
||||
if (nodeService.getType(copyDetails.getTargetParentNodeRef()).equals(TYPE_RECORD_FOLDER) == true)
|
||||
if (nodeService.getType(copyDetails.getTargetParentNodeRef()).equals(TYPE_RECORD_FOLDER))
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
else if (ArrayUtils.contains(unwantedAspects, classQName) == true)
|
||||
else if (ArrayUtils.contains(unwantedAspects, classQName))
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
@@ -236,12 +236,12 @@ public class RecordFolderType extends BaseBehaviourBean
|
||||
public void onCreateChildAssociation(ChildAssociationRef childAssocRef, boolean bNew)
|
||||
{
|
||||
NodeRef nodeRef = childAssocRef.getChildRef();
|
||||
if (nodeService.exists(nodeRef) == true && instanceOf(nodeRef, TYPE_RECORD_FOLDER))
|
||||
if (nodeService.exists(nodeRef) && instanceOf(nodeRef, TYPE_RECORD_FOLDER))
|
||||
{
|
||||
// ensure nothing is being added to a closed record folder
|
||||
NodeRef recordFolder = childAssocRef.getParentRef();
|
||||
Boolean isClosed = (Boolean) nodeService.getProperty(recordFolder, PROP_IS_CLOSED);
|
||||
if (isClosed != null && Boolean.TRUE.equals(isClosed) == true)
|
||||
if (isClosed != null && Boolean.TRUE.equals(isClosed))
|
||||
{
|
||||
throw new AlfrescoRuntimeException("You can't add new items to a closed record folder.");
|
||||
}
|
||||
@@ -295,7 +295,7 @@ public class RecordFolderType extends BaseBehaviourBean
|
||||
// Remove unwanted aspects
|
||||
for (QName aspect : unwantedAspects)
|
||||
{
|
||||
if (nodeService.hasAspect(nodeRef, aspect) == true)
|
||||
if (nodeService.hasAspect(nodeRef, aspect))
|
||||
{
|
||||
nodeService.removeAspect(nodeRef, aspect);
|
||||
}
|
||||
|
@@ -98,14 +98,14 @@ public class RecordsManagementContainerType extends BaseBehaviourBean
|
||||
{
|
||||
// Get the elements of the created association
|
||||
final NodeRef child = childAssocRef.getChildRef();
|
||||
if (nodeService.exists(child) == true)
|
||||
if (nodeService.exists(child))
|
||||
{
|
||||
QName childType = nodeService.getType(child);
|
||||
|
||||
// We only care about "folder" or sub-types
|
||||
if (dictionaryService.isSubClass(childType, ContentModel.TYPE_FOLDER) == true)
|
||||
if (dictionaryService.isSubClass(childType, ContentModel.TYPE_FOLDER))
|
||||
{
|
||||
if (dictionaryService.isSubClass(childType, ContentModel.TYPE_SYSTEM_FOLDER) == true)
|
||||
if (dictionaryService.isSubClass(childType, ContentModel.TYPE_SYSTEM_FOLDER))
|
||||
{
|
||||
// this is a rule container, make sure it is an file plan component
|
||||
nodeService.addAspect(child, ASPECT_FILE_PLAN_COMPONENT, null);
|
||||
@@ -174,7 +174,7 @@ public class RecordsManagementContainerType extends BaseBehaviourBean
|
||||
{
|
||||
public Object doWork() throws Exception
|
||||
{
|
||||
if (nodeService.hasAspect(nodeRef, ASPECT_FILE_PLAN_COMPONENT) == true &&
|
||||
if (nodeService.hasAspect(nodeRef, ASPECT_FILE_PLAN_COMPONENT) &&
|
||||
nodeService.getProperty(nodeRef, PROP_IDENTIFIER) == null)
|
||||
{
|
||||
String id = identifierService.generateIdentifier(nodeRef);
|
||||
|
@@ -146,13 +146,13 @@ public class RmSiteType extends BaseBehaviourBean
|
||||
final NodeRef rmSite = childAssocRef.getChildRef();
|
||||
|
||||
// Do not execute behaviour if this has been created in the archive store
|
||||
if(rmSite.getStoreRef().equals(StoreRef.STORE_REF_ARCHIVE_SPACESSTORE) == true)
|
||||
if(rmSite.getStoreRef().equals(StoreRef.STORE_REF_ARCHIVE_SPACESSTORE))
|
||||
{
|
||||
// This is not the spaces store - probably the archive store
|
||||
return;
|
||||
}
|
||||
|
||||
if (nodeService.exists(rmSite) == true)
|
||||
if (nodeService.exists(rmSite))
|
||||
{
|
||||
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>()
|
||||
{
|
||||
@@ -189,7 +189,7 @@ public class RmSiteType extends BaseBehaviourBean
|
||||
|
||||
// check to see if there is an 'override' for the file plan type given the site type
|
||||
QName siteType = nodeService.getType(siteInfo.getNodeRef());
|
||||
if (mapFilePlanType.containsKey(siteType) == true)
|
||||
if (mapFilePlanType.containsKey(siteType))
|
||||
{
|
||||
result = mapFilePlanType.get(siteType);
|
||||
}
|
||||
@@ -211,10 +211,10 @@ public class RmSiteType extends BaseBehaviourBean
|
||||
)
|
||||
public void onUpdateProperties(NodeRef nodeRef, Map<QName, Serializable> before, Map<QName, Serializable> after)
|
||||
{
|
||||
if (nodeService.exists(nodeRef) == true)
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
Map<QName, Serializable> changed = PropertyMap.getChangedProperties(before, after);
|
||||
if (changed.containsKey(SiteModel.PROP_SITE_VISIBILITY) == true &&
|
||||
if (changed.containsKey(SiteModel.PROP_SITE_VISIBILITY) &&
|
||||
changed.get(SiteModel.PROP_SITE_VISIBILITY) != null &&
|
||||
SiteVisibility.PUBLIC.equals(changed.get(SiteModel.PROP_SITE_VISIBILITY)) == false)
|
||||
{
|
||||
@@ -252,7 +252,7 @@ public class RmSiteType extends BaseBehaviourBean
|
||||
{
|
||||
// determine whether the current user has delete capability on the file plan node
|
||||
AccessStatus accessStatus = capabilityService.getCapabilityAccessState(filePlan, "Delete");
|
||||
if (AccessStatus.DENIED.equals(accessStatus) == true)
|
||||
if (AccessStatus.DENIED.equals(accessStatus))
|
||||
{
|
||||
throw new AlfrescoRuntimeException("The records management site can not be deleted, because the user doesn't have sufficient privillages to delete the file plan.");
|
||||
}
|
||||
|
@@ -238,7 +238,7 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
|
||||
NodeRef root = getRMRoot(records.get(0));
|
||||
String groupName = getGroupName(root);
|
||||
|
||||
if (doesGroupContainUsers(groupName) == true)
|
||||
if (doesGroupContainUsers(groupName))
|
||||
{
|
||||
NotificationContext notificationContext = new NotificationContext();
|
||||
notificationContext.setSubject(I18NUtil.getMessage(MSG_SUBJECT_RECORDS_DUE_FOR_REVIEW));
|
||||
@@ -257,7 +257,7 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
|
||||
}
|
||||
else
|
||||
{
|
||||
if (logger.isWarnEnabled() == true)
|
||||
if (logger.isWarnEnabled())
|
||||
{
|
||||
logger.warn("Unable to send record due for review email notification, because notification group was empty.");
|
||||
}
|
||||
@@ -279,7 +279,7 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
|
||||
NodeRef root = getRMRoot(record);
|
||||
String groupName = getGroupName(root);
|
||||
|
||||
if (doesGroupContainUsers(groupName) == true)
|
||||
if (doesGroupContainUsers(groupName))
|
||||
{
|
||||
NotificationContext notificationContext = new NotificationContext();
|
||||
notificationContext.setSubject(I18NUtil.getMessage(MSG_SUBJECT_RECORD_SUPERCEDED));
|
||||
@@ -298,7 +298,7 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
|
||||
}
|
||||
else
|
||||
{
|
||||
if (logger.isWarnEnabled() == true)
|
||||
if (logger.isWarnEnabled())
|
||||
{
|
||||
logger.warn("Unable to send record superseded email notification, because notification group was empty.");
|
||||
}
|
||||
@@ -314,7 +314,7 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
|
||||
{
|
||||
ParameterCheck.mandatory("record", record);
|
||||
|
||||
if (canSendRejectEmail(record, recordCreator) == true)
|
||||
if (canSendRejectEmail(record, recordCreator))
|
||||
{
|
||||
String site = siteService.getSite(record).getShortName();
|
||||
String rejectReason = (String) nodeService.getProperty(record, PROP_RECORD_REJECTION_REASON);
|
||||
@@ -361,17 +361,17 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
|
||||
result = false;
|
||||
logger.warn(msg1 + "the site which should contain the node '" + record.toString() + "'" + msg2);
|
||||
}
|
||||
if (StringUtils.isBlank(recordCreator) == true)
|
||||
if (StringUtils.isBlank(recordCreator))
|
||||
{
|
||||
result = false;
|
||||
logger.warn(msg1 + "the user, who created the record" + msg2);
|
||||
}
|
||||
if (StringUtils.isBlank((String) nodeService.getProperty(record, PROP_RECORD_REJECTION_REASON)) == true)
|
||||
if (StringUtils.isBlank((String) nodeService.getProperty(record, PROP_RECORD_REJECTION_REASON)))
|
||||
{
|
||||
result = false;
|
||||
logger.warn(msg1 + "the reason for rejection" + msg2);
|
||||
}
|
||||
if (StringUtils.isBlank((String) nodeService.getProperty(record, PROP_RECORD_REJECTION_USER_ID)) == true)
|
||||
if (StringUtils.isBlank((String) nodeService.getProperty(record, PROP_RECORD_REJECTION_USER_ID)))
|
||||
{
|
||||
result = false;
|
||||
logger.warn(msg1 + "the user, who rejected the record" + msg2);
|
||||
|
@@ -194,11 +194,11 @@ public abstract class AbstractModulePatch implements ModulePatch, BeanNameAware
|
||||
@Override
|
||||
public void apply()
|
||||
{
|
||||
if (logger.isInfoEnabled() == true)
|
||||
if (logger.isInfoEnabled())
|
||||
{
|
||||
logger.info("Executing module patch \"" + description + "\"");
|
||||
}
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... id=" + id +
|
||||
",moduleId=" + moduleId +
|
||||
@@ -212,7 +212,7 @@ public abstract class AbstractModulePatch implements ModulePatch, BeanNameAware
|
||||
true,
|
||||
false);
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... module patch applied");
|
||||
}
|
||||
|
@@ -85,7 +85,7 @@ public class ModulePatchExecuterImpl extends AbstractModuleComponent
|
||||
throw new AlfrescoRuntimeException("Unable to register module patch, becuase module id is invalid.");
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Registering module patch " + modulePatch.getId() + " for module " + getModuleId());
|
||||
}
|
||||
@@ -102,7 +102,7 @@ public class ModulePatchExecuterImpl extends AbstractModuleComponent
|
||||
// get current schema version
|
||||
int currentSchema = getCurrentSchema();
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Running module patch executer (currentSchema=" + currentSchema + ", configuredSchema=" + moduleSchema + ")");
|
||||
}
|
||||
@@ -140,7 +140,7 @@ public class ModulePatchExecuterImpl extends AbstractModuleComponent
|
||||
protected int getCurrentSchema()
|
||||
{
|
||||
Integer result = START_SCHEMA;
|
||||
if (attributeService.exists(KEY_MODULE_SCHEMA, getModuleId()) == true)
|
||||
if (attributeService.exists(KEY_MODULE_SCHEMA, getModuleId()))
|
||||
{
|
||||
result = (Integer)attributeService.getAttribute(KEY_MODULE_SCHEMA, getModuleId());
|
||||
}
|
||||
|
@@ -89,7 +89,7 @@ public abstract class ModulePatchComponent extends AbstractModuleComponent
|
||||
{
|
||||
try
|
||||
{
|
||||
if (logger.isInfoEnabled() == true)
|
||||
if (logger.isInfoEnabled())
|
||||
{
|
||||
logger.info("Module patch component '" + getName() + "' is executing ...");
|
||||
}
|
||||
@@ -114,7 +114,7 @@ public abstract class ModulePatchComponent extends AbstractModuleComponent
|
||||
|
||||
}, false, true);
|
||||
|
||||
if (logger.isInfoEnabled() == true)
|
||||
if (logger.isInfoEnabled())
|
||||
{
|
||||
logger.info(" ... completed module patch '" + getName() + "'");
|
||||
}
|
||||
@@ -122,7 +122,7 @@ public abstract class ModulePatchComponent extends AbstractModuleComponent
|
||||
catch (Throwable exception)
|
||||
{
|
||||
// record the exception otherwise it gets swallowed
|
||||
if (logger.isInfoEnabled() == true)
|
||||
if (logger.isInfoEnabled())
|
||||
{
|
||||
logger.info(" ... error encountered. " + exception.getMessage(), exception);
|
||||
}
|
||||
|
@@ -145,7 +145,7 @@ public class NotificationTemplatePatch extends ModulePatchComponent
|
||||
{
|
||||
if (template == null || nodeService.exists(template) == false)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Skipping template update, because template has not been bootstraped.");
|
||||
}
|
||||
@@ -156,7 +156,7 @@ public class NotificationTemplatePatch extends ModulePatchComponent
|
||||
String lastPatchUpdate = (String)nodeService.getProperty(template, PROP_LAST_PATCH_UPDATE);
|
||||
if (lastPatchUpdate == null || name.equals(lastPatchUpdate) == false)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Applying update to template. (template=" + template.toString() + ", templateUpdate=" + templateUpdate + ")");
|
||||
}
|
||||
@@ -192,7 +192,7 @@ public class NotificationTemplatePatch extends ModulePatchComponent
|
||||
}
|
||||
else
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Skipping template update, because template has already been patched. (template=" + template.toString() + ")");
|
||||
}
|
||||
|
@@ -113,9 +113,9 @@ public class RMv2FilePlanNodeRefPatch extends ModulePatchComponent
|
||||
{
|
||||
List<Long> filePlanComponents = patchDAO.getNodesByAspectQNameId(aspectPair.getFirst(), 0L, patchDAO.getMaxAdmNodeID());
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... updating " + filePlanComponents.size() + " items" );
|
||||
logger.debug(" ... updating " + filePlanComponents.size() + " items");
|
||||
}
|
||||
|
||||
|
||||
@@ -134,9 +134,9 @@ public class RMv2FilePlanNodeRefPatch extends ModulePatchComponent
|
||||
|
||||
// only set the rmadmin permissions on record categories, record folders and records
|
||||
FilePlanComponentKind kind = filePlanService.getFilePlanComponentKind(filePlanComponentNodeRef);
|
||||
if (FilePlanComponentKind.RECORD_CATEGORY.equals(kind) == true ||
|
||||
FilePlanComponentKind.RECORD_FOLDER.equals(kind) == true ||
|
||||
FilePlanComponentKind.RECORD.equals(kind) == true )
|
||||
if (FilePlanComponentKind.RECORD_CATEGORY.equals(kind) ||
|
||||
FilePlanComponentKind.RECORD_FOLDER.equals(kind) ||
|
||||
FilePlanComponentKind.RECORD.equals(kind))
|
||||
{
|
||||
// ensure the that the records management role has read and file on the node
|
||||
Role adminRole = filePlanRoleService.getRole(filePlan, "Administrator");
|
||||
|
@@ -127,14 +127,14 @@ public class RMv2ModelPatch extends ModulePatchComponent
|
||||
|
||||
qnameDAO.updateQName(qnameBefore, qnameAfter);
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... updated qname " + qnameBefore.toString());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... no need to update qname " + qnameBefore.toString());
|
||||
}
|
||||
|
@@ -89,7 +89,7 @@ public class RMv2SavedSearchPatch extends ModulePatchComponent
|
||||
// get the saved searches
|
||||
List<SavedSearchDetails> savedSearches = recordsManagementSearchService.getSavedSearches(RM_SITE_ID);
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... updating " + savedSearches.size() + " saved searches");
|
||||
}
|
||||
@@ -106,7 +106,7 @@ public class RMv2SavedSearchPatch extends ModulePatchComponent
|
||||
writer.putContent(refreshedJSON);
|
||||
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... updated saved search " + savedSearchDetails.getName() + " (nodeRef=" + nodeRef.toString() + ")");
|
||||
}
|
||||
|
@@ -87,7 +87,7 @@ public class NotificationTemplatePatch_v21 extends RMv21PatchComponent
|
||||
NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, CONFIG_NODEID);
|
||||
// get the parent node
|
||||
NodeRef supersededTemplate = notificationHelper.getSupersededTemplate();
|
||||
if (nodeService.exists(nodeRef) == false && nodeService.exists(supersededTemplate) == true)
|
||||
if (nodeService.exists(nodeRef) == false && nodeService.exists(supersededTemplate))
|
||||
{
|
||||
NodeRef parent = nodeService.getPrimaryParent(supersededTemplate).getParentRef();
|
||||
|
||||
|
@@ -97,7 +97,7 @@ public class RMv21BehaviorScriptsPatch extends RMv21PatchComponent implements Be
|
||||
// check that the behavior scripts folder exists
|
||||
if (nodeService.exists(newBehaviorScriptsFolder) == false)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... creating RM Behavior Scripts folder");
|
||||
}
|
||||
@@ -118,7 +118,7 @@ public class RMv21BehaviorScriptsPatch extends RMv21PatchComponent implements Be
|
||||
}
|
||||
|
||||
// move to the new behavior scripts folder if the old behavior scripts folder exists and contains files
|
||||
if (nodeService.exists(OLD_BEHAVIOR_SCRIPTS_FOLDER) == true)
|
||||
if (nodeService.exists(OLD_BEHAVIOR_SCRIPTS_FOLDER))
|
||||
{
|
||||
// run the following code as System
|
||||
AuthenticationUtil.runAs(new RunAsWork<Object>()
|
||||
@@ -137,7 +137,7 @@ public class RMv21BehaviorScriptsPatch extends RMv21PatchComponent implements Be
|
||||
|
||||
if (oldBehaviorScripts != null && oldBehaviorScripts.isEmpty() != true)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... moving files from RM Scripts folder to RM Behavior Scripts folder");
|
||||
}
|
||||
@@ -147,7 +147,7 @@ public class RMv21BehaviorScriptsPatch extends RMv21PatchComponent implements Be
|
||||
// move the old script to the new location
|
||||
fileFolderService.moveFrom(script.getNodeRef(), OLD_BEHAVIOR_SCRIPTS_FOLDER, RMv21BehaviorScriptsPatch.newBehaviorScriptsFolder, script.getName());
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ...... moved " + script.getName());
|
||||
}
|
||||
|
@@ -107,7 +107,7 @@ public class RMv21CapabilityPatch extends RMv21PatchComponent
|
||||
// only update if the capability is missing
|
||||
if (capabilities.contains(capability) == false)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... adding capability " + capabilityName + " to role " + role.getName());
|
||||
}
|
||||
@@ -127,14 +127,14 @@ public class RMv21CapabilityPatch extends RMv21PatchComponent
|
||||
{
|
||||
Set<NodeRef> filePlans = getFilePlans();
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... updating " + filePlans.size() + " file plans");
|
||||
}
|
||||
|
||||
for (NodeRef filePlan : filePlans)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... updating file plan " + filePlan.toString());
|
||||
}
|
||||
|
@@ -140,7 +140,7 @@ public class RMv21InPlacePatch extends RMv21PatchComponent
|
||||
{
|
||||
Set<NodeRef> filePlans = filePlanService.getFilePlans();
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... updating " + filePlans.size() + " file plans");
|
||||
}
|
||||
@@ -149,7 +149,7 @@ public class RMv21InPlacePatch extends RMv21PatchComponent
|
||||
{
|
||||
if (filePlanService.getUnfiledContainer(filePlan) == null)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... updating file plan " + filePlan.toString());
|
||||
}
|
||||
@@ -196,7 +196,7 @@ public class RMv21InPlacePatch extends RMv21PatchComponent
|
||||
|
||||
private void moveExistingHolds(NodeRef filePlan)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... moving existing holds for file plan " + filePlan.toString());
|
||||
}
|
||||
@@ -214,7 +214,7 @@ public class RMv21InPlacePatch extends RMv21PatchComponent
|
||||
|
||||
private void moveExistingTransfers(NodeRef filePlan)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... moving existing transfers for file plan " + filePlan.toString());
|
||||
}
|
||||
|
@@ -117,7 +117,7 @@ public class RMv21RMAdminUserPatch extends RMv21PatchComponent implements BeanNa
|
||||
|
||||
if (authenticationService.authenticationExists(user) == false)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... creating RM Admin user");
|
||||
}
|
||||
@@ -126,7 +126,7 @@ public class RMv21RMAdminUserPatch extends RMv21PatchComponent implements BeanNa
|
||||
|
||||
if (personService.personExists(user) == false)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... creating RM Admin person");
|
||||
}
|
||||
@@ -139,13 +139,13 @@ public class RMv21RMAdminUserPatch extends RMv21PatchComponent implements BeanNa
|
||||
}
|
||||
else
|
||||
{
|
||||
if (logger.isInfoEnabled() == true)
|
||||
if (logger.isInfoEnabled())
|
||||
{
|
||||
logger.debug(" ... RM Admin person already exists");
|
||||
}
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... assigning RM Admin user to file plans");
|
||||
}
|
||||
|
@@ -109,9 +109,9 @@ public class RMv21RecordInheritancePatch extends RMv21PatchComponent
|
||||
{
|
||||
List<Long> records = patchDAO.getNodesByAspectQNameId(aspectPair.getFirst(), 0L, patchDAO.getMaxAdmNodeID());
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... updating " + records.size() + " records" );
|
||||
logger.debug(" ... updating " + records.size() + " records");
|
||||
}
|
||||
|
||||
for (Long record : records)
|
||||
@@ -119,7 +119,7 @@ public class RMv21RecordInheritancePatch extends RMv21PatchComponent
|
||||
Pair<Long, NodeRef> recordPair = nodeDAO.getNodePair(record);
|
||||
NodeRef recordNodeRef = recordPair.getSecond();
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... updating record " + recordNodeRef.toString());
|
||||
|
||||
|
@@ -72,9 +72,9 @@ public class RMv21ReportServicePatch extends RMv21PatchComponent
|
||||
protected void executePatch() throws Throwable
|
||||
{
|
||||
// check whether report dir exists or not
|
||||
if (nodeService.exists(RM_CONFIG_FOLDER) == true && nodeService.exists(TEMPLATE_ROOT) == false)
|
||||
if (nodeService.exists(RM_CONFIG_FOLDER) && nodeService.exists(TEMPLATE_ROOT) == false)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... adding template root folder");
|
||||
}
|
||||
@@ -88,7 +88,7 @@ public class RMv21ReportServicePatch extends RMv21PatchComponent
|
||||
"Records Management Report Templates",
|
||||
"Records management report templates.");
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... adding destruction report template");
|
||||
}
|
||||
|
@@ -71,7 +71,7 @@ public class RMv21RolesPatch extends RMv21PatchComponent implements BeanNameAwar
|
||||
{
|
||||
Set<NodeRef> filePlans = filePlanService.getFilePlans();
|
||||
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... updating " + filePlans.size() + " file plans");
|
||||
}
|
||||
@@ -85,7 +85,7 @@ public class RMv21RolesPatch extends RMv21PatchComponent implements BeanNameAwar
|
||||
String roleGroupName = role.getRoleGroupName();
|
||||
if (authorityService.getAuthorityZones(roleGroupName).contains(RMAuthority.ZONE_APP_RM) == false)
|
||||
{
|
||||
if (logger.isDebugEnabled() == true)
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" ... updating " + roleGroupName + " in file plan " + filePlan.toString());
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user