mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
RM: Fix up HEAD so RM module UI reliably works
* extended site service Java API so that the *type* of site can be optionally specified. This must be a sub-type of st:site * extend site service JScript API to allow site type to be optionally specified * extend site service REST API to allow site type to optionally specified * add the site type rm:rmsite to the RM model * modify the RM web script to create the RM site with type rm:rmsite * added behaviour listening to the creation of rm:rmsite. This creates the documentlibrary with the correct rm:fileplan type * tested Note: this is an issue that has been noted before (need to track down the JIRA), but became significantly worse with the move to HEAD. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28443 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,6 +30,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.site.SiteInfo;
|
||||
import org.alfresco.service.cmr.site.SiteService;
|
||||
import org.alfresco.service.cmr.site.SiteVisibility;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.springframework.extensions.surf.util.ParameterCheck;
|
||||
|
||||
|
||||
@@ -108,6 +109,28 @@ public class ScriptSiteService extends BaseScopableProcessorExtension
|
||||
return new Site(siteInfo, this.serviceRegistry, this.siteService, getScope());
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new site.
|
||||
* <p>
|
||||
* The site short name will be used to uniquely identify the site so it must be unique.
|
||||
*
|
||||
* @param sitePreset site preset
|
||||
* @param shortName site short name
|
||||
* @param title site title
|
||||
* @param description site description
|
||||
* @param visibility visibility of the site (public|moderated|private)
|
||||
* @param siteType qname of site type to create
|
||||
* @return Site the created site
|
||||
*/
|
||||
public Site createSite(String sitePreset, String shortName, String title, String description, String visibility, String siteType)
|
||||
{
|
||||
ParameterCheck.mandatoryString("visibility", visibility);
|
||||
SiteVisibility siteVisibility = SiteVisibility.valueOf(visibility);
|
||||
QName siteTypeQName = QName.createQName(siteType);
|
||||
SiteInfo siteInfo = this.siteService.createSite(sitePreset, shortName, title, description, siteVisibility, siteTypeQName);
|
||||
return new Site(siteInfo, this.serviceRegistry, this.siteService, getScope());
|
||||
}
|
||||
|
||||
/**
|
||||
* This method checks if the currently authenticated user has permission to create sites.
|
||||
*
|
||||
|
Reference in New Issue
Block a user