Interface SpaceTemplateService
public interface SpaceTemplateService
Provides methods to define and word with space template.
-
Method Summary
Modifier and TypeMethodDescriptionlongcreateSpacePublicSite(Space space, String publicSiteName, String publicSiteLabel, String[] accessPermissions) Creates a public site for the designated spacevoidextendSpaceTemplatePlugin(SpaceTemplateConfigPlugin spaceTemplateConfigPlugin) Extends space template config plugin for extending the space applications.Gets the default space template name.getLabelledSpaceTemplates(String userId, String lang) Gets all space templates on which the user has permissions with permission labels according to lang If userId is not an administrators, all permissions are emptyGets registered space application handlers.getSpaceTemplateByName(String name) Gets a space template by nameGets a list of space templatesgetSpaceTemplates(String userId) Gets all space templates on which the user has permissionsvoidinitSpaceApplications(Space space, SpaceApplicationHandler applicationHandler) Init space applications.voidregisterSpaceApplicationHandler(SpaceApplicationHandler spaceApplicationHandler) Adds space application handler for configuring the space applications.voidregisterSpaceTemplatePlugin(SpaceTemplateConfigPlugin spaceTemplateConfigPlugin) Adds space template config plugin for configuring the space applications, visibility, registration and banner.voidan application status is composed with the form of: [appId:appDisplayName:isRemovableString:status].
-
Method Details
-
getSpaceTemplates
List<SpaceTemplate> getSpaceTemplates()Gets a list of space templates- Returns:
- The space templates list.
-
getSpaceTemplates
Gets all space templates on which the user has permissions- Parameters:
userId-- Throws:
Exception
-
getLabelledSpaceTemplates
Gets all space templates on which the user has permissions with permission labels according to lang If userId is not an administrators, all permissions are empty- Parameters:
userId-lang-- Throws:
Exception
-
getSpaceTemplateByName
Gets a space template by name- Parameters:
name-- Returns:
- The space template.
-
registerSpaceTemplatePlugin
Adds space template config plugin for configuring the space applications, visibility, registration and banner.- Parameters:
spaceTemplateConfigPlugin- The space template config plugin to be added.
-
extendSpaceTemplatePlugin
Extends space template config plugin for extending the space applications.- Parameters:
spaceTemplateConfigPlugin- The space template config plugin to be added.
-
registerSpaceApplicationHandler
Adds space application handler for configuring the space applications.- Parameters:
spaceApplicationHandler- The space application handler to be added.
-
getSpaceApplicationHandlers
Map<String,SpaceApplicationHandler> getSpaceApplicationHandlers()Gets registered space application handlers. -
getDefaultSpaceTemplate
String getDefaultSpaceTemplate()Gets the default space template name. -
initSpaceApplications
void initSpaceApplications(Space space, SpaceApplicationHandler applicationHandler) throws SpaceException Init space applications.- Parameters:
space- The space..- Throws:
SpaceException
-
createSpacePublicSite
long createSpacePublicSite(Space space, String publicSiteName, String publicSiteLabel, String[] accessPermissions) Creates a public site for the designated space- Parameters:
space- chosenSpaceto create its public sitepublicSiteName- chosen Site Name to createpublicSiteLabel- chosen Site labelaccessPermissions- Site access Permissions- Returns:
- created site identifier
-
setApp
an application status is composed with the form of: [appId:appDisplayName:isRemovableString:status]. And space app properties is the combined of application statuses separated by a comma (,). For example: space.getApp() ="SpaceSettingPortlet:SpaceSettingPortletName:false:active,MembersPortlet:MembersPortlet:true:active" ;- Parameters:
space-appId-appName-isRemovable-status-
-