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:
Tuna Aksoy
2014-03-11 09:04:52 +00:00
parent 3f1af531d0
commit 924782cc3d
156 changed files with 1724 additions and 1724 deletions

View File

@@ -94,7 +94,7 @@ public abstract class AuditableActionExecuterAbstractBase extends ActionExecuter
super.init(); super.init();
} }
if (auditable == true) if (auditable)
{ {
getAuditService().registerAuditEvent(this.getActionDefinition().getName(), this.getActionDefinition().getTitle()); 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) public void execute(Action action, NodeRef actionedUponNodeRef)
{ {
// audit the execution of the action // 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. // 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); getAuditService().auditEvent(actionedUponNodeRef, this.getActionDefinition().getName(), null, null, true);

View File

@@ -61,7 +61,7 @@ public abstract class PropertySubActionExecuterAbstractBase extends AuditableAct
public void execute(Action action, NodeRef actionedUponNodeRef) public void execute(Action action, NodeRef actionedUponNodeRef)
{ {
// do the property subs (if any exist) // do the property subs (if any exist)
if (allowParameterSubstitutions == true) if (allowParameterSubstitutions)
{ {
parameterProcessorComponent.process(action, getActionDefinition(), actionedUponNodeRef); parameterProcessorComponent.process(action, getActionDefinition(), actionedUponNodeRef);
} }

View File

@@ -522,7 +522,7 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
{ {
for (EventCompletionDetails event : events) for (EventCompletionDetails event : events)
{ {
if (event.isEventComplete() == true) if (event.isEventComplete())
{ {
eligible = true; eligible = true;
break; break;

View File

@@ -117,15 +117,15 @@ public abstract class RMDispositionActionExecuterAbstractBase extends RMActionEx
{ {
// Check the eligibility of the action // Check the eligibility of the action
if (checkEligibility(actionedUponNodeRef) == false || 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 // 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 // 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 // Indicate that the disposition action is underway
nodeService.setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_STARTED_AT, new Date()); nodeService.setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_STARTED_AT, new Date());
@@ -134,8 +134,8 @@ public abstract class RMDispositionActionExecuterAbstractBase extends RMActionEx
// Execute record level disposition // Execute record level disposition
executeRecordLevelDisposition(action, actionedUponNodeRef); executeRecordLevelDisposition(action, actionedUponNodeRef);
if (nodeService.exists(nextDispositionActionNodeRef) == true && if (nodeService.exists(nextDispositionActionNodeRef) &&
getSetDispositionActionComplete() == true) getSetDispositionActionComplete())
{ {
nodeService.setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_COMPLETED_AT, new Date()); nodeService.setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_COMPLETED_AT, new Date());
nodeService.setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_COMPLETED_BY, AuthenticationUtil.getRunAsUser()); nodeService.setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_COMPLETED_BY, AuthenticationUtil.getRunAsUser());
@@ -153,9 +153,9 @@ public abstract class RMDispositionActionExecuterAbstractBase extends RMActionEx
} }
else 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 // Indicate that the disposition action is underway
nodeService.setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_STARTED_AT, new Date()); nodeService.setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_STARTED_AT, new Date());
@@ -164,8 +164,8 @@ public abstract class RMDispositionActionExecuterAbstractBase extends RMActionEx
executeRecordFolderLevelDisposition(action, actionedUponNodeRef); executeRecordFolderLevelDisposition(action, actionedUponNodeRef);
// Indicate that the disposition action is compelte // Indicate that the disposition action is compelte
if (nodeService.exists(nextDispositionActionNodeRef) == true && if (nodeService.exists(nextDispositionActionNodeRef) &&
getSetDispositionActionComplete() == true) getSetDispositionActionComplete())
{ {
nodeService.setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_COMPLETED_AT, new Date()); nodeService.setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_COMPLETED_AT, new Date());
nodeService.setProperty(nextDispositionActionNodeRef, PROP_DISPOSITION_ACTION_COMPLETED_BY, AuthenticationUtil.getRunAsUser()); 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 // Update the disposition schedule
dispositionService.updateNextDispositionAction(actionedUponNodeRef); 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 // Check this the next disposition action
NodeRef nextDispositionAction = nextDispositionActionNodeRef; NodeRef nextDispositionAction = nextDispositionActionNodeRef;

View File

@@ -108,7 +108,7 @@ public class RecordsManagementActionServiceImpl implements RecordsManagementActi
{ {
rmActions.put(rmAction.getName(), rmAction); rmActions.put(rmAction.getName(), rmAction);
if (rmAction.isDispositionAction() == true) if (rmAction.isDispositionAction())
{ {
dispositionActions.put(rmAction.getName(), rmAction); dispositionActions.put(rmAction.getName(), rmAction);
} }
@@ -261,7 +261,7 @@ public class RecordsManagementActionServiceImpl implements RecordsManagementActi
// Execute action // Execute action
invokeBeforeRMActionExecution(nodeRef, name, parameters); invokeBeforeRMActionExecution(nodeRef, name, parameters);
RecordsManagementActionResult result = rmAction.execute(nodeRef, parameters); RecordsManagementActionResult result = rmAction.execute(nodeRef, parameters);
if (nodeService.exists(nodeRef) == true) if (nodeService.exists(nodeRef))
{ {
invokeOnRMActionExecution(nodeRef, name, parameters); invokeOnRMActionExecution(nodeRef, name, parameters);
} }

View File

@@ -67,7 +67,7 @@ public class ScheduledDispositionJob implements Job
final String currentDate = padString(year, 2) + "-" + padString(month, 2) + final String currentDate = padString(year, 2) + "-" + padString(month, 2) +
"-" + padString(dayOfMonth, 2) + "T00:00:00.00Z"; "-" + padString(dayOfMonth, 2) + "T00:00:00.00Z";
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
StringBuilder msg = new StringBuilder(); StringBuilder msg = new StringBuilder();
msg.append("Executing ") msg.append("Executing ")
@@ -89,7 +89,7 @@ public class ScheduledDispositionJob implements Job
List<NodeRef> resultNodes = results.getNodeRefs(); List<NodeRef> resultNodes = results.getNodeRefs();
results.close(); results.close();
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
StringBuilder msg = new StringBuilder(); StringBuilder msg = new StringBuilder();
msg.append("Found ") msg.append("Found ")
@@ -108,7 +108,7 @@ public class ScheduledDispositionJob implements Job
{ {
rmActionService.executeRecordsManagementAction(node, dispActionName); rmActionService.executeRecordsManagementAction(node, dispActionName);
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("Performing " + dispActionName + " dispoition action on disposable item " + node.toString()); logger.debug("Performing " + dispActionName + " dispoition action on disposable item " + node.toString());
} }

View File

@@ -129,7 +129,7 @@ public class CreateRecordAction extends AuditableActionExecuterAbstractBase
if (nodeService.exists(actionedUponNodeRef) == false) if (nodeService.exists(actionedUponNodeRef) == false)
{ {
// do not create record if the actioned upon node does not exist! // 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."); 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) 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 // 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."); 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! // 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."); 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 // 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."); 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 // 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."); 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 // 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."); 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 the file plan is still null, raise an exception
if (filePlan == null) 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."); 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 // verify that the provided file plan is actually a file plan
if (filePlanService.isFilePlan(filePlan) == false) 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."); logger.debug("Can not create record, because the provided file plan node reference is not a file plan.");
} }

View File

@@ -79,7 +79,7 @@ public class HideRecordAction extends AuditableActionExecuterAbstractBase
if (nodeService.hasAspect(actionedUponNodeRef, ASPECT_RECORD) == false) if (nodeService.hasAspect(actionedUponNodeRef, ASPECT_RECORD) == false)
{ {
// we cannot hide a document which is not a record // 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."); logger.debug("Cannot hide the document, because '" + actionedUponNodeRef.toString() + "' is not a record.");
} }

View File

@@ -69,7 +69,7 @@ public class HasDispositionActionEvaluator extends RecordsManagementActionCondit
String action = ((QName) actionCondition.getParameterValue(PARAM_DISPOSITION_ACTION)).getLocalName(); String action = ((QName) actionCondition.getParameterValue(PARAM_DISPOSITION_ACTION)).getLocalName();
if (dispositionService.isDisposableItem(actionedUponNodeRef) == true) if (dispositionService.isDisposableItem(actionedUponNodeRef))
{ {
if (position.equals(DispositionActionRelativePositions.ANY.toString())) if (position.equals(DispositionActionRelativePositions.ANY.toString()))
@@ -80,7 +80,7 @@ public class HasDispositionActionEvaluator extends RecordsManagementActionCondit
{ {
for (DispositionActionDefinition dispositionActionDefinition : dispositionSchedule.getDispositionActionDefinitions()) for (DispositionActionDefinition dispositionActionDefinition : dispositionSchedule.getDispositionActionDefinitions())
{ {
if (dispositionActionDefinition.getName().equals(action) == true) if (dispositionActionDefinition.getName().equals(action))
{ {
result = true; result = true;
break; break;
@@ -95,7 +95,7 @@ public class HasDispositionActionEvaluator extends RecordsManagementActionCondit
{ {
// Get the disposition actions name // Get the disposition actions name
String actionName = nextDispositionAction.getName(); String actionName = nextDispositionAction.getName();
if (actionName.equals(action) == true) if (actionName.equals(action))
{ {
result = true; result = true;
} }
@@ -108,7 +108,7 @@ public class HasDispositionActionEvaluator extends RecordsManagementActionCondit
{ {
// Get the disposition actions name // Get the disposition actions name
String actionName = lastCompletedDispositionAction.getName(); String actionName = lastCompletedDispositionAction.getName();
if (actionName.equals(action) == true) if (actionName.equals(action))
{ {
result = true; result = true;
} }

View File

@@ -61,14 +61,14 @@ public class AddRecordTypeAction extends RMActionExecuterAbstractBase
@Override @Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
{ {
if (eligibleForAction(actionedUponNodeRef) == true) if (eligibleForAction(actionedUponNodeRef))
{ {
for (String type : getRecordTypes(action)) for (String type : getRecordTypes(action))
{ {
recordService.addRecordType(actionedUponNodeRef, QName.createQName(type, namespaceService)); 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())); 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) private boolean eligibleForAction(NodeRef actionedUponNodeRef)
{ {
boolean result = false; boolean result = false;
if (nodeService.exists(actionedUponNodeRef) == true && if (nodeService.exists(actionedUponNodeRef) &&
freezeService.isFrozen(actionedUponNodeRef) == false && freezeService.isFrozen(actionedUponNodeRef) == false &&
recordService.isRecord(actionedUponNodeRef) == true && recordService.isRecord(actionedUponNodeRef) &&
recordService.isDeclared(actionedUponNodeRef) == false) recordService.isDeclared(actionedUponNodeRef) == false)
{ {
result = true; result = true;

View File

@@ -69,13 +69,13 @@ public class ApplyCustomTypeAction extends RMActionExecuterAbstractBase
logger.debug("Executing action [" + action.getActionDefinitionName() + "] on " + actionedUponNodeRef); 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. // Apply the appropriate aspect and set the properties.
Map<QName, Serializable> aspectProps = getPropertyValues(action); Map<QName, Serializable> aspectProps = getPropertyValues(action);
this.nodeService.addAspect(actionedUponNodeRef, customTypeAspect, aspectProps); 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())); logger.warn(I18NUtil.getMessage(MSG_ACTIONED_UPON_NOT_RECORD, this.getClass().getSimpleName(), actionedUponNodeRef.toString()));
} }

View File

@@ -109,7 +109,7 @@ public class BroadcastDispositionActionDefinitionUpdateAction extends RMActionEx
// has been updated // has been updated
DispositionSchedule itemDs = dispositionService.getDispositionSchedule(disposableItem); DispositionSchedule itemDs = dispositionService.getDispositionSchedule(disposableItem);
if (itemDs != null && if (itemDs != null &&
itemDs.getNodeRef().equals(ds.getNodeRef()) == true) itemDs.getNodeRef().equals(ds.getNodeRef()))
{ {
if (nodeService.hasAspect(disposableItem, ASPECT_DISPOSITION_LIFECYCLE)) if (nodeService.hasAspect(disposableItem, ASPECT_DISPOSITION_LIFECYCLE))
{ {

View File

@@ -39,7 +39,7 @@ public class CloseRecordFolderAction extends RMActionExecuterAbstractBase
@Override @Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
{ {
if (eligibleForAction(actionedUponNodeRef) == true) if (eligibleForAction(actionedUponNodeRef))
{ {
recordFolderService.closeRecordFolder(actionedUponNodeRef); recordFolderService.closeRecordFolder(actionedUponNodeRef);
} }
@@ -57,7 +57,7 @@ public class CloseRecordFolderAction extends RMActionExecuterAbstractBase
private boolean eligibleForAction(NodeRef actionedUponNodeRef) private boolean eligibleForAction(NodeRef actionedUponNodeRef)
{ {
boolean result = false; boolean result = false;
if (nodeService.exists(actionedUponNodeRef) == true && if (nodeService.exists(actionedUponNodeRef) &&
freezeService.isFrozen(actionedUponNodeRef) == false) freezeService.isFrozen(actionedUponNodeRef) == false)
{ {
result = true; result = true;

View File

@@ -63,14 +63,14 @@ public class CompleteEventAction extends RMActionExecuterAbstractBase
@Override @Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
{ {
if (nodeService.exists(actionedUponNodeRef) == true && if (nodeService.exists(actionedUponNodeRef) &&
freezeService.isFrozen(actionedUponNodeRef) == false) freezeService.isFrozen(actionedUponNodeRef) == false)
{ {
String eventName = (String)action.getParameterValue(PARAM_EVENT_NAME); String eventName = (String)action.getParameterValue(PARAM_EVENT_NAME);
String eventCompletedBy = (String)action.getParameterValue(PARAM_EVENT_COMPLETED_BY); String eventCompletedBy = (String)action.getParameterValue(PARAM_EVENT_COMPLETED_BY);
Date eventCompletedAt = (Date)action.getParameterValue(PARAM_EVENT_COMPLETED_AT); 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 // Get the next disposition action
DispositionAction da = this.dispositionService.getNextDispositionAction(actionedUponNodeRef); DispositionAction da = this.dispositionService.getNextDispositionAction(actionedUponNodeRef);
@@ -125,7 +125,7 @@ public class CompleteEventAction extends RMActionExecuterAbstractBase
List<EventCompletionDetails> events = da.getEventCompletionDetails(); List<EventCompletionDetails> events = da.getEventCompletionDetails();
for (EventCompletionDetails event : events) for (EventCompletionDetails event : events)
{ {
if (eventName.equals(event.getEventName()) == true) if (eventName.equals(event.getEventName()))
{ {
result = event; result = event;
break; break;

View File

@@ -52,7 +52,7 @@ public class CreateDispositionScheduleAction extends RMActionExecuterAbstractBas
@Override @Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
{ {
if (eligibleForAction(actionedUponNodeRef) == true) if (eligibleForAction(actionedUponNodeRef))
{ {
// Create the disposition schedule // Create the disposition schedule
dispositionService.createDispositionSchedule(actionedUponNodeRef, null); dispositionService.createDispositionSchedule(actionedUponNodeRef, null);
@@ -75,8 +75,8 @@ public class CreateDispositionScheduleAction extends RMActionExecuterAbstractBas
private boolean eligibleForAction(NodeRef actionedUponNodeRef) private boolean eligibleForAction(NodeRef actionedUponNodeRef)
{ {
boolean result = false; boolean result = false;
if (nodeService.exists(actionedUponNodeRef) == true && if (nodeService.exists(actionedUponNodeRef) &&
filePlanService.isRecordCategory(actionedUponNodeRef) == true) filePlanService.isRecordCategory(actionedUponNodeRef))
{ {
result = true; result = true;
} }

View File

@@ -61,15 +61,15 @@ public class DeclareRecordAction extends RMActionExecuterAbstractBase
@Override @Override
protected void executeImpl(final Action action, final NodeRef actionedUponNodeRef) protected void executeImpl(final Action action, final NodeRef actionedUponNodeRef)
{ {
if (nodeService.exists(actionedUponNodeRef) == true && if (nodeService.exists(actionedUponNodeRef) &&
recordService.isRecord(actionedUponNodeRef) == true && recordService.isRecord(actionedUponNodeRef) &&
freezeService.isFrozen(actionedUponNodeRef) == false) freezeService.isFrozen(actionedUponNodeRef) == false)
{ {
if (recordService.isDeclared(actionedUponNodeRef) == false) if (recordService.isDeclared(actionedUponNodeRef) == false)
{ {
List<String> missingProperties = new ArrayList<String>(5); List<String> missingProperties = new ArrayList<String>(5);
// Aspect not already defined - check mandatory properties then add // Aspect not already defined - check mandatory properties then add
if (mandatoryPropertiesSet(actionedUponNodeRef, missingProperties) == true) if (mandatoryPropertiesSet(actionedUponNodeRef, missingProperties))
{ {
recordService.disablePropertyEditableCheck(); recordService.disablePropertyEditableCheck();
try try

View File

@@ -64,11 +64,11 @@ public class DelegateAction extends RMActionExecuterAbstractBase
@Override @Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
{ {
if (nodeService.exists(actionedUponNodeRef) == true && if (nodeService.exists(actionedUponNodeRef) &&
(checkFrozen == false || freezeService.isFrozen(actionedUponNodeRef) == false)) (checkFrozen == false || freezeService.isFrozen(actionedUponNodeRef) == false))
{ {
// do the property subs (if any exist) // do the property subs (if any exist)
if (allowParameterSubstitutions == true) if (allowParameterSubstitutions)
{ {
parameterProcessorComponent.process(action, delegateActionExecuter.getActionDefinition(), actionedUponNodeRef); parameterProcessorComponent.process(action, delegateActionExecuter.getActionDefinition(), actionedUponNodeRef);
} }

View File

@@ -105,7 +105,7 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
private boolean checkForDestroyRecordsCapability(NodeRef actionedUponNodeRef) private boolean checkForDestroyRecordsCapability(NodeRef actionedUponNodeRef)
{ {
boolean result = true; boolean result = true;
if (AccessStatus.ALLOWED.equals(capabilityService.getCapability("DestroyRecords").hasPermission(actionedUponNodeRef)) == true) if (AccessStatus.ALLOWED.equals(capabilityService.getCapability("DestroyRecords").hasPermission(actionedUponNodeRef)))
{ {
result = false; result = false;
} }
@@ -124,7 +124,7 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
executeRecordLevelDisposition(action, record); executeRecordLevelDisposition(action, record);
} }
if (ghostingEnabled == true) if (ghostingEnabled)
{ {
nodeService.addAspect(recordFolder, ASPECT_GHOSTED, Collections.<QName, Serializable> emptyMap()); nodeService.addAspect(recordFolder, ASPECT_GHOSTED, Collections.<QName, Serializable> emptyMap());
} }
@@ -156,7 +156,7 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
// Clear thumbnail content // Clear thumbnail content
clearThumbnails(nodeRef); clearThumbnails(nodeRef);
if (ghostingEnabled == true) if (ghostingEnabled)
{ {
// Add the ghosted aspect // Add the ghosted aspect
nodeService.addAspect(nodeRef, ASPECT_GHOSTED, null); nodeService.addAspect(nodeRef, ASPECT_GHOSTED, null);

View File

@@ -48,7 +48,7 @@ public class EditDispositionActionAsOfDateAction extends RMActionExecuterAbstrac
@Override @Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) 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 // Get the action parameter
Date asOfDate = (Date)action.getParameterValue(PARAM_AS_OF_DATE); Date asOfDate = (Date)action.getParameterValue(PARAM_AS_OF_DATE);

View File

@@ -47,8 +47,8 @@ public class EditReviewAsOfDateAction extends RMActionExecuterAbstractBase
@Override @Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
{ {
if (recordService.isRecord(actionedUponNodeRef) == true && if (recordService.isRecord(actionedUponNodeRef) &&
nodeService.hasAspect(actionedUponNodeRef, ASPECT_VITAL_RECORD) == true) nodeService.hasAspect(actionedUponNodeRef, ASPECT_VITAL_RECORD))
{ {
// Get the action parameter // Get the action parameter
Date reviewAsOf = (Date)action.getParameterValue(PARAM_AS_OF_DATE); Date reviewAsOf = (Date)action.getParameterValue(PARAM_AS_OF_DATE);

View File

@@ -54,10 +54,10 @@ public class FreezeAction extends RMActionExecuterAbstractBase
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
{ {
// NOTE: we can only freeze records and record folders so ignore everything else // 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 && nodeService.hasAspect(actionedUponNodeRef, ContentModel.ASPECT_PENDING_DELETE) == false &&
(recordService.isRecord(actionedUponNodeRef) == true || (recordService.isRecord(actionedUponNodeRef) ||
recordFolderService.isRecordFolder(actionedUponNodeRef) == true) && recordFolderService.isRecordFolder(actionedUponNodeRef)) &&
freezeService.isFrozen(actionedUponNodeRef) == false) freezeService.isFrozen(actionedUponNodeRef) == false)
{ {
freezeService.freeze((String) action.getParameterValue(PARAM_REASON), actionedUponNodeRef); freezeService.freeze((String) action.getParameterValue(PARAM_REASON), actionedUponNodeRef);

View File

@@ -49,7 +49,7 @@ public class OpenRecordFolderAction extends RMActionExecuterAbstractBase
@Override @Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
{ {
if (nodeService.exists(actionedUponNodeRef) == true && if (nodeService.exists(actionedUponNodeRef) &&
freezeService.isFrozen(actionedUponNodeRef) == false) freezeService.isFrozen(actionedUponNodeRef) == false)
{ {
// TODO move re-open logic into a service method // 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); 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); nodeService.setProperty(actionedUponNodeRef, PROP_IS_CLOSED, false);
} }

View File

@@ -47,7 +47,7 @@ public class RejectAction extends RMActionExecuterAbstractBase
@Override @Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
{ {
if (nodeService.exists(actionedUponNodeRef) == true && if (nodeService.exists(actionedUponNodeRef) &&
freezeService.isFrozen(actionedUponNodeRef) == false && freezeService.isFrozen(actionedUponNodeRef) == false &&
nodeService.getProperty(actionedUponNodeRef, PROP_RECORD_ORIGINATING_LOCATION) != null) nodeService.getProperty(actionedUponNodeRef, PROP_RECORD_ORIGINATING_LOCATION) != null)
{ {

View File

@@ -79,9 +79,9 @@ public class RequestInfoAction extends RMActionExecuterAbstractBase
@Override @Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
{ {
if (nodeService.exists(actionedUponNodeRef) == true && if (nodeService.exists(actionedUponNodeRef) &&
nodeService.hasAspect(actionedUponNodeRef, ContentModel.ASPECT_PENDING_DELETE) == false && nodeService.hasAspect(actionedUponNodeRef, ContentModel.ASPECT_PENDING_DELETE) == false &&
recordService.isRecord(actionedUponNodeRef) == true && recordService.isRecord(actionedUponNodeRef) &&
recordService.isDeclared(actionedUponNodeRef) == false) recordService.isDeclared(actionedUponNodeRef) == false)
{ {
String workflowDefinitionId = workflowService.getDefinitionByName(REQUEST_INFO_WORKFLOW_DEFINITION_NAME).getId(); String workflowDefinitionId = workflowService.getDefinitionByName(REQUEST_INFO_WORKFLOW_DEFINITION_NAME).getId();
@@ -96,7 +96,7 @@ public class RequestInfoAction extends RMActionExecuterAbstractBase
} }
else 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() + "'.");
} }
} }

View File

@@ -84,7 +84,7 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
Map<QName, AssociationDefinition> map = recordsManagementAdminService.getCustomReferenceDefinitions(); Map<QName, AssociationDefinition> map = recordsManagementAdminService.getCustomReferenceDefinitions();
for (Map.Entry<QName, AssociationDefinition> entry : map.entrySet()) 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(); relationshipQName = entry.getKey();
break; break;
@@ -107,12 +107,12 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
// get node type // get node type
nodeService.getType(actionedUponNodeRef); nodeService.getType(actionedUponNodeRef);
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("split email:" + actionedUponNodeRef); logger.debug("split email:" + actionedUponNodeRef);
} }
if (recordService.isRecord(actionedUponNodeRef) == true) if (recordService.isRecord(actionedUponNodeRef))
{ {
if (recordService.isDeclared(actionedUponNodeRef) == false) if (recordService.isDeclared(actionedUponNodeRef) == false)
{ {
@@ -124,7 +124,7 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
List<AssociationRef> refs = nodeService.getTargetAssocs(actionedUponNodeRef, ImapModel.ASSOC_IMAP_ATTACHMENT); List<AssociationRef> refs = nodeService.getTargetAssocs(actionedUponNodeRef, ImapModel.ASSOC_IMAP_ATTACHMENT);
if(refs.size() > 0) if(refs.size() > 0)
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("mail message has already been split - do nothing"); logger.debug("mail message has already been split - do nothing");
} }

View File

@@ -43,8 +43,8 @@ public class UnCutoffAction extends RMActionExecuterAbstractBase
@Override @Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
{ {
if (nodeService.hasAspect(actionedUponNodeRef, ASPECT_DISPOSITION_LIFECYCLE) == true && if (nodeService.hasAspect(actionedUponNodeRef, ASPECT_DISPOSITION_LIFECYCLE) &&
nodeService.hasAspect(actionedUponNodeRef, ASPECT_CUT_OFF) == true) nodeService.hasAspect(actionedUponNodeRef, ASPECT_CUT_OFF))
{ {
// Get the last disposition action // Get the last disposition action
DispositionAction da = dispositionService.getLastCompletedDispostionAction(actionedUponNodeRef); DispositionAction da = dispositionService.getLastCompletedDispostionAction(actionedUponNodeRef);
@@ -58,7 +58,7 @@ public class UnCutoffAction extends RMActionExecuterAbstractBase
// Remove the cutoff aspect // Remove the cutoff aspect
nodeService.removeAspect(actionedUponNodeRef, ASPECT_CUT_OFF); nodeService.removeAspect(actionedUponNodeRef, ASPECT_CUT_OFF);
if (recordFolderService.isRecordFolder(actionedUponNodeRef) == true) if (recordFolderService.isRecordFolder(actionedUponNodeRef))
{ {
List<NodeRef> records = recordService.getRecords(actionedUponNodeRef); List<NodeRef> records = recordService.getRecords(actionedUponNodeRef);
for (NodeRef record : records) for (NodeRef record : records)

View File

@@ -44,12 +44,12 @@ public class UndeclareRecordAction extends RMActionExecuterAbstractBase
@Override @Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) 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 // repoen if already complete and not frozen
if (recordService.isDeclared(actionedUponNodeRef) == true && if (recordService.isDeclared(actionedUponNodeRef) &&
freezeService.isFrozen(actionedUponNodeRef) == false) freezeService.isFrozen(actionedUponNodeRef) == false)
{ {
// Remove the declared aspect // Remove the declared aspect

View File

@@ -53,7 +53,7 @@ public class UndoEventAction extends RMActionExecuterAbstractBase
{ {
String eventName = (String)action.getParameterValue(PARAM_EVENT_NAME); 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 // Get the next disposition action
DispositionAction da = this.dispositionService.getNextDispositionAction(actionedUponNodeRef); DispositionAction da = this.dispositionService.getNextDispositionAction(actionedUponNodeRef);
@@ -96,7 +96,7 @@ public class UndoEventAction extends RMActionExecuterAbstractBase
List<EventCompletionDetails> events = da.getEventCompletionDetails(); List<EventCompletionDetails> events = da.getEventCompletionDetails();
for (EventCompletionDetails event : events) for (EventCompletionDetails event : events)
{ {
if (eventName.equals(event.getEventName()) == true) if (eventName.equals(event.getEventName()))
{ {
result = event; result = event;
break; break;
@@ -131,7 +131,7 @@ public class UndoEventAction extends RMActionExecuterAbstractBase
{ {
for (EventCompletionDetails event : events) for (EventCompletionDetails event : events)
{ {
if (event.isEventComplete() == true) if (event.isEventComplete())
{ {
eligible = true; eligible = true;
break; break;

View File

@@ -291,7 +291,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
@Override @Override
public void registerAuditEvent(AuditEvent auditEvent) public void registerAuditEvent(AuditEvent auditEvent)
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("Registering audit event " + auditEvent.getName()); 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) 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 // deal with immediate auditing if required
if (immediate == true) if (immediate)
{ {
Map<String, Serializable> auditMap = buildAuditMap(nodeRef, eventName, before, after, removeIfNoPropertyChanged); Map<String, Serializable> auditMap = buildAuditMap(nodeRef, eventName, before, after, removeIfNoPropertyChanged);
auditComponent.recordAuditValues(RM_AUDIT_PATH_ROOT, auditMap); 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); 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 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(); auditMap.clear();
} }
@@ -1371,7 +1371,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
json.put("fullName", entry.getFullName() == null ? "": entry.getFullName()); json.put("fullName", entry.getFullName() == null ? "": entry.getFullName());
json.put("nodeRef", entry.getNodeRef() == null ? "": entry.getNodeRef()); 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(); NodeRef nodeRef = entry.getNodeRef();
String userName = (String)nodeService.getProperty(nodeRef, ContentModel.PROP_USERNAME); String userName = (String)nodeService.getProperty(nodeRef, ContentModel.PROP_USERNAME);

View File

@@ -53,7 +53,7 @@ public class CopyAuditEvent extends AuditEvent implements OnCopyCompletePolicy
boolean copyToNewNode, boolean copyToNewNode,
Map<NodeRef, NodeRef> copyMap) Map<NodeRef, NodeRef> copyMap)
{ {
if (copyToNewNode == true) if (copyToNewNode)
{ {
recordsManagementAuditService.auditEvent(targetNodeRef, getName()); recordsManagementAuditService.auditEvent(targetNodeRef, getName());
} }

View File

@@ -105,7 +105,7 @@ public abstract class AbstractCapability extends RMSecurityCommon
if (StringUtils.isBlank(title)) if (StringUtils.isBlank(title))
{ {
title = I18NUtil.getMessage("capability." + getName() + ".title"); title = I18NUtil.getMessage("capability." + getName() + ".title");
if (StringUtils.isBlank(title) == true) if (StringUtils.isBlank(title))
{ {
title = getName(); title = getName();
} }

View File

@@ -81,7 +81,7 @@ public class CapabilityServiceImpl implements CapabilityService
public Set<Capability> getCapabilities(boolean includePrivate) public Set<Capability> getCapabilities(boolean includePrivate)
{ {
Set<Capability> result = null; Set<Capability> result = null;
if (includePrivate == true) if (includePrivate)
{ {
result = new HashSet<Capability>(capabilities.values()); result = new HashSet<Capability>(capabilities.values());
} }

View File

@@ -125,7 +125,7 @@ public class RMEntryVoter extends RMSecurityCommon
{ {
MethodInvocation mi = (MethodInvocation)object; MethodInvocation mi = (MethodInvocation)object;
if (TransactionalResourceHelper.isResourcePresent("voting") == true) if (TransactionalResourceHelper.isResourcePresent("voting"))
{ {
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
{ {

View File

@@ -173,11 +173,11 @@ public class RMSecurityCommon implements ApplicationContextAware
{ {
int result = AccessDecisionVoter.ACCESS_ABSTAIN; 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); result = checkRmRead(nodeRef);
} }
else if (allowDMRead == true) else if (allowDMRead)
{ {
// Check DM read for copy etc // Check DM read for copy etc
// DM does not grant - it can only deny // DM does not grant - it can only deny

View File

@@ -214,7 +214,7 @@ public class DeclarativeCapability extends AbstractCapability
{ {
result = false; result = false;
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("FAIL: Condition " + condition.getName() + " failed for capability " + getName() + " on nodeRef " + nodeRef.toString()); 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) for (String kindString : kinds)
{ {
FilePlanComponentKind kind = FilePlanComponentKind.valueOf(kindString); FilePlanComponentKind kind = FilePlanComponentKind.valueOf(kindString);
if (actualKind.equals(kind) == true) if (actualKind.equals(kind))
{ {
result = true; result = true;
break; break;
@@ -285,10 +285,10 @@ public class DeclarativeCapability extends AbstractCapability
int result = AccessDecisionVoter.ACCESS_ABSTAIN; int result = AccessDecisionVoter.ACCESS_ABSTAIN;
// Check we are dealing with a file plan component // 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 // 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 // Opportunity for child implementations to extend
result = evaluateImpl(nodeRef); result = evaluateImpl(nodeRef);
@@ -303,7 +303,7 @@ public class DeclarativeCapability extends AbstractCapability
result = onEvaluate(nodeRef, result); result = onEvaluate(nodeRef, result);
// log access denied to help with debug // 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()); 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) protected int evaluateImpl(NodeRef nodeRef)
{ {
int result = AccessDecisionVoter.ACCESS_GRANTED; int result = AccessDecisionVoter.ACCESS_GRANTED;
if (isUndetermined == true) if (isUndetermined)
{ {
result = AccessDecisionVoter.ACCESS_ABSTAIN; result = AccessDecisionVoter.ACCESS_ABSTAIN;
} }

View File

@@ -65,7 +65,7 @@ public class DeclarativeCompositeCapability extends DeclarativeCapability
// Check each capability using 'OR' logic // Check each capability using 'OR' logic
for (Capability capability : capabilities) 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); 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 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); 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; int result = AccessDecisionVoter.ACCESS_ABSTAIN;
// Check we are dealing with a file plan component // Check we are dealing with a file plan component
if (getFilePlanService().isFilePlanComponent(source) == true && if (getFilePlanService().isFilePlanComponent(source) &&
getFilePlanService().isFilePlanComponent(target) == true) getFilePlanService().isFilePlanComponent(target))
{ {
// Check the kind of the object, the permissions and the conditions // 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) if (targetCapability != null)
{ {

View File

@@ -55,7 +55,7 @@ public class AtLeastOneCondition extends AbstractCapabilityCondition
{ {
for (CapabilityCondition condition : conditions) for (CapabilityCondition condition : conditions)
{ {
if (condition.evaluate(nodeRef) == true) if (condition.evaluate(nodeRef))
{ {
result = true; result = true;
break; break;

View File

@@ -38,18 +38,18 @@ public class ClosedCapabilityCondition extends AbstractCapabilityCondition
public boolean evaluate(NodeRef nodeRef) public boolean evaluate(NodeRef nodeRef)
{ {
boolean result = false; boolean result = false;
if (recordFolderService.isRecordFolder(nodeRef) == true) if (recordFolderService.isRecordFolder(nodeRef))
{ {
result = recordFolderService.isRecordFolderClosed(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); List<ChildAssociationRef> assocs = nodeService.getParentAssocs(nodeRef, ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);
for (ChildAssociationRef assoc : assocs) for (ChildAssociationRef assoc : assocs)
{ {
NodeRef parent = assoc.getParentRef(); NodeRef parent = assoc.getParentRef();
if (recordFolderService.isRecordFolder(parent) == true && if (recordFolderService.isRecordFolder(parent) &&
recordFolderService.isRecordFolderClosed(parent) == true) recordFolderService.isRecordFolderClosed(parent))
{ {
result = true; result = true;
break; break;

View File

@@ -31,7 +31,7 @@ public class DeclaredCapabilityCondition extends AbstractCapabilityCondition
public boolean evaluate(NodeRef nodeRef) public boolean evaluate(NodeRef nodeRef)
{ {
boolean result = false; boolean result = false;
if (FilePlanComponentKind.RECORD.equals(filePlanService.getFilePlanComponentKind(nodeRef)) == true) if (FilePlanComponentKind.RECORD.equals(filePlanService.getFilePlanComponentKind(nodeRef)))
{ {
result = recordService.isDeclared(nodeRef); result = recordService.isDeclared(nodeRef);
} }

View File

@@ -37,7 +37,7 @@ private boolean checkChildren = false;
public boolean evaluate(NodeRef nodeRef) public boolean evaluate(NodeRef nodeRef)
{ {
boolean result = freezeService.isFrozen(nodeRef); boolean result = freezeService.isFrozen(nodeRef);
if (result == false && checkChildren == true) if (result == false && checkChildren)
{ {
result = freezeService.hasFrozenChildren(nodeRef); result = freezeService.hasFrozenChildren(nodeRef);
} }

View File

@@ -49,7 +49,7 @@ public class HasEventsCapabilityCondition extends AbstractCapabilityCondition
{ {
boolean result = false; boolean result = false;
if (dispositionService.isDisposableItem(nodeRef) == true) if (dispositionService.isDisposableItem(nodeRef))
{ {
DispositionAction da = dispositionService.getNextDispositionAction(nodeRef); DispositionAction da = dispositionService.getNextDispositionAction(nodeRef);
if (da != null) if (da != null)

View File

@@ -65,8 +65,8 @@ public class IsScheduledCapabilityCondition extends AbstractCapabilityCondition
{ {
// Get the disposition actions name // Get the disposition actions name
String actionName = nextDispositionAction.getName(); String actionName = nextDispositionAction.getName();
if (actionName.equals(dispositionAction) == true && if (actionName.equals(dispositionAction) &&
dispositionService.isNextDispositionActionEligible(nodeRef) == true) dispositionService.isNextDispositionActionEligible(nodeRef))
{ {
result = true; result = true;
} }

View File

@@ -36,7 +36,7 @@ public class IsTransferAccessionCapabilityCondition extends AbstractCapabilityCo
boolean result = false; boolean result = false;
FilePlanComponentKind kind = filePlanService.getFilePlanComponentKind(nodeRef); 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); Boolean value = (Boolean)nodeService.getProperty(nodeRef, PROP_TRANSFER_ACCESSION_INDICATOR);
if (value != null) if (value != null)

View File

@@ -53,7 +53,7 @@ public class LastDispositionActionCondition extends AbstractCapabilityCondition
boolean result = false; boolean result = false;
DispositionAction dispositionAction = dispositionService.getLastCompletedDispostionAction(nodeRef); DispositionAction dispositionAction = dispositionService.getLastCompletedDispostionAction(nodeRef);
if (dispositionAction != null && if (dispositionAction != null &&
dispositionActionName.equals(dispositionAction.getName()) == true) dispositionActionName.equals(dispositionAction.getName()))
{ {
result = true; result = true;
} }

View File

@@ -32,12 +32,12 @@ public class VitalRecordOrFolderCapabilityCondition extends AbstractCapabilityCo
{ {
boolean result = false; boolean result = false;
if (recordService.isRecord(nodeRef) == true) if (recordService.isRecord(nodeRef))
{ {
// Check the record for the vital record aspect // Check the record for the vital record aspect
result = nodeService.hasAspect(nodeRef, RecordsManagementModel.ASPECT_VITAL_RECORD); 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 // Check the folder for the vital record indicator
Boolean value = (Boolean)nodeService.getProperty(nodeRef, RecordsManagementModel.PROP_VITAL_RECORD_INDICATOR); Boolean value = (Boolean)nodeService.getProperty(nodeRef, RecordsManagementModel.PROP_VITAL_RECORD_INDICATOR);

View File

@@ -35,13 +35,13 @@ public final class ViewRecordsCapability extends DeclarativeCapability
{ {
if (nodeRef != null) if (nodeRef != null)
{ {
if (getFilePlanService().isFilePlanComponent(nodeRef) == true) if (getFilePlanService().isFilePlanComponent(nodeRef))
{ {
return checkRmRead(nodeRef); return checkRmRead(nodeRef);
} }
else 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() + ")"); logger.debug("View Records capability abstains, because node is not a file plan component. (nodeRef=" + nodeRef.toString() + ")");
} }

View File

@@ -355,7 +355,7 @@ public class DataSetServiceImpl implements DataSetService, RecordsManagementMode
logger.info("Bootstraping " + rmRoots.size() + " rm roots ..."); logger.info("Bootstraping " + rmRoots.size() + " rm roots ...");
for (NodeRef rmRoot : rmRoots) for (NodeRef rmRoot : rmRoots)
{ {
if (permissionService.getInheritParentPermissions(rmRoot) == true) if (permissionService.getInheritParentPermissions(rmRoot))
{ {
logger.info("Updating permissions for rm root: " + rmRoot); logger.info("Updating permissions for rm root: " + rmRoot);
permissionService.setInheritParentPermissions(rmRoot, false); permissionService.setInheritParentPermissions(rmRoot, false);
@@ -397,7 +397,7 @@ public class DataSetServiceImpl implements DataSetService, RecordsManagementMode
String containerName = (String) nodeService.getProperty(container, ContentModel.PROP_NAME); String containerName = (String) nodeService.getProperty(container, ContentModel.PROP_NAME);
// Set permissions // Set permissions
if (permissionService.getInheritParentPermissions(container) == true) if (permissionService.getInheritParentPermissions(container))
{ {
logger.info("Updating permissions for record container: " + containerName); logger.info("Updating permissions for record container: " + containerName);
permissionService.setInheritParentPermissions(container, false); permissionService.setInheritParentPermissions(container, false);
@@ -422,7 +422,7 @@ public class DataSetServiceImpl implements DataSetService, RecordsManagementMode
String folderName = (String) nodeService.getProperty(recordFolder, ContentModel.PROP_NAME); String folderName = (String) nodeService.getProperty(recordFolder, ContentModel.PROP_NAME);
// Set permissions // Set permissions
if (permissionService.getInheritParentPermissions(recordFolder) == true) if (permissionService.getInheritParentPermissions(recordFolder))
{ {
logger.info("Updating permissions for record folder: " + folderName); logger.info("Updating permissions for record folder: " + folderName);
permissionService.setInheritParentPermissions(recordFolder, false); permissionService.setInheritParentPermissions(recordFolder, false);

View File

@@ -202,7 +202,7 @@ public class DispositionActionDefinitionImpl implements DispositionActionDefinit
{ {
boolean result = true; boolean result = true;
String value = (String)nodeService.getProperty(this.dispositionActionNodeRef, PROP_DISPOSITION_EVENT_COMBINATION); 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; result = false;
} }

View File

@@ -178,7 +178,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
if (nodeService.hasAspect(nodeRef, ASPECT_DISPOSITION_LIFECYCLE) == false) if (nodeService.hasAspect(nodeRef, ASPECT_DISPOSITION_LIFECYCLE) == false)
{ {
DispositionSchedule di = getDispositionSchedule(nodeRef); DispositionSchedule di = getDispositionSchedule(nodeRef);
if (di != null && di.isRecordLevelDisposition() == true) if (di != null && di.isRecordLevelDisposition())
{ {
nodeService.addAspect(nodeRef, ASPECT_DISPOSITION_LIFECYCLE, null); nodeService.addAspect(nodeRef, ASPECT_DISPOSITION_LIFECYCLE, null);
} }
@@ -231,7 +231,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
for (DispositionProperty dispositionProperty : values) for (DispositionProperty dispositionProperty : values)
{ {
boolean test = dispositionProperty.applies(isRecordLevel, dispositionAction); boolean test = dispositionProperty.applies(isRecordLevel, dispositionAction);
if (test == true) if (test)
{ {
result.add(dispositionProperty); result.add(dispositionProperty);
} }
@@ -257,7 +257,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
{ {
DispositionSchedule di = null; DispositionSchedule di = null;
NodeRef diNodeRef = null; NodeRef diNodeRef = null;
if (isRecord(nodeRef) == true) if (isRecord(nodeRef))
{ {
// Get the record folders for the record // Get the record folders for the record
List<NodeRef> recordFolders = recordFolderService.getRecordFolders(nodeRef); List<NodeRef> recordFolders = recordFolderService.getRecordFolders(nodeRef);
@@ -292,7 +292,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
if (result == null) if (result == null)
{ {
NodeRef parent = this.nodeService.getPrimaryParent(nodeRef).getParentRef(); NodeRef parent = this.nodeService.getPrimaryParent(nodeRef).getParentRef();
if (parent != null && filePlanService.isRecordCategory(parent) == true) if (parent != null && filePlanService.isRecordCategory(parent))
{ {
result = getDispositionScheduleImpl(parent); result = getDispositionScheduleImpl(parent);
} }
@@ -309,7 +309,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
// Check the noderef parameter // Check the noderef parameter
ParameterCheck.mandatory("nodeRef", nodeRef); ParameterCheck.mandatory("nodeRef", nodeRef);
if (nodeService.exists(nodeRef) == true) if (nodeService.exists(nodeRef))
{ {
// Get the associated disposition schedule node reference // Get the associated disposition schedule node reference
NodeRef dsNodeRef = getAssociatedDispositionScheduleImpl(nodeRef); 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() + ")"); 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); List<ChildAssociationRef> childAssocs = this.nodeService.getChildAssocs(nodeRef, ASSOC_DISPOSITION_SCHEDULE, RegexQNamePattern.MATCH_ALL);
if (childAssocs.size() != 0) if (childAssocs.size() != 0)
@@ -363,7 +363,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
NodeRef result = null; NodeRef result = null;
NodeRef dsNodeRef = dispositionSchedule.getNodeRef(); 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); List<ChildAssociationRef> assocs = this.nodeService.getParentAssocs(dsNodeRef, ASSOC_DISPOSITION_SCHEDULE, RegexQNamePattern.MATCH_ALL);
if (assocs.size() != 0) 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 // 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 // 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. " + 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. " + "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()); List<NodeRef> result = new ArrayList<NodeRef>(items.size());
for (NodeRef item : items) for (NodeRef item : items)
{ {
if (recordFolderService.isRecordFolder(item) == true) if (recordFolderService.isRecordFolder(item))
{ {
if (isRecordLevelDisposition == true) if (isRecordLevelDisposition)
{ {
result.addAll(recordService.getRecords(item)); result.addAll(recordService.getRecords(item));
} }
@@ -445,7 +445,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
result.add(item); result.add(item);
} }
} }
else if (filePlanService.isRecordCategory(item) == true) else if (filePlanService.isRecordCategory(item))
{ {
if (getAssociatedDispositionScheduleImpl(item) == null) if (getAssociatedDispositionScheduleImpl(item) == null)
{ {
@@ -564,7 +564,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
public void removeDispositionActionDefinition(DispositionSchedule schedule, DispositionActionDefinition actionDefinition) public void removeDispositionActionDefinition(DispositionSchedule schedule, DispositionActionDefinition actionDefinition)
{ {
// check first whether action definitions can be removed // 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 '" + throw new AlfrescoRuntimeException("Can not remove action definitions from schedule '" +
schedule.getNodeRef() + "' as one or more record or record folders are present."); 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); DispositionSchedule di = getDispositionSchedule(nodeRef);
NodeRef nextDa = getNextDispositionActionNodeRef(nodeRef); NodeRef nextDa = getNextDispositionActionNodeRef(nodeRef);
if (di != null && if (di != null &&
this.nodeService.hasAspect(nodeRef, ASPECT_DISPOSITION_LIFECYCLE) == true && this.nodeService.hasAspect(nodeRef, ASPECT_DISPOSITION_LIFECYCLE) &&
nextDa != null) nextDa != null)
{ {
// If it has an asOf date and it is greater than now the action is eligible // 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); Date asOf = (Date)this.nodeService.getProperty(nextDa, PROP_DISPOSITION_AS_OF);
if (asOf != null && if (asOf != null &&
asOf.before(new Date()) == true) asOf.before(new Date()))
{ {
result = true; result = true;
} }
@@ -733,10 +733,10 @@ public class DispositionServiceImpl extends ServiceBaseImpl
isComplete = isCompleteValue.booleanValue(); isComplete = isCompleteValue.booleanValue();
// implement AND and OR combination of event completions // implement AND and OR combination of event completions
if (isComplete == true) if (isComplete)
{ {
result = true; result = true;
if (firstComplete == true) if (firstComplete)
{ {
break; break;
} }
@@ -855,7 +855,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
{ {
// Get the current action node // Get the current action node
NodeRef currentDispositionAction = null; 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); List<ChildAssociationRef> assocs = nodeService.getChildAssocs(nodeRef, ASSOC_NEXT_DISPOSITION_ACTION, RegexQNamePattern.MATCH_ALL);
if (assocs.size() > 0) if (assocs.size() > 0)

View File

@@ -152,8 +152,8 @@ public class DispositionProperty extends BaseBehaviourBean
{ {
boolean result = false; boolean result = false;
if ((isRecordLevel == true && appliesToRecordLevel == true) || if ((isRecordLevel && appliesToRecordLevel) ||
(isRecordLevel == false && appliesToFolderLevel == true)) (isRecordLevel == false && appliesToFolderLevel))
{ {
if (excludedDispositionActions != null && excludedDispositionActions.size() != 0) if (excludedDispositionActions != null && excludedDispositionActions.size() != 0)
{ {
@@ -186,10 +186,10 @@ public class DispositionProperty extends BaseBehaviourBean
final Map<QName, Serializable> before, final Map<QName, Serializable> before,
final Map<QName, Serializable> after) final Map<QName, Serializable> after)
{ {
if (nodeService.exists(nodeRef) == true) if (nodeService.exists(nodeRef))
{ {
// has the property we care about changed? // has the property we care about changed?
if (isPropertyUpdated(before, after) == true) if (isPropertyUpdated(before, after))
{ {
AuthenticationUtil.runAs(new RunAsWork<Void>() AuthenticationUtil.runAs(new RunAsWork<Void>()
{ {
@@ -206,7 +206,7 @@ public class DispositionProperty extends BaseBehaviourBean
if (daDefinition != null) if (daDefinition != null)
{ {
// check whether the next disposition action matches this disposition property // 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(); Period period = daDefinition.getPeriod();
Date updatedAsOf = period.getNextDate(updatedDateValue); Date updatedAsOf = period.getNextDate(updatedDateValue);

View File

@@ -84,7 +84,7 @@ public class DOD5015RecordAspect extends BaseBehaviourBean
boolean result = false; boolean result = false;
NodeRef filePlan = filePlanService.getFilePlan(record); 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)); result = TYPE_DOD_5015_FILE_PLAN.equals(nodeService.getType(filePlan));
} }

View File

@@ -150,7 +150,7 @@ public class CustomEmailMappingServiceImpl extends AbstractLifecycleBean impleme
if (customMappings == null) if (customMappings == null)
{ {
// if we have a config file // 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 // load the contents of the config file
customMappings = loadConfig(); customMappings = loadConfig();
@@ -213,7 +213,7 @@ public class CustomEmailMappingServiceImpl extends AbstractLifecycleBean impleme
// check whether we already have this mapping or not // check whether we already have this mapping or not
Set<CustomMapping> customMappings = getCustomMappings(); 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."); 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 // check whether we already have this mapping or not
Set<CustomMapping> customMappings = getCustomMappings(); 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 // else remove the custom mapping (since we have already called getCustomMapping we can be sure
// the member variable is populated) // the member variable is populated)
@@ -402,7 +402,7 @@ public class CustomEmailMappingServiceImpl extends AbstractLifecycleBean impleme
catch (Throwable e) catch (Throwable e)
{ {
// log a warning // log a warning
if (logger.isWarnEnabled() == true) if (logger.isWarnEnabled())
{ {
logger.warn(e.getMessage()); logger.warn(e.getMessage());
} }

View File

@@ -66,7 +66,7 @@ public class RFC822MetadataExtracter extends org.alfresco.repo.content.metadata.
Map<QName, Serializable> clone = new HashMap<QName, Serializable>(systemProperties); Map<QName, Serializable> clone = new HashMap<QName, Serializable>(systemProperties);
for (QName propName : clone.keySet()) for (QName propName : clone.keySet())
{ {
if (RecordsManagementModel.RM_URI.equals(propName.getNamespaceURI()) == true) if (RecordsManagementModel.RM_URI.equals(propName.getNamespaceURI()))
{ {
systemProperties.remove(propName); systemProperties.remove(propName);
} }

View File

@@ -109,7 +109,7 @@ public class OnReferenceCreateEventType extends SimpleRecordsManagementEventType
public Object doWork() throws Exception public Object doWork() throws Exception
{ {
// Check whether it is the reference type we care about // 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); DispositionAction da = dispositionService.getNextDispositionAction(toNodeRef);
if (da != null) if (da != null)
@@ -119,7 +119,7 @@ public class OnReferenceCreateEventType extends SimpleRecordsManagementEventType
{ {
RecordsManagementEvent rmEvent = recordsManagementEventService.getEvent(event.getEventName()); RecordsManagementEvent rmEvent = recordsManagementEventService.getEvent(event.getEventName());
if (event.isEventComplete() == false && if (event.isEventComplete() == false &&
rmEvent.getType().equals(getName()) == true) rmEvent.getType().equals(getName()))
{ {
// Complete the event // Complete the event
Map<String, Serializable> params = new HashMap<String, Serializable>(3); Map<String, Serializable> params = new HashMap<String, Serializable>(3);

View File

@@ -147,17 +147,17 @@ public class RecordsManagementEventServiceImpl implements RecordsManagementEvent
boolean canCreateEvent = true; boolean canCreateEvent = true;
if (existsEvent(eventName) == true) if (existsEvent(eventName))
{ {
canCreateEvent = false; canCreateEvent = false;
} }
if (canCreateEvent == true) if (canCreateEvent)
{ {
for (Iterator iterator = getEventMap().values().iterator(); iterator.hasNext();) for (Iterator iterator = getEventMap().values().iterator(); iterator.hasNext();)
{ {
RecordsManagementEvent recordsManagementEvent = (RecordsManagementEvent) iterator.next(); RecordsManagementEvent recordsManagementEvent = (RecordsManagementEvent) iterator.next();
if (recordsManagementEvent.getDisplayLabel().equalsIgnoreCase(eventDisplayLabel) == true) if (recordsManagementEvent.getDisplayLabel().equalsIgnoreCase(eventDisplayLabel))
{ {
canCreateEvent = false; canCreateEvent = false;
break; break;
@@ -188,9 +188,9 @@ public class RecordsManagementEventServiceImpl implements RecordsManagementEvent
for (Iterator iterator = getEventMap().values().iterator(); iterator.hasNext();) for (Iterator iterator = getEventMap().values().iterator(); iterator.hasNext();)
{ {
RecordsManagementEvent recordsManagementEvent = (RecordsManagementEvent) iterator.next(); 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) if (recordsManagementEvent.getType().equalsIgnoreCase(eventType) == false)
{ {

View File

@@ -179,8 +179,8 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
public boolean isFilePlanComponent(NodeRef nodeRef) public boolean isFilePlanComponent(NodeRef nodeRef)
{ {
boolean result = false; boolean result = false;
if (getInternalNodeService().exists(nodeRef) == true && if (getInternalNodeService().exists(nodeRef) &&
getInternalNodeService().hasAspect(nodeRef, ASPECT_FILE_PLAN_COMPONENT) == true) getInternalNodeService().hasAspect(nodeRef, ASPECT_FILE_PLAN_COMPONENT))
{ {
result = true; result = true;
} }
@@ -194,23 +194,23 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{ {
FilePlanComponentKind result = null; FilePlanComponentKind result = null;
if (isFilePlanComponent(nodeRef) == true) if (isFilePlanComponent(nodeRef))
{ {
result = FilePlanComponentKind.FILE_PLAN_COMPONENT; result = FilePlanComponentKind.FILE_PLAN_COMPONENT;
if (isFilePlan(nodeRef) == true) if (isFilePlan(nodeRef))
{ {
result = FilePlanComponentKind.FILE_PLAN; result = FilePlanComponentKind.FILE_PLAN;
} }
else if (isRecordCategory(nodeRef) == true) else if (isRecordCategory(nodeRef))
{ {
result = FilePlanComponentKind.RECORD_CATEGORY; result = FilePlanComponentKind.RECORD_CATEGORY;
} }
else if (getRecordFolderService().isRecordFolder(nodeRef) == true) else if (getRecordFolderService().isRecordFolder(nodeRef))
{ {
result = FilePlanComponentKind.RECORD_FOLDER; result = FilePlanComponentKind.RECORD_FOLDER;
} }
else if (getRecordService().isRecord(nodeRef) == true) else if (getRecordService().isRecord(nodeRef))
{ {
result = FilePlanComponentKind.RECORD; result = FilePlanComponentKind.RECORD;
} }
@@ -222,23 +222,23 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{ {
result = FilePlanComponentKind.HOLD_CONTAINER_CHILD; result = FilePlanComponentKind.HOLD_CONTAINER_CHILD;
} }
else if (getFreezeService().isHold(nodeRef) == true) else if (getFreezeService().isHold(nodeRef))
{ {
result = FilePlanComponentKind.HOLD; result = FilePlanComponentKind.HOLD;
} }
else if (getTransferService().isTransfer(nodeRef) == true) else if (getTransferService().isTransfer(nodeRef))
{ {
result = FilePlanComponentKind.TRANSFER; 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; 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; 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; result = FilePlanComponentKind.UNFILED_RECORD_CONTAINER_CHILD;
} }
@@ -255,36 +255,36 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
{ {
FilePlanComponentKind result = null; FilePlanComponentKind result = null;
if (ASPECT_FILE_PLAN_COMPONENT.equals(type) == true) if (ASPECT_FILE_PLAN_COMPONENT.equals(type))
{ {
result = FilePlanComponentKind.FILE_PLAN_COMPONENT; result = FilePlanComponentKind.FILE_PLAN_COMPONENT;
} }
else if (dictionaryService.isSubClass(type, ASPECT_RECORD) == true) else if (dictionaryService.isSubClass(type, ASPECT_RECORD))
{ {
result = FilePlanComponentKind.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; 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; 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; result = FilePlanComponentKind.RECORD_FOLDER;
} }
else if (dictionaryService.isSubClass(type, TYPE_HOLD) == true) else if (dictionaryService.isSubClass(type, TYPE_HOLD))
{ {
result = FilePlanComponentKind.HOLD; result = FilePlanComponentKind.HOLD;
} }
else if (dictionaryService.isSubClass(type, TYPE_TRANSFER) == true) else if (dictionaryService.isSubClass(type, TYPE_TRANSFER))
{ {
result = FilePlanComponentKind.TRANSFER; result = FilePlanComponentKind.TRANSFER;
} }
else if (dictionaryService.isSubClass(type, TYPE_DISPOSITION_SCHEDULE) == true || else if (dictionaryService.isSubClass(type, TYPE_DISPOSITION_SCHEDULE) ||
dictionaryService.isSubClass(type, TYPE_DISPOSITION_ACTION_DEFINITION) == true) dictionaryService.isSubClass(type, TYPE_DISPOSITION_ACTION_DEFINITION))
{ {
result = FilePlanComponentKind.DISPOSITION_SCHEDULE; result = FilePlanComponentKind.DISPOSITION_SCHEDULE;
} }
@@ -326,7 +326,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
public boolean handle(Pair<Long, NodeRef> nodePair) public boolean handle(Pair<Long, NodeRef> nodePair)
{ {
NodeRef nodeRef = nodePair.getSecond(); NodeRef nodeRef = nodePair.getSecond();
if (storeRef.equals(nodeRef.getStoreRef()) == true) if (storeRef.equals(nodeRef.getStoreRef()))
{ {
results.add(nodeRef); results.add(nodeRef);
} }
@@ -348,10 +348,10 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
SiteInfo siteInfo = getSiteService().getSite(siteId); SiteInfo siteInfo = getSiteService().getSite(siteId);
if (siteInfo != null) 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); NodeRef nodeRef = getSiteService().getContainer(siteId, FILE_PLAN_CONTAINER);
if (instanceOf(nodeRef, TYPE_FILE_PLAN) == true) if (instanceOf(nodeRef, TYPE_FILE_PLAN))
{ {
filePlan = nodeRef; filePlan = nodeRef;
} }
@@ -517,7 +517,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
// Check the parent is not already an RM component node // Check the parent is not already an RM component node
// ie: you can't create a rm root in an existing rm hierarchy // 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)); throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_DUP_ROOT));
} }
@@ -742,16 +742,16 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
NodeRef child = assoc.getChildRef(); NodeRef child = assoc.getChildRef();
QName childType = nodeService.getType(child); QName childType = nodeService.getType(child);
if (typeFilter == null || if (typeFilter == null ||
typeFilter.equals(childType) == true || typeFilter.equals(childType) ||
dictionaryService.isSubClass(childType, typeFilter) == true) dictionaryService.isSubClass(childType, typeFilter))
{ {
result.add(child); result.add(child);
} }
// Inspect the containers and add children if deep // Inspect the containers and add children if deep
if (deep == true && if (deep &&
(TYPE_RECORD_CATEGORY.equals(childType) == true || (TYPE_RECORD_CATEGORY.equals(childType) ||
dictionaryService.isSubClass(childType, TYPE_RECORD_CATEGORY) == true)) dictionaryService.isSubClass(childType, TYPE_RECORD_CATEGORY)))
{ {
result.addAll(getContained(child, typeFilter, deep)); result.addAll(getContained(child, typeFilter, deep));
} }

View File

@@ -142,7 +142,7 @@ public abstract class RecordsManagementFormFilter<ItemType> extends AbstractFilt
form.addField(field); form.addField(field);
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("Adding custom property .. " + prop.getName().toString() + " .. with value " + value + ".. to group .. " + setId); logger.debug("Adding custom property .. " + prop.getName().toString() + " .. with value " + value + ".. to group .. " + setId);
} }

View File

@@ -103,13 +103,13 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
Form form, Form form,
Map<String, Object> context) Map<String, Object> context)
{ {
if (filePlanService.isFilePlanComponent(nodeRef) == true) if (filePlanService.isFilePlanComponent(nodeRef))
{ {
// add all the custom properties // add all the custom properties
addCustomPropertyFieldsToGroup(form, nodeRef); addCustomPropertyFieldsToGroup(form, nodeRef);
FilePlanComponentKind kind = filePlanService.getFilePlanComponentKind(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 // add all the record meta-data aspect properties
addRecordMetadataPropertyFieldsToGroup(form, nodeRef); addRecordMetadataPropertyFieldsToGroup(form, nodeRef);
@@ -129,7 +129,7 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
protectEmailExtractedFields(form, nodeRef); protectEmailExtractedFields(form, nodeRef);
} }
} }
else if (FilePlanComponentKind.RECORD_FOLDER.equals(kind) == true) else if (FilePlanComponentKind.RECORD_FOLDER.equals(kind))
{ {
// add the supplemental marking list property // add the supplemental marking list property
forceSupplementalMarkingListProperty(form, nodeRef); forceSupplementalMarkingListProperty(form, nodeRef);
@@ -137,13 +137,13 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
// add required transient properties // add required transient properties
addTransientProperties(form, nodeRef); 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 // 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 // schedule to determine whether the disposition level can be changed i.e. record
// level or folder level. // level or folder level.
DispositionSchedule schedule = new DispositionScheduleImpl(this.rmServiceRegistry, this.nodeService, nodeRef); DispositionSchedule schedule = new DispositionScheduleImpl(this.rmServiceRegistry, this.nodeService, nodeRef);
if (dispositionService.hasDisposableItems(schedule) == true) if (dispositionService.hasDisposableItems(schedule))
{ {
protectRecordLevelDispositionPropertyField(form); protectRecordLevelDispositionPropertyField(form);
} }
@@ -163,7 +163,7 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
// Compatibility support: don't show category properties if node of type series // Compatibility support: don't show category properties if node of type series
QName type = nodeService.getType(nodeRef); 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 // remove record category from the list of customisable types to apply to the form
customisables.remove(TYPE_RECORD_CATEGORY); customisables.remove(TYPE_RECORD_CATEGORY);
@@ -186,7 +186,7 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
for (QName aspect : aspects) for (QName aspect : aspects)
{ {
if (nodeService.hasAspect(nodeRef, aspect) == true) if (nodeService.hasAspect(nodeRef, aspect))
{ {
String aspectName = aspect.getPrefixedQName(namespaceService).toPrefixString().replace(":", "-"); String aspectName = aspect.getPrefixedQName(namespaceService).toPrefixString().replace(":", "-");
String setId = RM_METADATA_PREFIX + aspectName; String setId = RM_METADATA_PREFIX + aspectName;
@@ -240,7 +240,7 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
*/ */
protected void addTransientProperties(Form form, NodeRef nodeRef) 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)); addTransientPropertyField(form, TRANSIENT_DECLARED, DataTypeDefinition.BOOLEAN, recordService.isDeclared(nodeRef));
} }
@@ -308,7 +308,7 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
prefixName = fieldDef.getName(); prefixName = fieldDef.getName();
} }
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("Checking property " + prefixName + " is editable by user " + AuthenticationUtil.getFullyAuthenticatedUser()); 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); QName qname = QName.createQName(prefixName, namespaceService);
if (recordService.isPropertyEditable(nodeRef, qname) == false) if (recordService.isPropertyEditable(nodeRef, qname) == false)
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... protected property"); 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"); logger.debug("Set email related fields to be protected");
} }

View File

@@ -93,7 +93,7 @@ public class RecordsManagementTypeFormFilter extends RecordsManagementFormFilter
Map<String, Object> context) Map<String, Object> context)
{ {
QName typeName = type.getName(); QName typeName = type.getName();
if (rmAdminService.isCustomisable(typeName) == true) if (rmAdminService.isCustomisable(typeName))
{ {
addCustomRMProperties(typeName, form); addCustomRMProperties(typeName, form);
} }
@@ -102,7 +102,7 @@ public class RecordsManagementTypeFormFilter extends RecordsManagementFormFilter
Set<QName> aspects = type.getDefaultAspectNames(); Set<QName> aspects = type.getDefaultAspectNames();
for (QName aspect : aspects) for (QName aspect : aspects)
{ {
if (rmAdminService.isCustomisable(aspect) == true) if (rmAdminService.isCustomisable(aspect))
{ {
addCustomRMProperties(aspect, form); addCustomRMProperties(aspect, form);
} }
@@ -113,17 +113,17 @@ public class RecordsManagementTypeFormFilter extends RecordsManagementFormFilter
for (FieldDefinition fieldDef : fieldDefs) for (FieldDefinition fieldDef : fieldDefs)
{ {
String prefixName = fieldDef.getName(); String prefixName = fieldDef.getName();
if (prefixName.equals("rma:identifier") == true) if (prefixName.equals("rma:identifier"))
{ {
String defaultId = identifierService.generateIdentifier(typeName, null); String defaultId = identifierService.generateIdentifier(typeName, null);
fieldDef.setDefaultValue(defaultId); fieldDef.setDefaultValue(defaultId);
} }
// NOTE: we set these defaults in the form for backwards compatibility reasons (RM-753) // 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()); fieldDef.setDefaultValue(Boolean.FALSE.toString());
} }
else if (prefixName.equals("rma:reviewPeriod") == true) else if (prefixName.equals("rma:reviewPeriod"))
{ {
fieldDef.setDefaultValue("none|0"); fieldDef.setDefaultValue("none|0");
} }
@@ -147,7 +147,7 @@ public class RecordsManagementTypeFormFilter extends RecordsManagementFormFilter
if (customProps != null && customProps.isEmpty() == false) if (customProps != null && customProps.isEmpty() == false)
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("Found " + customProps.size() + " custom properties for customisable type " + customisableType); logger.debug("Found " + customProps.size() + " custom properties for customisable type " + customisableType);
} }

View File

@@ -612,7 +612,7 @@ public class FreezeServiceImpl extends ServiceBaseImpl
// Remove the freezes on the child records as long as there is no other // Remove the freezes on the child records as long as there is no other
// hold referencing them // hold referencing them
if (recordFolderService.isRecordFolder(nodeRef) == true) if (recordFolderService.isRecordFolder(nodeRef))
{ {
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
{ {

View File

@@ -135,7 +135,7 @@ public class IdentifierServiceImpl implements IdentifierService
IdentifierGenerator idGen = lookupGenerator(type); IdentifierGenerator idGen = lookupGenerator(type);
if (idGen == null) 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."); 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); ParameterCheck.mandatory("type", type);
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("Looking for idGenerator for type " + type.toString()); logger.debug("Looking for idGenerator for type " + type.toString());
} }
@@ -185,7 +185,7 @@ public class IdentifierServiceImpl implements IdentifierService
} }
else else
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("Unable to find type definition for " + type.toString() + " when generating identifier."); logger.debug("Unable to find type definition for " + type.toString() + " when generating identifier.");
} }

View File

@@ -95,7 +95,7 @@ public class NotifyOfRecordsDueForReviewJobExecuter extends RecordsManagementJob
final List<NodeRef> resultNodes = results.getNodeRefs(); final List<NodeRef> resultNodes = results.getNodeRefs();
results.close(); results.close();
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("Found " + resultNodes.size() + " nodes due for review and without notification."); logger.debug("Found " + resultNodes.size() + " nodes due for review and without notification.");
} }

View File

@@ -109,7 +109,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
*/ */
public void executeImpl() public void executeImpl()
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("Job Starting"); logger.debug("Job Starting");
} }
@@ -118,7 +118,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
{ {
public Object doWork() throws Exception public Object doWork() throws Exception
{ {
if (rmLoaded() == true) if (rmLoaded())
{ {
// Get a list of the nodes that have updates that need to be published // Get a list of the nodes that have updates that need to be published
List<NodeRef> nodeRefs = getUpdatedNodes(); List<NodeRef> nodeRefs = getUpdatedNodes();
@@ -126,14 +126,14 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
// Deal with each updated disposition action in turn // Deal with each updated disposition action in turn
for (NodeRef nodeRef : nodeRefs) for (NodeRef nodeRef : nodeRefs)
{ {
if (nodeService.exists(nodeRef) == true) if (nodeService.exists(nodeRef))
{ {
// Mark the update node as publishing in progress // Mark the update node as publishing in progress
markPublishInProgress(nodeRef); markPublishInProgress(nodeRef);
try try
{ {
Date start = new Date(); Date start = new Date();
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("Starting publish of updates ..."); logger.debug("Starting publish of updates ...");
logger.debug(" - for " + nodeRef.toString()); logger.debug(" - for " + nodeRef.toString());
@@ -144,7 +144,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
publishUpdates(nodeRef); publishUpdates(nodeRef);
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
Date end = new Date(); Date end = new Date();
long duration = end.getTime() - start.getTime(); long duration = end.getTime() - start.getTime();
@@ -166,7 +166,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
}; };
}, AuthenticationUtil.getSystemUserName()); }, AuthenticationUtil.getSystemUserName());
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("Job Finished"); logger.debug("Job Finished");
} }
@@ -209,7 +209,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
sb.append("@rma\\:").append(PROP_PUBLISH_IN_PROGRESS.getLocalName()).append(":false "); sb.append("@rma\\:").append(PROP_PUBLISH_IN_PROGRESS.getLocalName()).append(":false ");
String query = sb.toString(); String query = sb.toString();
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("Executing query " + query); logger.debug("Executing query " + query);
} }
@@ -229,7 +229,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
results.close(); results.close();
} }
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("Found " + resultNodes.size() + " disposition action definitions updates awaiting publishing."); logger.debug("Found " + resultNodes.size() + " disposition action definitions updates awaiting publishing.");
} }
@@ -253,7 +253,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
@Override @Override
public Void execute() throws Throwable public Void execute() throws Throwable
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("Marking updated node as publish in progress. (node=" + nodeRef.toString() + ")"); 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); behaviourFilter.disableBehaviour(nodeRef, TYPE_DISPOSITION_ACTION_DEFINITION);
try try
{ {
if (nodeService.exists(nodeRef) == true) if (nodeService.exists(nodeRef))
{ {
// Mark the node as publish in progress // Mark the node as publish in progress
nodeService.setProperty(nodeRef, PROP_PUBLISH_IN_PROGRESS, true); nodeService.setProperty(nodeRef, PROP_PUBLISH_IN_PROGRESS, true);
@@ -297,7 +297,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
if (updateTo != null) if (updateTo != null)
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("Node update to " + updateTo + " (noderef=" + nodeRef.toString() + ")"); logger.debug("Node update to " + updateTo + " (noderef=" + nodeRef.toString() + ")");
} }
@@ -306,14 +306,14 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
PublishExecutor executor = publishExecutorRegistry.get(updateTo); PublishExecutor executor = publishExecutorRegistry.get(updateTo);
if (executor == null) if (executor == null)
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("Unable to find a corresponding publish executor. (noderef=" + nodeRef.toString() + ", updateTo=" + updateTo + ")"); 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 + ")"); 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() + ")"); logger.debug("Attempting to publish updates. (nodeRef=" + nodeRef.toString() + ")");
} }
@@ -323,7 +323,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
} }
else else
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("Unable to publish, because publish executor is not set."); 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 // Remove the unpublished update aspect
nodeService.removeAspect(nodeRef, ASPECT_UNPUBLISHED_UPDATE); nodeService.removeAspect(nodeRef, ASPECT_UNPUBLISHED_UPDATE);
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("Publish updates complete. (nodeRef=" + nodeRef.toString() + ")"); logger.debug("Publish updates complete. (nodeRef=" + nodeRef.toString() + ")");
} }
@@ -364,10 +364,10 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
try try
{ {
// Assuming the node still has unpublished information, then unmark it in progress // Assuming the node still has unpublished information, then unmark it in progress
if (nodeService.exists(nodeRef) == true && if (nodeService.exists(nodeRef) &&
nodeService.hasAspect(nodeRef, ASPECT_UNPUBLISHED_UPDATE) == true) 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() + ")"); logger.debug("Removing publish in progress marker from updated node, because update was not successful. (node=" + nodeRef.toString() + ")");
} }

View File

@@ -63,7 +63,7 @@ public class ScriptRecordsManagmentNode extends ScriptNode
if (capability != null) if (capability != null)
{ {
Map<Capability, AccessStatus> map = capabilityService.getCapabilitiesAccessState(nodeRef, Collections.singletonList(capabilityName)); Map<Capability, AccessStatus> map = capabilityService.getCapabilitiesAccessState(nodeRef, Collections.singletonList(capabilityName));
if (map.containsKey(capability) == true) if (map.containsKey(capability))
{ {
AccessStatus accessStatus = map.get(capability); AccessStatus accessStatus = map.get(capability);
if (accessStatus.equals(AccessStatus.DENIED) == false) if (accessStatus.equals(AccessStatus.DENIED) == false)

View File

@@ -70,7 +70,7 @@ public class ScriptRecordsManagmentService extends BaseScopableProcessorExtensio
{ {
ScriptRecordsManagmentNode result = null; 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 // TODO .. at this point determine what type of records management node is it and
// create the appropriate sub-type // create the appropriate sub-type

View File

@@ -223,9 +223,9 @@ public abstract class BaseEvaluator implements RecordsManagementModel
boolean result = false; boolean result = false;
// Check that we are dealing with the correct kind of RM object // 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 // Check we have the required capabilities
(capabilities == null || checkCapabilities(nodeRef) == true)) (capabilities == null || checkCapabilities(nodeRef)))
{ {
result = evaluateImpl(nodeRef); result = evaluateImpl(nodeRef);
} }
@@ -259,7 +259,7 @@ public abstract class BaseEvaluator implements RecordsManagementModel
Map<Capability, AccessStatus> accessStatus = capabilityService.getCapabilitiesAccessState(nodeRef, capabilities); Map<Capability, AccessStatus> accessStatus = capabilityService.getCapabilitiesAccessState(nodeRef, capabilities);
for (AccessStatus value : accessStatus.values()) for (AccessStatus value : accessStatus.values())
{ {
if (AccessStatus.DENIED.equals(value) == true) if (AccessStatus.DENIED.equals(value))
{ {
result = false; result = false;
break; break;

View File

@@ -110,13 +110,13 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
NodeRef nodeRef = nodeInfo.getNodeRef(); NodeRef nodeRef = nodeInfo.getNodeRef();
if (AccessStatus.ALLOWED.equals(capabilityService.getCapabilityAccessState(nodeRef, if (AccessStatus.ALLOWED.equals(capabilityService.getCapabilityAccessState(nodeRef,
RMPermissionModel.VIEW_RECORDS)) == true) RMPermissionModel.VIEW_RECORDS)))
{ {
// Indicate whether the node is a RM object or not // Indicate whether the node is a RM object or not
boolean isFilePlanComponent = filePlanService.isFilePlanComponent(nodeInfo.getNodeRef()); boolean isFilePlanComponent = filePlanService.isFilePlanComponent(nodeInfo.getNodeRef());
rootJSONObject.put("isRmNode", isFilePlanComponent); rootJSONObject.put("isRmNode", isFilePlanComponent);
if (isFilePlanComponent == true) if (isFilePlanComponent)
{ {
rootJSONObject.put("rmNode", setRmNodeValues(nodeRef, rootJSONObject, useShortQNames)); 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) for (BaseEvaluator indicator : indicators)
{ {
if (indicator.evaluate(nodeRef) == true) if (indicator.evaluate(nodeRef))
{ {
jsonIndicators.add(indicator.getName()); jsonIndicators.add(indicator.getName());
} }
@@ -192,7 +192,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
for (BaseEvaluator action : actions) for (BaseEvaluator action : actions)
{ {
if (action.evaluate(nodeRef) == true) if (action.evaluate(nodeRef))
{ {
jsonActions.add(action.getName()); jsonActions.add(action.getName());
} }
@@ -226,7 +226,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
} }
case RECORD_FOLDER: case RECORD_FOLDER:
{ {
if (recordService.isMetadataStub(nodeRef) == true) if (recordService.isMetadataStub(nodeRef))
{ {
result = "metadata-stub-folder"; result = "metadata-stub-folder";
} }
@@ -238,13 +238,13 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
} }
case RECORD: case RECORD:
{ {
if (recordService.isMetadataStub(nodeRef) == true) if (recordService.isMetadataStub(nodeRef))
{ {
result = "metadata-stub"; result = "metadata-stub";
} }
else else
{ {
if (recordService.isDeclared(nodeRef) == true) if (recordService.isDeclared(nodeRef))
{ {
result = "record"; result = "record";
} }

View File

@@ -47,7 +47,7 @@ public class MultiParentEvaluator extends BaseEvaluator
int count = 0; int count = 0;
for (ChildAssociationRef parent : parents) for (ChildAssociationRef parent : parents)
{ {
if (nodeService.hasAspect(parent.getParentRef(), ASPECT_FILE_PLAN_COMPONENT) == true) if (nodeService.hasAspect(parent.getParentRef(), ASPECT_FILE_PLAN_COMPONENT))
{ {
count++; count++;
} }

View File

@@ -40,7 +40,7 @@ public class NonElectronicEvaluator extends BaseEvaluator
{ {
boolean result = false; boolean result = false;
QName qName = nodeService.getType(nodeRef); 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; result = true;
} }

View File

@@ -42,8 +42,8 @@ public class SplitEmailActionEvaluator extends BaseEvaluator
{ {
String mimetype = contentData.getMimetype(); String mimetype = contentData.getMimetype();
if (mimetype != null && if (mimetype != null &&
(MimetypeMap.MIMETYPE_RFC822.equals(mimetype) == true || (MimetypeMap.MIMETYPE_RFC822.equals(mimetype) ||
MimetypeMap.MIMETYPE_OUTLOOK_MSG.equals(mimetype) == true)) MimetypeMap.MIMETYPE_OUTLOOK_MSG.equals(mimetype)))
{ {
result = true; result = true;
} }

View File

@@ -46,7 +46,7 @@ public abstract class BaseBehaviourBean extends ServiceBaseImpl
@Override @Override
public void registerBehaviour(String name, org.alfresco.repo.policy.Behaviour behaviour) 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."); throw new AlfrescoRuntimeException("Can not register behaviour, because name " + name + "has already been used.");
} }

View File

@@ -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) 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>() AuthenticationUtil.runAs(new RunAsWork<Void>()
{ {
@@ -299,7 +299,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
public Void doWork() throws Exception public Void doWork() throws Exception
{ {
ChildAssociationRef assoc = nodeService.getPrimaryParent(nodeRef); 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) // Get the record (or record folder)
NodeRef record = assoc.getParentRef(); NodeRef record = assoc.getParentRef();
@@ -356,7 +356,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
@Override @Override
public Void doWork() throws Exception 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); applySearchAspect(nodeRef);
setupDispositionScheduleProperties(nodeRef); setupDispositionScheduleProperties(nodeRef);
@@ -380,7 +380,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
public Void doWork() throws Exception public Void doWork() throws Exception
{ {
NodeRef nodeRef = childAssocRef.getChildRef(); NodeRef nodeRef = childAssocRef.getChildRef();
if (nodeService.exists(nodeRef) == true) if (nodeService.exists(nodeRef))
{ {
applySearchAspect(nodeRef); applySearchAspect(nodeRef);
setupDispositionScheduleProperties(nodeRef); setupDispositionScheduleProperties(nodeRef);
@@ -424,8 +424,8 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
public void dispositionActionCreate(ChildAssociationRef childAssocRef) public void dispositionActionCreate(ChildAssociationRef childAssocRef)
{ {
NodeRef child = childAssocRef.getChildRef(); NodeRef child = childAssocRef.getChildRef();
if (nodeService.exists(child) == true && if (nodeService.exists(child) &&
childAssocRef.getTypeQName().equals(ASSOC_NEXT_DISPOSITION_ACTION) == true) childAssocRef.getTypeQName().equals(ASSOC_NEXT_DISPOSITION_ACTION))
{ {
// Get the record (or record folder) // Get the record (or record folder)
NodeRef record = childAssocRef.getParentRef(); NodeRef record = childAssocRef.getParentRef();
@@ -502,11 +502,11 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
NodeRef dispositionAction = childAssocRef.getParentRef(); NodeRef dispositionAction = childAssocRef.getParentRef();
NodeRef eventExecution = childAssocRef.getChildRef(); NodeRef eventExecution = childAssocRef.getChildRef();
if (nodeService.exists(dispositionAction) == true && if (nodeService.exists(dispositionAction) &&
nodeService.exists(eventExecution) == true) nodeService.exists(eventExecution))
{ {
ChildAssociationRef assoc = nodeService.getPrimaryParent(dispositionAction); 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) // Get the record (or record folder)
NodeRef record = assoc.getParentRef(); NodeRef record = assoc.getParentRef();
@@ -538,7 +538,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
if (nodeService.exists(dispositionActionNode)) if (nodeService.exists(dispositionActionNode))
{ {
ChildAssociationRef assoc = nodeService.getPrimaryParent(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) // Get the record (or record folder)
NodeRef record = assoc.getParentRef(); NodeRef record = assoc.getParentRef();
@@ -596,7 +596,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
@Override @Override
public Void doWork() throws Exception public Void doWork() throws Exception
{ {
if (nodeService.exists(nodeRef) == true) if (nodeService.exists(nodeRef))
{ {
// Initialise the search parameteres as required // Initialise the search parameteres as required
setVitalRecordDefintionDetails(nodeRef); setVitalRecordDefintionDetails(nodeRef);
@@ -646,7 +646,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
public Void doWork() throws Exception public Void doWork() throws Exception
{ {
// Only care about record folders // 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); Set<QName> props = new HashSet<QName>(1);
props.add(PROP_REVIEW_PERIOD); props.add(PROP_REVIEW_PERIOD);
@@ -694,7 +694,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
{ {
VitalRecordDefinition vrd = vitalRecordService.getVitalRecordDefinition(nodeRef); 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 // Set the property values
nodeService.setProperty(nodeRef, PROP_RS_VITAL_RECORD_REVIEW_PERIOD, vrd.getReviewPeriod().getPeriodType()); 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) public void onRemoveFrozenAspect(NodeRef nodeRef, QName aspectTypeQName)
{ {
if (nodeService.exists(nodeRef) == true && if (nodeService.exists(nodeRef) &&
nodeService.hasAspect(nodeRef, ASPECT_RM_SEARCH)) nodeService.hasAspect(nodeRef, ASPECT_RM_SEARCH))
{ {
nodeService.setProperty(nodeRef, PROP_RS_HOLD_REASON, null); nodeService.setProperty(nodeRef, PROP_RS_HOLD_REASON, null);
@@ -745,7 +745,7 @@ public class RecordsManagementSearchBehaviour implements RecordsManagementModel
@Override @Override
public Void doWork() throws Exception public Void doWork() throws Exception
{ {
if (nodeService.exists(nodeRef) == true) if (nodeService.exists(nodeRef))
{ {
// get the changed hold reason // get the changed hold reason
String holdReason = (String)nodeService.getProperty(nodeRef, PROP_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) 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 // create the schedule object and get the record category for it
DispositionSchedule schedule = new DispositionScheduleImpl(recordsManagementServiceRegistry, nodeService, nodeRef); DispositionSchedule schedule = new DispositionScheduleImpl(recordsManagementServiceRegistry, nodeService, nodeRef);

View File

@@ -81,7 +81,7 @@ public class DispositionLifecycleAspect extends BaseBehaviourBean
) )
public void onAddAspect(final NodeRef nodeRef, final QName aspect) public void onAddAspect(final NodeRef nodeRef, final QName aspect)
{ {
if (nodeService.exists(nodeRef) == true) if (nodeService.exists(nodeRef))
{ {
AuthenticationUtil.runAsSystem(new RunAsWork<Void>() AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
{ {

View File

@@ -113,7 +113,7 @@ public class FilePlanComponentAspect extends BaseBehaviourBean
@Override @Override
public Void doWork() throws Exception public Void doWork() throws Exception
{ {
if (nodeService.exists(nodeRef) == true) if (nodeService.exists(nodeRef))
{ {
lookupAndExecuteScripts(nodeRef, before, after); lookupAndExecuteScripts(nodeRef, before, after);
} }
@@ -203,7 +203,7 @@ public class FilePlanComponentAspect extends BaseBehaviourBean
@Override @Override
public Void doWork() throws Exception 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 // Look up the root and set on the aspect if found
NodeRef root = filePlanService.getFilePlan(nodeRef); NodeRef root = filePlanService.getFilePlan(nodeRef);
@@ -234,8 +234,8 @@ public class FilePlanComponentAspect extends BaseBehaviourBean
@Override @Override
public Void doWork() throws Exception public Void doWork() throws Exception
{ {
if (nodeService.exists(newChildAssocRef.getParentRef()) == true && if (nodeService.exists(newChildAssocRef.getParentRef()) &&
nodeService.exists(newChildAssocRef.getChildRef()) == true) nodeService.exists(newChildAssocRef.getChildRef()))
{ {
// Look up the root and re-set the value currently stored on the aspect // Look up the root and re-set the value currently stored on the aspect
NodeRef root = filePlanService.getFilePlan(newChildAssocRef.getParentRef()); NodeRef root = filePlanService.getFilePlan(newChildAssocRef.getParentRef());

View File

@@ -87,10 +87,10 @@ public class FrozenAspect extends BaseBehaviourBean
@Override @Override
public Void doWork() throws Exception public Void doWork() throws Exception
{ {
if (nodeService.exists(nodeRef) == true && if (nodeService.exists(nodeRef) &&
filePlanService.isFilePlanComponent(nodeRef) == true) filePlanService.isFilePlanComponent(nodeRef))
{ {
if (freezeService.isFrozen(nodeRef) == true) if (freezeService.isFrozen(nodeRef))
{ {
// never allowed to delete a frozen node // never allowed to delete a frozen node
throw new AccessDeniedException("Frozen nodes can not be deleted."); throw new AccessDeniedException("Frozen nodes can not be deleted.");
@@ -115,10 +115,10 @@ public class FrozenAspect extends BaseBehaviourBean
for (ChildAssociationRef assoc : assocs) for (ChildAssociationRef assoc : assocs)
{ {
// we only care about primary children // we only care about primary children
if (assoc.isPrimary() == true) if (assoc.isPrimary())
{ {
NodeRef nodeRef = assoc.getChildRef(); NodeRef nodeRef = assoc.getChildRef();
if (freezeService.isFrozen(nodeRef) == true) if (freezeService.isFrozen(nodeRef))
{ {
// never allowed to delete a node with a frozen child // never allowed to delete a node with a frozen child
throw new AccessDeniedException("Can not delete node, because it contains a frozen child node."); throw new AccessDeniedException("Can not delete node, because it contains a frozen child node.");

View File

@@ -107,7 +107,7 @@ public class RecordAspect extends BaseBehaviourBean
{ {
NodeRef thumbnail = childAssocRef.getChildRef(); NodeRef thumbnail = childAssocRef.getChildRef();
if (nodeService.exists(thumbnail) == true) if (nodeService.exists(thumbnail))
{ {
// apply file plan component aspect to thumbnail // apply file plan component aspect to thumbnail
nodeService.addAspect(thumbnail, ASPECT_FILE_PLAN_COMPONENT, null); 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) public void onCreateReference(NodeRef fromNodeRef, NodeRef toNodeRef, QName reference)
{ {
// Deal with versioned records // 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 // Apply the versioned aspect to the from node
nodeService.addAspect(fromNodeRef, ASPECT_VERSIONED_RECORD, null); 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) public void onRemoveReference(NodeRef fromNodeRef, NodeRef toNodeRef, QName reference)
{ {
// Deal with versioned records // 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 // Apply the versioned aspect to the from node
nodeService.removeAspect(fromNodeRef, ASPECT_VERSIONED_RECORD); nodeService.removeAspect(fromNodeRef, ASPECT_VERSIONED_RECORD);
@@ -224,7 +224,7 @@ public class RecordAspect extends BaseBehaviourBean
{ {
public Object doWork() throws Exception 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 // only remove the search details .. the rest will be resolved automatically
nodeService.removeAspect(newNodeRef, RecordsManagementSearchBehaviour.ASPECT_RM_SEARCH); nodeService.removeAspect(newNodeRef, RecordsManagementSearchBehaviour.ASPECT_RM_SEARCH);

View File

@@ -63,7 +63,7 @@ public class ScheduledAspect extends BaseBehaviourBean
) )
public void onAddAspect(NodeRef nodeRef, QName aspectTypeQName) public void onAddAspect(NodeRef nodeRef, QName aspectTypeQName)
{ {
if (nodeService.exists(nodeRef) == true && if (nodeService.exists(nodeRef) &&
dispositionService.getAssociatedDispositionSchedule(nodeRef) == null) dispositionService.getAssociatedDispositionSchedule(nodeRef) == null)
{ {
dispositionService.createDispositionSchedule(nodeRef, null); dispositionService.createDispositionSchedule(nodeRef, null);

View File

@@ -80,13 +80,13 @@ public class VitalRecordDefinitionAspect extends BaseBehaviourBean
) )
public void onUpdateProperties(final NodeRef nodeRef, Map<QName, Serializable> before, Map<QName, Serializable> after) public void onUpdateProperties(final NodeRef nodeRef, Map<QName, Serializable> before, Map<QName, Serializable> after)
{ {
if (nodeService.exists(nodeRef) == true && if (nodeService.exists(nodeRef) &&
nodeService.hasAspect(nodeRef, ASPECT_FILE_PLAN_COMPONENT) == true) nodeService.hasAspect(nodeRef, ASPECT_FILE_PLAN_COMPONENT))
{ {
// check that vital record definition has been changed in the first place // check that vital record definition has been changed in the first place
Map<QName, Serializable> changedProps = PropertyMap.getChangedProperties(before, after); Map<QName, Serializable> changedProps = PropertyMap.getChangedProperties(before, after);
if (changedProps.containsKey(PROP_VITAL_RECORD_INDICATOR) == true || if (changedProps.containsKey(PROP_VITAL_RECORD_INDICATOR) ||
changedProps.containsKey(PROP_REVIEW_PERIOD) == true) changedProps.containsKey(PROP_REVIEW_PERIOD))
{ {
filePlanAuthenticationService.runAsRmAdmin(new RunAsWork<Void>() filePlanAuthenticationService.runAsRmAdmin(new RunAsWork<Void>()
{ {

View File

@@ -63,7 +63,7 @@ public class DispositionActionDefinitionType extends BaseBehaviourBean
) )
public void onUpdateProperties(NodeRef nodeRef, Map<QName, Serializable> before, Map<QName, Serializable> after) 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 // Determine the properties that have changed
Set<QName> changedProps = new HashSet<QName>(PropertyMap.getChangedProperties(before, after).keySet()); 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); Map<QName, Serializable> props = nodeService.getProperties(nodeRef);
// Check that there isn't a update currently being published // 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 // Can not update the disposition schedule since there is an outstanding update being published
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_UPDATE_DISP_ACT_DEF)); throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_UPDATE_DISP_ACT_DEF));

View File

@@ -107,14 +107,14 @@ public class FilePlanType extends BaseBehaviourBean
{ {
// ensure we are not trying to put content in the file plan root node // ensure we are not trying to put content in the file plan root node
NodeRef nodeRef = childAssocRef.getChildRef(); 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."); 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 // ensure we are not trying to put a record folder in the root of the file plan
NodeRef parent = childAssocRef.getParentRef(); 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."); 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 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) nodeService.getProperty(filePlan, PROP_IDENTIFIER) == null)
{ {
String id = identifierService.generateIdentifier(filePlan); String id = identifierService.generateIdentifier(filePlan);

View File

@@ -99,7 +99,7 @@ public class RecordCategoryType extends BaseBehaviourBean
{ {
// ensure content is not placed directly into a record category // ensure content is not placed directly into a record category
NodeRef nodeRef = childAssocRef.getChildRef(); 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."); 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) public void onCreateNode(final ChildAssociationRef childAssocRef)
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("rma:recordCategory|alf:onCreateNode|this.onCreateNode()|TRANSATION_COMMIT"); logger.debug("rma:recordCategory|alf:onCreateNode|this.onCreateNode()|TRANSATION_COMMIT");
} }

View File

@@ -210,11 +210,11 @@ public class RecordFolderType extends BaseBehaviourBean
{ {
boolean result = true; boolean result = true;
if (nodeService.getType(copyDetails.getTargetParentNodeRef()).equals(TYPE_RECORD_FOLDER) == true) if (nodeService.getType(copyDetails.getTargetParentNodeRef()).equals(TYPE_RECORD_FOLDER))
{ {
result = false; result = false;
} }
else if (ArrayUtils.contains(unwantedAspects, classQName) == true) else if (ArrayUtils.contains(unwantedAspects, classQName))
{ {
result = false; result = false;
} }
@@ -236,12 +236,12 @@ public class RecordFolderType extends BaseBehaviourBean
public void onCreateChildAssociation(ChildAssociationRef childAssocRef, boolean bNew) public void onCreateChildAssociation(ChildAssociationRef childAssocRef, boolean bNew)
{ {
NodeRef nodeRef = childAssocRef.getChildRef(); 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 // ensure nothing is being added to a closed record folder
NodeRef recordFolder = childAssocRef.getParentRef(); NodeRef recordFolder = childAssocRef.getParentRef();
Boolean isClosed = (Boolean) nodeService.getProperty(recordFolder, PROP_IS_CLOSED); 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."); 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 // Remove unwanted aspects
for (QName aspect : unwantedAspects) for (QName aspect : unwantedAspects)
{ {
if (nodeService.hasAspect(nodeRef, aspect) == true) if (nodeService.hasAspect(nodeRef, aspect))
{ {
nodeService.removeAspect(nodeRef, aspect); nodeService.removeAspect(nodeRef, aspect);
} }

View File

@@ -98,14 +98,14 @@ public class RecordsManagementContainerType extends BaseBehaviourBean
{ {
// Get the elements of the created association // Get the elements of the created association
final NodeRef child = childAssocRef.getChildRef(); final NodeRef child = childAssocRef.getChildRef();
if (nodeService.exists(child) == true) if (nodeService.exists(child))
{ {
QName childType = nodeService.getType(child); QName childType = nodeService.getType(child);
// We only care about "folder" or sub-types // 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 // this is a rule container, make sure it is an file plan component
nodeService.addAspect(child, ASPECT_FILE_PLAN_COMPONENT, null); nodeService.addAspect(child, ASPECT_FILE_PLAN_COMPONENT, null);
@@ -174,7 +174,7 @@ public class RecordsManagementContainerType extends BaseBehaviourBean
{ {
public Object doWork() throws Exception 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) nodeService.getProperty(nodeRef, PROP_IDENTIFIER) == null)
{ {
String id = identifierService.generateIdentifier(nodeRef); String id = identifierService.generateIdentifier(nodeRef);

View File

@@ -146,13 +146,13 @@ public class RmSiteType extends BaseBehaviourBean
final NodeRef rmSite = childAssocRef.getChildRef(); final NodeRef rmSite = childAssocRef.getChildRef();
// Do not execute behaviour if this has been created in the archive store // 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 // This is not the spaces store - probably the archive store
return; return;
} }
if (nodeService.exists(rmSite) == true) if (nodeService.exists(rmSite))
{ {
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>() 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 // check to see if there is an 'override' for the file plan type given the site type
QName siteType = nodeService.getType(siteInfo.getNodeRef()); QName siteType = nodeService.getType(siteInfo.getNodeRef());
if (mapFilePlanType.containsKey(siteType) == true) if (mapFilePlanType.containsKey(siteType))
{ {
result = mapFilePlanType.get(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) 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); 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 && changed.get(SiteModel.PROP_SITE_VISIBILITY) != null &&
SiteVisibility.PUBLIC.equals(changed.get(SiteModel.PROP_SITE_VISIBILITY)) == false) 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 // determine whether the current user has delete capability on the file plan node
AccessStatus accessStatus = capabilityService.getCapabilityAccessState(filePlan, "Delete"); 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."); throw new AlfrescoRuntimeException("The records management site can not be deleted, because the user doesn't have sufficient privillages to delete the file plan.");
} }

View File

@@ -238,7 +238,7 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
NodeRef root = getRMRoot(records.get(0)); NodeRef root = getRMRoot(records.get(0));
String groupName = getGroupName(root); String groupName = getGroupName(root);
if (doesGroupContainUsers(groupName) == true) if (doesGroupContainUsers(groupName))
{ {
NotificationContext notificationContext = new NotificationContext(); NotificationContext notificationContext = new NotificationContext();
notificationContext.setSubject(I18NUtil.getMessage(MSG_SUBJECT_RECORDS_DUE_FOR_REVIEW)); notificationContext.setSubject(I18NUtil.getMessage(MSG_SUBJECT_RECORDS_DUE_FOR_REVIEW));
@@ -257,7 +257,7 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
} }
else else
{ {
if (logger.isWarnEnabled() == true) if (logger.isWarnEnabled())
{ {
logger.warn("Unable to send record due for review email notification, because notification group was empty."); 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); NodeRef root = getRMRoot(record);
String groupName = getGroupName(root); String groupName = getGroupName(root);
if (doesGroupContainUsers(groupName) == true) if (doesGroupContainUsers(groupName))
{ {
NotificationContext notificationContext = new NotificationContext(); NotificationContext notificationContext = new NotificationContext();
notificationContext.setSubject(I18NUtil.getMessage(MSG_SUBJECT_RECORD_SUPERCEDED)); notificationContext.setSubject(I18NUtil.getMessage(MSG_SUBJECT_RECORD_SUPERCEDED));
@@ -298,7 +298,7 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
} }
else else
{ {
if (logger.isWarnEnabled() == true) if (logger.isWarnEnabled())
{ {
logger.warn("Unable to send record superseded email notification, because notification group was empty."); 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); ParameterCheck.mandatory("record", record);
if (canSendRejectEmail(record, recordCreator) == true) if (canSendRejectEmail(record, recordCreator))
{ {
String site = siteService.getSite(record).getShortName(); String site = siteService.getSite(record).getShortName();
String rejectReason = (String) nodeService.getProperty(record, PROP_RECORD_REJECTION_REASON); String rejectReason = (String) nodeService.getProperty(record, PROP_RECORD_REJECTION_REASON);
@@ -361,17 +361,17 @@ public class RecordsManagementNotificationHelper implements RecordsManagementMod
result = false; result = false;
logger.warn(msg1 + "the site which should contain the node '" + record.toString() + "'" + msg2); logger.warn(msg1 + "the site which should contain the node '" + record.toString() + "'" + msg2);
} }
if (StringUtils.isBlank(recordCreator) == true) if (StringUtils.isBlank(recordCreator))
{ {
result = false; result = false;
logger.warn(msg1 + "the user, who created the record" + msg2); 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; result = false;
logger.warn(msg1 + "the reason for rejection" + msg2); 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; result = false;
logger.warn(msg1 + "the user, who rejected the record" + msg2); logger.warn(msg1 + "the user, who rejected the record" + msg2);

View File

@@ -194,11 +194,11 @@ public abstract class AbstractModulePatch implements ModulePatch, BeanNameAware
@Override @Override
public void apply() public void apply()
{ {
if (logger.isInfoEnabled() == true) if (logger.isInfoEnabled())
{ {
logger.info("Executing module patch \"" + description + "\""); logger.info("Executing module patch \"" + description + "\"");
} }
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... id=" + id + logger.debug(" ... id=" + id +
",moduleId=" + moduleId + ",moduleId=" + moduleId +
@@ -212,7 +212,7 @@ public abstract class AbstractModulePatch implements ModulePatch, BeanNameAware
true, true,
false); false);
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... module patch applied"); logger.debug(" ... module patch applied");
} }

View File

@@ -85,7 +85,7 @@ public class ModulePatchExecuterImpl extends AbstractModuleComponent
throw new AlfrescoRuntimeException("Unable to register module patch, becuase module id is invalid."); 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()); logger.debug("Registering module patch " + modulePatch.getId() + " for module " + getModuleId());
} }
@@ -102,7 +102,7 @@ public class ModulePatchExecuterImpl extends AbstractModuleComponent
// get current schema version // get current schema version
int currentSchema = getCurrentSchema(); int currentSchema = getCurrentSchema();
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("Running module patch executer (currentSchema=" + currentSchema + ", configuredSchema=" + moduleSchema + ")"); logger.debug("Running module patch executer (currentSchema=" + currentSchema + ", configuredSchema=" + moduleSchema + ")");
} }
@@ -140,7 +140,7 @@ public class ModulePatchExecuterImpl extends AbstractModuleComponent
protected int getCurrentSchema() protected int getCurrentSchema()
{ {
Integer result = START_SCHEMA; 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()); result = (Integer)attributeService.getAttribute(KEY_MODULE_SCHEMA, getModuleId());
} }

View File

@@ -89,7 +89,7 @@ public abstract class ModulePatchComponent extends AbstractModuleComponent
{ {
try try
{ {
if (logger.isInfoEnabled() == true) if (logger.isInfoEnabled())
{ {
logger.info("Module patch component '" + getName() + "' is executing ..."); logger.info("Module patch component '" + getName() + "' is executing ...");
} }
@@ -114,7 +114,7 @@ public abstract class ModulePatchComponent extends AbstractModuleComponent
}, false, true); }, false, true);
if (logger.isInfoEnabled() == true) if (logger.isInfoEnabled())
{ {
logger.info(" ... completed module patch '" + getName() + "'"); logger.info(" ... completed module patch '" + getName() + "'");
} }
@@ -122,7 +122,7 @@ public abstract class ModulePatchComponent extends AbstractModuleComponent
catch (Throwable exception) catch (Throwable exception)
{ {
// record the exception otherwise it gets swallowed // record the exception otherwise it gets swallowed
if (logger.isInfoEnabled() == true) if (logger.isInfoEnabled())
{ {
logger.info(" ... error encountered. " + exception.getMessage(), exception); logger.info(" ... error encountered. " + exception.getMessage(), exception);
} }

View File

@@ -145,7 +145,7 @@ public class NotificationTemplatePatch extends ModulePatchComponent
{ {
if (template == null || nodeService.exists(template) == false) 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."); 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); String lastPatchUpdate = (String)nodeService.getProperty(template, PROP_LAST_PATCH_UPDATE);
if (lastPatchUpdate == null || name.equals(lastPatchUpdate) == false) 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 + ")"); logger.debug("Applying update to template. (template=" + template.toString() + ", templateUpdate=" + templateUpdate + ")");
} }
@@ -192,7 +192,7 @@ public class NotificationTemplatePatch extends ModulePatchComponent
} }
else else
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug("Skipping template update, because template has already been patched. (template=" + template.toString() + ")"); logger.debug("Skipping template update, because template has already been patched. (template=" + template.toString() + ")");
} }

View File

@@ -113,9 +113,9 @@ public class RMv2FilePlanNodeRefPatch extends ModulePatchComponent
{ {
List<Long> filePlanComponents = patchDAO.getNodesByAspectQNameId(aspectPair.getFirst(), 0L, patchDAO.getMaxAdmNodeID()); 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 // only set the rmadmin permissions on record categories, record folders and records
FilePlanComponentKind kind = filePlanService.getFilePlanComponentKind(filePlanComponentNodeRef); FilePlanComponentKind kind = filePlanService.getFilePlanComponentKind(filePlanComponentNodeRef);
if (FilePlanComponentKind.RECORD_CATEGORY.equals(kind) == true || if (FilePlanComponentKind.RECORD_CATEGORY.equals(kind) ||
FilePlanComponentKind.RECORD_FOLDER.equals(kind) == true || FilePlanComponentKind.RECORD_FOLDER.equals(kind) ||
FilePlanComponentKind.RECORD.equals(kind) == true ) FilePlanComponentKind.RECORD.equals(kind))
{ {
// ensure the that the records management role has read and file on the node // ensure the that the records management role has read and file on the node
Role adminRole = filePlanRoleService.getRole(filePlan, "Administrator"); Role adminRole = filePlanRoleService.getRole(filePlan, "Administrator");

View File

@@ -127,14 +127,14 @@ public class RMv2ModelPatch extends ModulePatchComponent
qnameDAO.updateQName(qnameBefore, qnameAfter); qnameDAO.updateQName(qnameBefore, qnameAfter);
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... updated qname " + qnameBefore.toString()); logger.debug(" ... updated qname " + qnameBefore.toString());
} }
} }
else else
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... no need to update qname " + qnameBefore.toString()); logger.debug(" ... no need to update qname " + qnameBefore.toString());
} }

View File

@@ -89,7 +89,7 @@ public class RMv2SavedSearchPatch extends ModulePatchComponent
// get the saved searches // get the saved searches
List<SavedSearchDetails> savedSearches = recordsManagementSearchService.getSavedSearches(RM_SITE_ID); List<SavedSearchDetails> savedSearches = recordsManagementSearchService.getSavedSearches(RM_SITE_ID);
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... updating " + savedSearches.size() + " saved searches"); logger.debug(" ... updating " + savedSearches.size() + " saved searches");
} }
@@ -106,7 +106,7 @@ public class RMv2SavedSearchPatch extends ModulePatchComponent
writer.putContent(refreshedJSON); writer.putContent(refreshedJSON);
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... updated saved search " + savedSearchDetails.getName() + " (nodeRef=" + nodeRef.toString() + ")"); logger.debug(" ... updated saved search " + savedSearchDetails.getName() + " (nodeRef=" + nodeRef.toString() + ")");
} }

View File

@@ -87,7 +87,7 @@ public class NotificationTemplatePatch_v21 extends RMv21PatchComponent
NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, CONFIG_NODEID); NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, CONFIG_NODEID);
// get the parent node // get the parent node
NodeRef supersededTemplate = notificationHelper.getSupersededTemplate(); 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(); NodeRef parent = nodeService.getPrimaryParent(supersededTemplate).getParentRef();

View File

@@ -97,7 +97,7 @@ public class RMv21BehaviorScriptsPatch extends RMv21PatchComponent implements Be
// check that the behavior scripts folder exists // check that the behavior scripts folder exists
if (nodeService.exists(newBehaviorScriptsFolder) == false) if (nodeService.exists(newBehaviorScriptsFolder) == false)
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... creating RM Behavior Scripts folder"); 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 // 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 // run the following code as System
AuthenticationUtil.runAs(new RunAsWork<Object>() AuthenticationUtil.runAs(new RunAsWork<Object>()
@@ -137,7 +137,7 @@ public class RMv21BehaviorScriptsPatch extends RMv21PatchComponent implements Be
if (oldBehaviorScripts != null && oldBehaviorScripts.isEmpty() != true) 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"); 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 // move the old script to the new location
fileFolderService.moveFrom(script.getNodeRef(), OLD_BEHAVIOR_SCRIPTS_FOLDER, RMv21BehaviorScriptsPatch.newBehaviorScriptsFolder, script.getName()); fileFolderService.moveFrom(script.getNodeRef(), OLD_BEHAVIOR_SCRIPTS_FOLDER, RMv21BehaviorScriptsPatch.newBehaviorScriptsFolder, script.getName());
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ...... moved " + script.getName()); logger.debug(" ...... moved " + script.getName());
} }

View File

@@ -107,7 +107,7 @@ public class RMv21CapabilityPatch extends RMv21PatchComponent
// only update if the capability is missing // only update if the capability is missing
if (capabilities.contains(capability) == false) if (capabilities.contains(capability) == false)
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... adding capability " + capabilityName + " to role " + role.getName()); logger.debug(" ... adding capability " + capabilityName + " to role " + role.getName());
} }
@@ -127,14 +127,14 @@ public class RMv21CapabilityPatch extends RMv21PatchComponent
{ {
Set<NodeRef> filePlans = getFilePlans(); Set<NodeRef> filePlans = getFilePlans();
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... updating " + filePlans.size() + " file plans"); logger.debug(" ... updating " + filePlans.size() + " file plans");
} }
for (NodeRef filePlan : filePlans) for (NodeRef filePlan : filePlans)
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... updating file plan " + filePlan.toString()); logger.debug(" ... updating file plan " + filePlan.toString());
} }

View File

@@ -140,7 +140,7 @@ public class RMv21InPlacePatch extends RMv21PatchComponent
{ {
Set<NodeRef> filePlans = filePlanService.getFilePlans(); Set<NodeRef> filePlans = filePlanService.getFilePlans();
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... updating " + filePlans.size() + " file plans"); logger.debug(" ... updating " + filePlans.size() + " file plans");
} }
@@ -149,7 +149,7 @@ public class RMv21InPlacePatch extends RMv21PatchComponent
{ {
if (filePlanService.getUnfiledContainer(filePlan) == null) if (filePlanService.getUnfiledContainer(filePlan) == null)
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... updating file plan " + filePlan.toString()); logger.debug(" ... updating file plan " + filePlan.toString());
} }
@@ -196,7 +196,7 @@ public class RMv21InPlacePatch extends RMv21PatchComponent
private void moveExistingHolds(NodeRef filePlan) private void moveExistingHolds(NodeRef filePlan)
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... moving existing holds for file plan " + filePlan.toString()); logger.debug(" ... moving existing holds for file plan " + filePlan.toString());
} }
@@ -214,7 +214,7 @@ public class RMv21InPlacePatch extends RMv21PatchComponent
private void moveExistingTransfers(NodeRef filePlan) private void moveExistingTransfers(NodeRef filePlan)
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... moving existing transfers for file plan " + filePlan.toString()); logger.debug(" ... moving existing transfers for file plan " + filePlan.toString());
} }

View File

@@ -117,7 +117,7 @@ public class RMv21RMAdminUserPatch extends RMv21PatchComponent implements BeanNa
if (authenticationService.authenticationExists(user) == false) if (authenticationService.authenticationExists(user) == false)
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... creating RM Admin user"); logger.debug(" ... creating RM Admin user");
} }
@@ -126,7 +126,7 @@ public class RMv21RMAdminUserPatch extends RMv21PatchComponent implements BeanNa
if (personService.personExists(user) == false) if (personService.personExists(user) == false)
{ {
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... creating RM Admin person"); logger.debug(" ... creating RM Admin person");
} }
@@ -139,13 +139,13 @@ public class RMv21RMAdminUserPatch extends RMv21PatchComponent implements BeanNa
} }
else else
{ {
if (logger.isInfoEnabled() == true) if (logger.isInfoEnabled())
{ {
logger.debug(" ... RM Admin person already exists"); logger.debug(" ... RM Admin person already exists");
} }
} }
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... assigning RM Admin user to file plans"); logger.debug(" ... assigning RM Admin user to file plans");
} }

View File

@@ -109,9 +109,9 @@ public class RMv21RecordInheritancePatch extends RMv21PatchComponent
{ {
List<Long> records = patchDAO.getNodesByAspectQNameId(aspectPair.getFirst(), 0L, patchDAO.getMaxAdmNodeID()); 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) for (Long record : records)
@@ -119,7 +119,7 @@ public class RMv21RecordInheritancePatch extends RMv21PatchComponent
Pair<Long, NodeRef> recordPair = nodeDAO.getNodePair(record); Pair<Long, NodeRef> recordPair = nodeDAO.getNodePair(record);
NodeRef recordNodeRef = recordPair.getSecond(); NodeRef recordNodeRef = recordPair.getSecond();
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... updating record " + recordNodeRef.toString()); logger.debug(" ... updating record " + recordNodeRef.toString());

View File

@@ -72,9 +72,9 @@ public class RMv21ReportServicePatch extends RMv21PatchComponent
protected void executePatch() throws Throwable protected void executePatch() throws Throwable
{ {
// check whether report dir exists or not // 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"); logger.debug(" ... adding template root folder");
} }
@@ -88,7 +88,7 @@ public class RMv21ReportServicePatch extends RMv21PatchComponent
"Records Management Report Templates", "Records Management Report Templates",
"Records management report templates."); "Records management report templates.");
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... adding destruction report template"); logger.debug(" ... adding destruction report template");
} }

View File

@@ -71,7 +71,7 @@ public class RMv21RolesPatch extends RMv21PatchComponent implements BeanNameAwar
{ {
Set<NodeRef> filePlans = filePlanService.getFilePlans(); Set<NodeRef> filePlans = filePlanService.getFilePlans();
if (logger.isDebugEnabled() == true) if (logger.isDebugEnabled())
{ {
logger.debug(" ... updating " + filePlans.size() + " file plans"); logger.debug(" ... updating " + filePlans.size() + " file plans");
} }
@@ -85,7 +85,7 @@ public class RMv21RolesPatch extends RMv21PatchComponent implements BeanNameAwar
String roleGroupName = role.getRoleGroupName(); String roleGroupName = role.getRoleGroupName();
if (authorityService.getAuthorityZones(roleGroupName).contains(RMAuthority.ZONE_APP_RM) == false) 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()); 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