RM-1427 (Delete RM site permanently)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@66031 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2014-04-01 11:04:41 +00:00
parent 48bb2db015
commit 6370697ffb
3 changed files with 18 additions and 0 deletions

View File

@@ -33,6 +33,7 @@
<type name="rma:rmsite"> <type name="rma:rmsite">
<title>RM Site</title> <title>RM Site</title>
<parent>st:site</parent> <parent>st:site</parent>
<archive>false</archive>
</type> </type>
<!-- Caveat config - allowed values for users/groups for supplemental markings and/or user-defined fields --> <!-- Caveat config - allowed values for users/groups for supplemental markings and/or user-defined fields -->

View File

@@ -88,6 +88,7 @@
<property name="siteService" ref="SiteService"/> <property name="siteService" ref="SiteService"/>
<property name="recordsManagementSearchService" ref="RecordsManagementSearchService" /> <property name="recordsManagementSearchService" ref="RecordsManagementSearchService" />
<property name="capabilityService" ref="CapabilityService" /> <property name="capabilityService" ref="CapabilityService" />
<property name="authorityService" ref="AuthorityService" />
</bean> </bean>
<!-- rma model aspects --> <!-- rma model aspects -->

View File

@@ -38,6 +38,7 @@ import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.StoreRef; import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.cmr.security.AccessStatus; import org.alfresco.service.cmr.security.AccessStatus;
import org.alfresco.service.cmr.security.AuthorityService;
import org.alfresco.service.cmr.site.SiteInfo; import org.alfresco.service.cmr.site.SiteInfo;
import org.alfresco.service.cmr.site.SiteService; import org.alfresco.service.cmr.site.SiteService;
import org.alfresco.service.cmr.site.SiteVisibility; import org.alfresco.service.cmr.site.SiteVisibility;
@@ -74,6 +75,9 @@ public class RmSiteType extends BaseBehaviourBean
/** Capability service */ /** Capability service */
protected CapabilityService capabilityService; protected CapabilityService capabilityService;
/** Authority service */
private AuthorityService authorityService;
/** Map of file plan type's key'ed by corresponding site types */ /** Map of file plan type's key'ed by corresponding site types */
protected Map<QName, QName> mapFilePlanType = new HashMap<QName, QName>(3); protected Map<QName, QName> mapFilePlanType = new HashMap<QName, QName>(3);
@@ -102,6 +106,14 @@ public class RmSiteType extends BaseBehaviourBean
this.capabilityService = capabilityService; this.capabilityService = capabilityService;
} }
/**
* @param authorityService authority service
*/
public void setAuthorityService(AuthorityService authorityService)
{
this.authorityService = authorityService;
}
/** /**
* Registers a file plan type for a specific site type. * Registers a file plan type for a specific site type.
* *
@@ -256,6 +268,10 @@ public class RmSiteType extends BaseBehaviourBean
{ {
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.");
} }
// delete the authority
String siteGroup = siteService.getSiteGroup(siteInfo.getShortName());
authorityService.deleteAuthority(siteGroup, true);
} }
} }
} }