Interface SpaceTemplateService
-
public interface SpaceTemplateServiceProvides methods to define and word with space template.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidextendSpaceTemplatePlugin(SpaceTemplateConfigPlugin spaceTemplateConfigPlugin)Extends space template config plugin for extending the space applications.StringgetDefaultSpaceTemplate()Gets the default space template name.List<SpaceTemplate>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 emptyMap<String,SpaceApplicationHandler>getSpaceApplicationHandlers()Gets registered space application handlers.SpaceTemplategetSpaceTemplateByName(String name)Gets a space template by nameList<SpaceTemplate>getSpaceTemplates()Gets a list of space templatesList<SpaceTemplate>getSpaceTemplates(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.voidsetApp(Space space, String appId, String appName, boolean isRemovable, String status)an application status is composed with the form of: [appId:appDisplayName:isRemovableString:status].
-
-
-
Method Detail
-
getSpaceTemplates
List<SpaceTemplate> getSpaceTemplates()
Gets a list of space templates- Returns:
- The space templates list.
-
getSpaceTemplates
List<SpaceTemplate> getSpaceTemplates(String userId) throws Exception
Gets all space templates on which the user has permissions- Parameters:
userId-- Throws:
Exception
-
getLabelledSpaceTemplates
List<SpaceTemplate> getLabelledSpaceTemplates(String userId, String lang) throws Exception
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
SpaceTemplate getSpaceTemplateByName(String name)
Gets a space template by name- Parameters:
name-- Returns:
- The space template.
-
registerSpaceTemplatePlugin
void registerSpaceTemplatePlugin(SpaceTemplateConfigPlugin spaceTemplateConfigPlugin)
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
void extendSpaceTemplatePlugin(SpaceTemplateConfigPlugin spaceTemplateConfigPlugin)
Extends space template config plugin for extending the space applications.- Parameters:
spaceTemplateConfigPlugin- The space template config plugin to be added.
-
registerSpaceApplicationHandler
void registerSpaceApplicationHandler(SpaceApplicationHandler spaceApplicationHandler)
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
-
setApp
void setApp(Space space, String appId, String appName, boolean isRemovable, String status)
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-
-
-