mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-5901 fixes in benchmark driver
This commit is contained in:
@@ -132,7 +132,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
|||||||
/**
|
/**
|
||||||
* Set the dictionary service
|
* Set the dictionary service
|
||||||
*
|
*
|
||||||
* @param dictionaryServic the dictionary service
|
* @param dictionaryService the dictionary service
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setDictionaryService(DictionaryService dictionaryService)
|
public void setDictionaryService(DictionaryService dictionaryService)
|
||||||
@@ -439,7 +439,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
|||||||
if (this.nodeService.hasAspect(nodeRef, ASPECT_SCHEDULED))
|
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.isEmpty())
|
||||||
{
|
{
|
||||||
ChildAssociationRef firstChildAssocRef = childAssocs.get(0);
|
ChildAssociationRef firstChildAssocRef = childAssocs.get(0);
|
||||||
result = firstChildAssocRef.getChildRef();
|
result = firstChildAssocRef.getChildRef();
|
||||||
@@ -462,7 +462,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
|||||||
if (nodeService.exists(dsNodeRef))
|
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.isEmpty())
|
||||||
{
|
{
|
||||||
if (assocs.size() != 1)
|
if (assocs.size() != 1)
|
||||||
{
|
{
|
||||||
@@ -522,7 +522,6 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
|||||||
*
|
*
|
||||||
* @param isRecordLevelDisposition
|
* @param isRecordLevelDisposition
|
||||||
* @param rmContainer
|
* @param rmContainer
|
||||||
* @param root
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private List<NodeRef> getDisposableItemsImpl(boolean isRecordLevelDisposition, NodeRef rmContainer)
|
private List<NodeRef> getDisposableItemsImpl(boolean isRecordLevelDisposition, NodeRef rmContainer)
|
||||||
@@ -586,13 +585,13 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
|||||||
|
|
||||||
// Check whether there is already a disposition schedule object present
|
// Check whether there is already a disposition schedule object present
|
||||||
List<ChildAssociationRef> assocs = nodeService.getChildAssocs(nodeRef, ASSOC_DISPOSITION_SCHEDULE, RegexQNamePattern.MATCH_ALL);
|
List<ChildAssociationRef> assocs = nodeService.getChildAssocs(nodeRef, ASSOC_DISPOSITION_SCHEDULE, RegexQNamePattern.MATCH_ALL);
|
||||||
if (assocs.size() == 0)
|
if (assocs.isEmpty())
|
||||||
{
|
{
|
||||||
DispositionSchedule currentDispositionSchdule = getDispositionSchedule(nodeRef);
|
DispositionSchedule currentDispositionSchdule = getDispositionSchedule(nodeRef);
|
||||||
if (currentDispositionSchdule != null)
|
if (currentDispositionSchdule != null)
|
||||||
{
|
{
|
||||||
List<NodeRef> items = getDisposableItemsImpl(currentDispositionSchdule.isRecordLevelDisposition(), nodeRef);
|
List<NodeRef> items = getDisposableItemsImpl(currentDispositionSchdule.isRecordLevelDisposition(), nodeRef);
|
||||||
if (items.size() != 0)
|
if (!items.isEmpty())
|
||||||
{
|
{
|
||||||
throw new AlfrescoRuntimeException("Can not create a retention schedule if there are disposable items already under the control of an other retention schedule");
|
throw new AlfrescoRuntimeException("Can not create a retention schedule if there are disposable items already under the control of an other retention schedule");
|
||||||
}
|
}
|
||||||
@@ -674,7 +673,6 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
|||||||
* Updates the given disposition action definition belonging to the given disposition
|
* Updates the given disposition action definition belonging to the given disposition
|
||||||
* schedule.
|
* schedule.
|
||||||
*
|
*
|
||||||
* @param schedule The DispositionSchedule the action belongs to
|
|
||||||
* @param actionDefinition The DispositionActionDefinition to update
|
* @param actionDefinition The DispositionActionDefinition to update
|
||||||
* @param actionDefinitionParams Map of parameters to use to update the action definition
|
* @param actionDefinitionParams Map of parameters to use to update the action definition
|
||||||
* @return The updated DispositionActionDefinition
|
* @return The updated DispositionActionDefinition
|
||||||
@@ -706,7 +704,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
|||||||
private DispositionAction initialiseDispositionAction(NodeRef nodeRef, DispositionActionDefinition dispositionActionDefinition, boolean allowContextFromAsOf)
|
private DispositionAction initialiseDispositionAction(NodeRef nodeRef, DispositionActionDefinition dispositionActionDefinition, boolean allowContextFromAsOf)
|
||||||
{
|
{
|
||||||
List<ChildAssociationRef> childAssocs = nodeService.getChildAssocs(nodeRef, ASSOC_NEXT_DISPOSITION_ACTION, ASSOC_NEXT_DISPOSITION_ACTION, 1, true);
|
List<ChildAssociationRef> childAssocs = nodeService.getChildAssocs(nodeRef, ASSOC_NEXT_DISPOSITION_ACTION, ASSOC_NEXT_DISPOSITION_ACTION, 1, true);
|
||||||
if (childAssocs != null && childAssocs.size() > 0)
|
if (childAssocs != null && !childAssocs.isEmpty())
|
||||||
{
|
{
|
||||||
return new DispositionActionImpl(serviceRegistry, childAssocs.get(0).getChildRef());
|
return new DispositionActionImpl(serviceRegistry, childAssocs.get(0).getChildRef());
|
||||||
}
|
}
|
||||||
@@ -871,7 +869,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
|||||||
{
|
{
|
||||||
NodeRef result = null;
|
NodeRef result = null;
|
||||||
List<ChildAssociationRef> assocs = nodeService.getChildAssocs(nodeRef, ASSOC_NEXT_DISPOSITION_ACTION, ASSOC_NEXT_DISPOSITION_ACTION, 1, true);
|
List<ChildAssociationRef> assocs = nodeService.getChildAssocs(nodeRef, ASSOC_NEXT_DISPOSITION_ACTION, ASSOC_NEXT_DISPOSITION_ACTION, 1, true);
|
||||||
if (assocs.size() != 0)
|
if (!assocs.isEmpty())
|
||||||
{
|
{
|
||||||
result = assocs.get(0).getChildRef();
|
result = assocs.get(0).getChildRef();
|
||||||
}
|
}
|
||||||
@@ -964,7 +962,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
|||||||
if (nodeService.hasAspect(nodeRef, ASPECT_DISPOSITION_LIFECYCLE))
|
if (nodeService.hasAspect(nodeRef, ASPECT_DISPOSITION_LIFECYCLE))
|
||||||
{
|
{
|
||||||
List<ChildAssociationRef> assocs = nodeService.getChildAssocs(nodeRef, ASSOC_NEXT_DISPOSITION_ACTION, ASSOC_NEXT_DISPOSITION_ACTION);
|
List<ChildAssociationRef> assocs = nodeService.getChildAssocs(nodeRef, ASSOC_NEXT_DISPOSITION_ACTION, ASSOC_NEXT_DISPOSITION_ACTION);
|
||||||
if (assocs.size() > 0)
|
if (!assocs.isEmpty())
|
||||||
{
|
{
|
||||||
currentDispositionAction = assocs.get(0).getChildRef();
|
currentDispositionAction = assocs.get(0).getChildRef();
|
||||||
}
|
}
|
||||||
@@ -1092,7 +1090,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
|||||||
{
|
{
|
||||||
DispositionSchedule ds = new DispositionScheduleImpl(serviceRegistry, nodeService, dispositionSchedule);
|
DispositionSchedule ds = new DispositionScheduleImpl(serviceRegistry, nodeService, dispositionSchedule);
|
||||||
List<ChildAssociationRef> assocs = nodeService.getChildAssocs(dispositionSchedule);
|
List<ChildAssociationRef> assocs = nodeService.getChildAssocs(dispositionSchedule);
|
||||||
if (assocs != null && assocs.size() > 0)
|
if (assocs != null && !assocs.isEmpty())
|
||||||
{
|
{
|
||||||
for (ChildAssociationRef assoc : assocs)
|
for (ChildAssociationRef assoc : assocs)
|
||||||
{
|
{
|
||||||
|
@@ -927,7 +927,7 @@ public class FilePlanComponentsApiUtils
|
|||||||
}
|
}
|
||||||
|
|
||||||
String pathStr = null;
|
String pathStr = null;
|
||||||
if (pathElements.size() > 0)
|
if (!pathElements.isEmpty())
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder(120);
|
StringBuilder sb = new StringBuilder(120);
|
||||||
for (PathInfo.ElementInfo e : pathElements)
|
for (PathInfo.ElementInfo e : pathElements)
|
||||||
|
Reference in New Issue
Block a user