mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Fixed minor issues ("Collapsible If Statements") reported in Sonar
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@71949 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -444,12 +444,9 @@ public class DispositionServiceImpl extends ServiceBaseImpl
|
|||||||
result.add(item);
|
result.add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (filePlanService.isRecordCategory(item))
|
else if (filePlanService.isRecordCategory(item) && getAssociatedDispositionScheduleImpl(item) == null)
|
||||||
{
|
{
|
||||||
if (getAssociatedDispositionScheduleImpl(item) == null)
|
result.addAll(getDisposableItemsImpl(isRecordLevelDisposition, item));
|
||||||
{
|
|
||||||
result.addAll(getDisposableItemsImpl(isRecordLevelDisposition, item));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@@ -203,18 +203,15 @@ public class DispositionProperty extends BaseBehaviourBean
|
|||||||
if (dispositionAction != null)
|
if (dispositionAction != null)
|
||||||
{
|
{
|
||||||
DispositionActionDefinition daDefinition = dispositionAction.getDispositionActionDefinition();
|
DispositionActionDefinition daDefinition = dispositionAction.getDispositionActionDefinition();
|
||||||
if (daDefinition != null)
|
// check whether the next disposition action matches this disposition property
|
||||||
|
if (daDefinition != null && propertyName.equals(daDefinition.getPeriodProperty()))
|
||||||
{
|
{
|
||||||
// check whether the next disposition action matches this disposition property
|
Period period = daDefinition.getPeriod();
|
||||||
if (propertyName.equals(daDefinition.getPeriodProperty()))
|
Date updatedAsOf = period.getNextDate(updatedDateValue);
|
||||||
{
|
|
||||||
Period period = daDefinition.getPeriod();
|
|
||||||
Date updatedAsOf = period.getNextDate(updatedDateValue);
|
|
||||||
|
|
||||||
// update asOf date on the disposition action based on the new property value
|
// update asOf date on the disposition action based on the new property value
|
||||||
NodeRef daNodeRef = dispositionAction.getNodeRef();
|
NodeRef daNodeRef = dispositionAction.getNodeRef();
|
||||||
nodeService.setProperty(daNodeRef, PROP_DISPOSITION_AS_OF, updatedAsOf);
|
nodeService.setProperty(daNodeRef, PROP_DISPOSITION_AS_OF, updatedAsOf);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -148,15 +148,12 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
|
|||||||
SiteService siteService = getSiteService();
|
SiteService siteService = getSiteService();
|
||||||
|
|
||||||
SiteInfo siteInfo = siteService.getSite(siteId);
|
SiteInfo siteInfo = siteService.getSite(siteId);
|
||||||
if (siteInfo != null)
|
if (siteInfo != null && siteService.hasContainer(siteId, FILE_PLAN_CONTAINER))
|
||||||
{
|
{
|
||||||
if (siteService.hasContainer(siteId, FILE_PLAN_CONTAINER))
|
NodeRef nodeRef = siteService.getContainer(siteId, FILE_PLAN_CONTAINER);
|
||||||
|
if (instanceOf(nodeRef, TYPE_FILE_PLAN))
|
||||||
{
|
{
|
||||||
NodeRef nodeRef = siteService.getContainer(siteId, FILE_PLAN_CONTAINER);
|
filePlan = nodeRef;
|
||||||
if (instanceOf(nodeRef, TYPE_FILE_PLAN))
|
|
||||||
{
|
|
||||||
filePlan = nodeRef;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -345,18 +345,16 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
|||||||
// as read only
|
// as read only
|
||||||
QName qname = QName.createQName(prefixName, namespaceService);
|
QName qname = QName.createQName(prefixName, namespaceService);
|
||||||
Serializable value = nodeService.getProperty(nodeRef, qname);
|
Serializable value = nodeService.getProperty(nodeRef, qname);
|
||||||
if (value != null)
|
if (value != null &&
|
||||||
|
(prefixName.equals("cm:title") ||
|
||||||
|
prefixName.equals("cm:author") ||
|
||||||
|
prefixName.equals("dod:originator") ||
|
||||||
|
prefixName.equals("dod:publicationDate") ||
|
||||||
|
prefixName.equals("dod:dateReceived") ||
|
||||||
|
prefixName.equals("dod:address") ||
|
||||||
|
prefixName.equals("dod:otherAddress")))
|
||||||
{
|
{
|
||||||
if (prefixName.equals("cm:title") ||
|
fieldDef.setProtectedField(true);
|
||||||
prefixName.equals("cm:author") ||
|
|
||||||
prefixName.equals("dod:originator") ||
|
|
||||||
prefixName.equals("dod:publicationDate") ||
|
|
||||||
prefixName.equals("dod:dateReceived") ||
|
|
||||||
prefixName.equals("dod:address") ||
|
|
||||||
prefixName.equals("dod:otherAddress"))
|
|
||||||
{
|
|
||||||
fieldDef.setProtectedField(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -326,15 +326,12 @@ public class FilePlanPermissionServiceImpl extends ServiceBaseImpl
|
|||||||
for (AccessPermission perm : origionalRecordPerms)
|
for (AccessPermission perm : origionalRecordPerms)
|
||||||
{
|
{
|
||||||
if (!ExtendedReaderDynamicAuthority.EXTENDED_READER.equals(perm.getAuthority()) &&
|
if (!ExtendedReaderDynamicAuthority.EXTENDED_READER.equals(perm.getAuthority()) &&
|
||||||
!ExtendedWriterDynamicAuthority.EXTENDED_WRITER.equals(perm.getAuthority()))
|
!ExtendedWriterDynamicAuthority.EXTENDED_WRITER.equals(perm.getAuthority()) &&
|
||||||
|
(perm.getPermission().equals(RMPermissionModel.FILING) || perm.getPermission().equals(RMPermissionModel.FILE_RECORDS)) &&
|
||||||
|
!origionalParentPerms.contains(perm))
|
||||||
{
|
{
|
||||||
if ((perm.getPermission().equals(RMPermissionModel.FILING) ||
|
// then we can assume this is a permission we want to preserve
|
||||||
perm.getPermission().equals(RMPermissionModel.FILE_RECORDS)) &&
|
keepPerms.add(perm);
|
||||||
!origionalParentPerms.contains(perm))
|
|
||||||
{
|
|
||||||
// then we can assume this is a permission we want to preserve
|
|
||||||
keepPerms.add(perm);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -46,12 +46,9 @@ public final class RmDictionaryWebServiceUtils
|
|||||||
if (StringUtils.isNotBlank(siteId))
|
if (StringUtils.isNotBlank(siteId))
|
||||||
{
|
{
|
||||||
SiteInfo site = siteService.getSite(siteId);
|
SiteInfo site = siteService.getSite(siteId);
|
||||||
if (site != null)
|
if (site != null && site.getSitePreset().equals(SITE_PRESET))
|
||||||
{
|
{
|
||||||
if (site.getSitePreset().equals(SITE_PRESET))
|
isRmSite = true;
|
||||||
{
|
|
||||||
isRmSite = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return isRmSite;
|
return isRmSite;
|
||||||
|
Reference in New Issue
Block a user