Class DefaultSpaceApplicationHandler
java.lang.Object
org.exoplatform.social.core.space.impl.DefaultSpaceApplicationHandler
- All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin,org.exoplatform.social.core.space.spi.SpaceApplicationHandler
public class DefaultSpaceApplicationHandler
extends Object
implements org.exoplatform.social.core.space.spi.SpaceApplicationHandler
Default implementation for working with space applications.
- Since:
- OCt 17, 2008
- Author:
- dang.tung, hoatle (hoatlevan at gmail dot com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected static final StringThe {groupId} preference value patternprotected org.exoplatform.portal.mop.service.LayoutServiceprotected static final org.exoplatform.services.log.Logprotected static final StringThe {modifiedGroupId} preference value patternprotected org.exoplatform.portal.module.ModuleRegistrystatic final Stringprotected org.exoplatform.portal.mop.service.NavigationServiceprotected static final StringThe {pageName} preference value patternprotected static final StringThe {pageUrl} preference value patternprotected org.exoplatform.portal.mop.storage.PageStoragestatic final Stringprotected org.exoplatform.social.core.space.spi.SpaceServiceprotected org.exoplatform.social.core.space.spi.SpaceTemplateServiceprotected static final Stringprotected String -
Constructor Summary
ConstructorsConstructorDescriptionDefaultSpaceApplicationHandler(org.exoplatform.container.xml.InitParams params, org.exoplatform.portal.mop.service.LayoutService layoutService, org.exoplatform.portal.mop.service.NavigationService navigationService, org.exoplatform.portal.mop.storage.PageStorage pageService, org.exoplatform.social.core.space.spi.SpaceTemplateService spaceTemplateService) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivateApplication(org.exoplatform.social.core.space.model.Space space, String appId, String appName) protected org.exoplatform.portal.mop.navigation.NodeContext<org.exoplatform.portal.mop.navigation.NodeContext<?>> createPageNodeFromApplication(org.exoplatform.portal.mop.navigation.NavigationContext navContext, org.exoplatform.portal.mop.navigation.NodeContext<org.exoplatform.portal.mop.navigation.NodeContext<?>> nodeCtx, org.exoplatform.social.core.space.model.Space space, org.exoplatform.social.core.space.SpaceApplication spaceApplication, String appName, boolean isRoot) Creates page node from application.protected org.exoplatform.portal.config.model.Application<org.exoplatform.portal.pom.spi.portlet.Portlet> createPortletApplication(String instanceId, org.exoplatform.social.core.space.model.Space space, boolean isRoot) Creates portlet application from instanceIdprotected org.exoplatform.portal.config.model.PagecreateSpacePage(org.exoplatform.portal.config.UserPortalConfigService userPortalConfigService, org.exoplatform.social.core.space.model.Space space, org.exoplatform.social.core.space.Application app, org.exoplatform.portal.config.model.Application<org.exoplatform.portal.pom.spi.portlet.Portlet> portletApplication, boolean isRoot) protected voiddeactivateApplicationClassic(org.exoplatform.social.core.space.model.Space space, String appId) Deactivates an application in a spacevoiddeactiveApplication(org.exoplatform.social.core.space.model.Space space, String appId) voiddeInitApp(org.exoplatform.social.core.space.model.Space space) protected org.exoplatform.social.core.space.ApplicationgetApplication(String appId) Gets an application by its id.protected org.exoplatform.portal.module.ModuleRegistrygetName()protected org.exoplatform.social.core.space.SpaceApplicationgetSpaceApplication(org.exoplatform.social.core.space.SpaceTemplate spaceTemplate, String appId) protected org.exoplatform.social.core.space.spi.SpaceServiceprotected org.exoplatform.portal.mop.navigation.NodeContext<org.exoplatform.portal.mop.navigation.NodeContext<?>> getSpaceUserNode(org.exoplatform.social.core.space.model.Space space) protected StringgetSubstituteValueFromPattern(org.exoplatform.social.core.space.model.Space space, org.exoplatform.social.core.space.SpaceApplication spaceApplication, String pattern) protected org.exoplatform.portal.config.UserPortalConfigServiceGets userPortalConfigService for the usage of creating new page from page templatevoidinitApps(org.exoplatform.social.core.space.model.Space space, org.exoplatform.social.core.space.SpaceTemplate spaceTemplate) voidinstallApplication(org.exoplatform.social.core.space.model.Space space, String appId) protected booleanisPortletActive(String potletFullId) voidmoveApplication(org.exoplatform.social.core.space.model.Space space, String appId, int transition) voidremoveApplication(org.exoplatform.social.core.space.model.Space space, String appId, String appName) protected voidremoveApplicationClassic(org.exoplatform.social.core.space.model.Space space, String appId, String appName) Removes an classic-type application from a spacevoidremoveApplications(org.exoplatform.social.core.space.model.Space space) voidrestoreApplicationLayout(org.exoplatform.social.core.space.model.Space space, String appId) protected ArrayList<org.exoplatform.portal.config.model.ModelObject> setContainerById(ArrayList<org.exoplatform.portal.config.model.ModelObject> childs, org.exoplatform.portal.config.model.Container container) Sets container by Idvoidvoidprotected voidsetPage(org.exoplatform.social.core.space.model.Space space, org.exoplatform.social.core.space.Application app, org.exoplatform.portal.config.model.Application<org.exoplatform.portal.pom.spi.portlet.Portlet> portletApplication, org.exoplatform.portal.config.model.Page page) protected voidsetPermissionForPage(ArrayList<org.exoplatform.portal.config.model.ModelObject> children, String perm) Sets permission for page.
-
Field Details
-
LOG
protected static final org.exoplatform.services.log.Log LOG -
NAME
- See Also:
-
TEMPLATE_NAME_PARAM
- See Also:
-
SPACE_TEMPLATE_PAGE_ID
- See Also:
-
APPLICATION_CONTAINER
- See Also:
-
GROUP_ID_PREFERENCE
The {groupId} preference value pattern- Since:
- 1.2.0-GA
- See Also:
-
MODIFIED_GROUP_ID_PREFERENCE
The {modifiedGroupId} preference value pattern- Since:
- 1.2.0-GA
- See Also:
-
PAGE_NAME_PREFERENCE
The {pageName} preference value pattern- Since:
- 1.2.0-GA
- See Also:
-
PAGE_URL_PREFERENCE
The {pageUrl} preference value pattern- Since:
- 1.2.0-GA
- See Also:
-
layoutService
protected org.exoplatform.portal.mop.service.LayoutService layoutService -
pageStorage
protected org.exoplatform.portal.mop.storage.PageStorage pageStorage -
spaceService
protected org.exoplatform.social.core.space.spi.SpaceService spaceService -
moduleRegistry
protected org.exoplatform.portal.module.ModuleRegistry moduleRegistry -
spaceTemplateService
protected org.exoplatform.social.core.space.spi.SpaceTemplateService spaceTemplateService -
templateName
-
-
Constructor Details
-
Method Details
-
initApps
public void initApps(org.exoplatform.social.core.space.model.Space space, org.exoplatform.social.core.space.SpaceTemplate spaceTemplate) throws org.exoplatform.social.core.space.SpaceException - Specified by:
initAppsin interfaceorg.exoplatform.social.core.space.spi.SpaceApplicationHandler- Throws:
org.exoplatform.social.core.space.SpaceException
-
deInitApp
public void deInitApp(org.exoplatform.social.core.space.model.Space space) throws org.exoplatform.social.core.space.SpaceException - Specified by:
deInitAppin interfaceorg.exoplatform.social.core.space.spi.SpaceApplicationHandler- Throws:
org.exoplatform.social.core.space.SpaceException
-
activateApplication
public void activateApplication(org.exoplatform.social.core.space.model.Space space, String appId, String appName) - Specified by:
activateApplicationin interfaceorg.exoplatform.social.core.space.spi.SpaceApplicationHandler
-
deactiveApplication
public void deactiveApplication(org.exoplatform.social.core.space.model.Space space, String appId) throws org.exoplatform.social.core.space.SpaceException - Specified by:
deactiveApplicationin interfaceorg.exoplatform.social.core.space.spi.SpaceApplicationHandler- Throws:
org.exoplatform.social.core.space.SpaceException
-
installApplication
public void installApplication(org.exoplatform.social.core.space.model.Space space, String appId) throws org.exoplatform.social.core.space.SpaceException - Specified by:
installApplicationin interfaceorg.exoplatform.social.core.space.spi.SpaceApplicationHandler- Throws:
org.exoplatform.social.core.space.SpaceException
-
removeApplication
public void removeApplication(org.exoplatform.social.core.space.model.Space space, String appId, String appName) throws org.exoplatform.social.core.space.SpaceException - Specified by:
removeApplicationin interfaceorg.exoplatform.social.core.space.spi.SpaceApplicationHandler- Throws:
org.exoplatform.social.core.space.SpaceException
-
removeApplications
public void removeApplications(org.exoplatform.social.core.space.model.Space space) throws org.exoplatform.social.core.space.SpaceException - Specified by:
removeApplicationsin interfaceorg.exoplatform.social.core.space.spi.SpaceApplicationHandler- Throws:
org.exoplatform.social.core.space.SpaceException
-
moveApplication
public void moveApplication(org.exoplatform.social.core.space.model.Space space, String appId, int transition) throws Exception - Specified by:
moveApplicationin interfaceorg.exoplatform.social.core.space.spi.SpaceApplicationHandler- Throws:
Exception
-
restoreApplicationLayout
public void restoreApplicationLayout(org.exoplatform.social.core.space.model.Space space, String appId) throws Exception - Specified by:
restoreApplicationLayoutin interfaceorg.exoplatform.social.core.space.spi.SpaceApplicationHandler- Throws:
Exception
-
getName
- Specified by:
getNamein interfaceorg.exoplatform.container.component.ComponentPlugin- Specified by:
getNamein interfaceorg.exoplatform.social.core.space.spi.SpaceApplicationHandler
-
setName
- Specified by:
setNamein interfaceorg.exoplatform.container.component.ComponentPlugin
-
getDescription
- Specified by:
getDescriptionin interfaceorg.exoplatform.container.component.ComponentPlugin
-
setDescription
- Specified by:
setDescriptionin interfaceorg.exoplatform.container.component.ComponentPlugin
-
deactivateApplicationClassic
protected void deactivateApplicationClassic(org.exoplatform.social.core.space.model.Space space, String appId) Deactivates an application in a space- Parameters:
space-appId-
-
removeApplicationClassic
protected void removeApplicationClassic(org.exoplatform.social.core.space.model.Space space, String appId, String appName) throws org.exoplatform.social.core.space.SpaceException Removes an classic-type application from a space- Parameters:
space-appId-- Throws:
org.exoplatform.social.core.space.SpaceException
-
createSpacePage
protected org.exoplatform.portal.config.model.Page createSpacePage(org.exoplatform.portal.config.UserPortalConfigService userPortalConfigService, org.exoplatform.social.core.space.model.Space space, org.exoplatform.social.core.space.Application app, org.exoplatform.portal.config.model.Application<org.exoplatform.portal.pom.spi.portlet.Portlet> portletApplication, boolean isRoot) throws Exception - Throws:
Exception
-
getApplication
protected org.exoplatform.social.core.space.Application getApplication(String appId) throws org.exoplatform.social.core.space.SpaceException Gets an application by its id.- Parameters:
appId-- Returns:
- Throws:
org.exoplatform.social.core.space.SpaceException
-
setPage
protected void setPage(org.exoplatform.social.core.space.model.Space space, org.exoplatform.social.core.space.Application app, org.exoplatform.portal.config.model.Application<org.exoplatform.portal.pom.spi.portlet.Portlet> portletApplication, org.exoplatform.portal.config.model.Page page) -
setPermissionForPage
protected void setPermissionForPage(ArrayList<org.exoplatform.portal.config.model.ModelObject> children, String perm) Sets permission for page.- Parameters:
children-perm-
-
setContainerById
protected ArrayList<org.exoplatform.portal.config.model.ModelObject> setContainerById(ArrayList<org.exoplatform.portal.config.model.ModelObject> childs, org.exoplatform.portal.config.model.Container container) Sets container by Id- Parameters:
childs-container-- Returns:
-
createPortletApplication
protected org.exoplatform.portal.config.model.Application<org.exoplatform.portal.pom.spi.portlet.Portlet> createPortletApplication(String instanceId, org.exoplatform.social.core.space.model.Space space, boolean isRoot) Creates portlet application from instanceId- Parameters:
instanceId-- Returns:
-
getSubstituteValueFromPattern
-
getUserPortalConfigService
protected org.exoplatform.portal.config.UserPortalConfigService getUserPortalConfigService()Gets userPortalConfigService for the usage of creating new page from page template- Returns:
-
getSpaceService
protected org.exoplatform.social.core.space.spi.SpaceService getSpaceService() -
isPortletActive
-
getModuleRegistry
protected org.exoplatform.portal.module.ModuleRegistry getModuleRegistry() -
getSpaceUserNode
protected org.exoplatform.portal.mop.navigation.NodeContext<org.exoplatform.portal.mop.navigation.NodeContext<?>> getSpaceUserNode(org.exoplatform.social.core.space.model.Space space) throws Exception - Throws:
Exception
-
getSpaceApplication
protected org.exoplatform.social.core.space.SpaceApplication getSpaceApplication(org.exoplatform.social.core.space.SpaceTemplate spaceTemplate, String appId) throws org.exoplatform.social.core.space.SpaceException - Throws:
org.exoplatform.social.core.space.SpaceException
-