Merge branch 'merge-2.6/FixesFrom2.5' into merge/RM-6069_MergeFrom2.6ToMaster

# Conflicts:
#	rm-automation/rm-automation-ui/src/main/java/org/alfresco/po/rm/dialog/AuthoritySelectDialog.java
#	rm-automation/rm-automation-ui/src/main/java/org/alfresco/po/share/page/SharePage.java
#	rm-automation/rm-automation-ui/src/test/java/org/alfresco/test/community/level2/disposition_schedule/DispositionScheduleLinkedRecords.java
#	rm-automation/rm-automation-ui/src/test/java/org/alfresco/test/enterprise/security/classification/content/ClassifyRecord.java
#	rm-automation/rm-automation-ui/src/test/resources/smokeTests.xml
#	rm-automation/rm-automation-ui/src/test/resources/testng.xml
This commit is contained in:
Rodica Sutu
2018-02-27 15:35:44 +02:00
3 changed files with 116 additions and 25 deletions

View File

@@ -40,7 +40,6 @@ import org.alfresco.module.org_alfresco_module_rm.capability.CapabilityService;
import org.alfresco.module.org_alfresco_module_rm.model.BaseBehaviourBean;
import org.alfresco.module.org_alfresco_module_rm.search.RecordsManagementSearchService;
import org.alfresco.repo.node.NodeServicePolicies;
import org.alfresco.repo.node.integrity.IntegrityException;
import org.alfresco.repo.policy.Behaviour.NotificationFrequency;
import org.alfresco.repo.policy.annotation.Behaviour;
import org.alfresco.repo.policy.annotation.BehaviourBean;
@@ -59,7 +58,6 @@ import org.alfresco.service.cmr.site.SiteVisibility;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.ParameterCheck;
import org.alfresco.util.PropertyMap;
import org.springframework.extensions.surf.util.I18NUtil;
import com.google.common.collect.Sets;
@@ -316,7 +314,8 @@ public class RmSiteType extends BaseBehaviourBean
/**
* Add the limitation of creating only one rma:filePlan or one dod:filePlan depending on the type of rm site.
* Also added the limitation of crating two cm:folder type under rm site.
* Let multiple cm:folder type be created under rm site.
*
*
* Other than this nothing can be created under rm site nodeRef
*
@@ -344,25 +343,6 @@ public class RmSiteType extends BaseBehaviourBean
});
}
/**
* Overridden this because in this case we need to have multiple cm:folder types but not more than two of them.
* The two mentioned folders are created when rm site is created and one of them is Saved Searches and the other surf-config folder.
After that creation of cm:folder should not be allowed under rm site node
*
*/
@Override
protected void validateNewChildAssociation(NodeRef parent, NodeRef child, List<QName> acceptedUniqueChildType,
List<QName> acceptedMultipleChildType) throws IntegrityException
{
super.validateNewChildAssociation(parent, child, acceptedUniqueChildType, acceptedMultipleChildType);
// check the user is not trying to create more than 2 folders that are created by default.
if(nodeService.getChildAssocs(parent, Sets.newHashSet(ContentModel.TYPE_FOLDER)).size() > 2)
{
throw new IntegrityException(I18NUtil.getMessage(MULTIPLE_CHILDREN_TYPE_ERROR, ContentModel.TYPE_FOLDER), null);
}
}
@Behaviour
(
kind = BehaviourKind.CLASS,