Package org.exoplatform.portal.config
Class DynamicPortalLayoutService
java.lang.Object
org.exoplatform.portal.config.DynamicPortalLayoutService
- All Implemented Interfaces:
org.picocontainer.Startable
A Service to make displayed sites Portal Layout dynamic switch
configurations. This service will be used in front-end services to make
displayed site layout more dynamic and relying on stored site layout only.
-
Constructor Summary
ConstructorsConstructorDescriptionDynamicPortalLayoutService(org.exoplatform.container.configuration.ConfigurationManager configurationManager, org.exoplatform.portal.mop.service.LayoutService dataStorage, org.exoplatform.container.xml.InitParams params) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDynamicLayoutMatcher(DynamicPortalLayoutMatcherPlugin dynamicPortalLayoutMatcherPlugin) A method to injectDynamicPortalLayoutMatcherPluginby IOC.org.exoplatform.portal.config.model.PortalConfiggetPortalConfigWithDynamicLayout(org.exoplatform.portal.mop.SiteKey siteKey, String currentPortalSiteName) Computes the Portal Layout container to use when displaying site designated with siteKey parameter.voidstart()voidstop()
-
Constructor Details
-
DynamicPortalLayoutService
public DynamicPortalLayoutService(org.exoplatform.container.configuration.ConfigurationManager configurationManager, org.exoplatform.portal.mop.service.LayoutService dataStorage, org.exoplatform.container.xml.InitParams params)
-
-
Method Details
-
start
public void start()- Specified by:
startin interfaceorg.picocontainer.Startable
-
stop
public void stop()- Specified by:
stopin interfaceorg.picocontainer.Startable
-
addDynamicLayoutMatcher
public void addDynamicLayoutMatcher(DynamicPortalLayoutMatcherPlugin dynamicPortalLayoutMatcherPlugin) A method to injectDynamicPortalLayoutMatcherPluginby IOC.- Parameters:
dynamicPortalLayoutMatcherPlugin- plugin of typeComponentPluginto inject
-
getDynamicLayoutMatchers
- Returns:
- unmodifiable
ListofDynamicPortalLayoutMatcherPluginordered byComponentPlugin.getPriority()). The returned elements are unique usingComponentPlugin.getName()).
-
getPortalConfigWithDynamicLayout
public org.exoplatform.portal.config.model.PortalConfig getPortalConfigWithDynamicLayout(org.exoplatform.portal.mop.SiteKey siteKey, String currentPortalSiteName) throws Exception Computes the Portal Layout container to use when displaying site designated with siteKey parameter. The Portal Layout container is computed using components plugins of typeDynamicPortalLayoutMatcherPluginthat will use matchers inheriting fromDynamicPortalLayoutMatcherto produce the portal layout to use for the currently diplaying siteKey.- Parameters:
siteKey- mandatory site key of site to displaycurrentPortalSiteName- last displayed site of type PORTAL- Returns:
PortalConfigwith modified dynamic layout if matching, else the storedPortalConfigof siteKey as it is.- Throws:
Exception- when an error occurs while retrievingPortalConfigof current portal site or current site designated by siteKey parameter.
-