Class DynamicPortalLayoutMatcherPlugin

java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.portal.config.DynamicPortalLayoutMatcherPlugin
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin

public class DynamicPortalLayoutMatcherPlugin extends org.exoplatform.container.component.BaseComponentPlugin
A ComponentPlugin to inject by IOC in order to customize site layout to display in UI switch site properties.
  • Constructor Details

    • DynamicPortalLayoutMatcherPlugin

      public DynamicPortalLayoutMatcherPlugin(org.exoplatform.container.xml.InitParams params)
  • Method Details

    • getPortalConfigWithDynamicLayout

      public org.exoplatform.portal.config.model.PortalConfig getPortalConfigWithDynamicLayout(org.exoplatform.portal.mop.SiteKey siteKey, org.exoplatform.portal.config.model.PortalConfig sitePortalConfig, org.exoplatform.portal.config.model.PortalConfig currentSitePortalConfig)
      Return PortalConfig of siteKey parameter. The portal layout of corresponding sitePortalConfig parameter will be changed switch configured matcher plugins.
      Parameters:
      siteKey - siteKey of currently displaying site
      sitePortalConfig - site PortalConfig of currently displaying site
      currentSitePortalConfig - used site PortalConfig of TYPE 'PORTAL' to use in layout computing
      Returns:
      PortalConfig with modified portalLayout switch dynamic matchers. If not modified, return null.
    • init

      public void init(org.exoplatform.container.configuration.ConfigurationManager configurationManager)
      Retrieves layout to use for displaying site layout from configured file path using configured parameter layoutTemplatePath. If no file path is configured, no specific layout will be used. If the file wasn't found or an error occurs while parsing or retrieving file content, the plugin will be disabled to avoid incoherent behavior.
      Parameters:
      configurationManager - used to retrieve files with Kernel path pattern (war:/..., jar:/...)
    • isInitialized

      public boolean isInitialized()
      Returns:
      true if init method has been called at least once, else false
    • isEnabled

      public boolean isEnabled()
      Returns:
      true if plugin is enabled
    • setEnabled

      public void setEnabled(boolean enabled)
      enables/disables plugin
      Parameters:
      enabled - true to enabled, else false
    • isUseCurrentPortalLayout

      public boolean isUseCurrentPortalLayout()
      Returns:
      true if last displayed site of type PORTAL should be used to retrieve its layout
    • setUseCurrentPortalLayout

      public void setUseCurrentPortalLayout(boolean useCurrentPortalLayout)
      Parameters:
      useCurrentPortalLayout - true to enabled using last displayed site layout of type PORTAL
    • getLayoutTemplatePath

      public String getLayoutTemplatePath()
      Returns:
      template
    • setLayoutTemplate

      public void setLayoutTemplate(org.exoplatform.portal.config.model.Container layoutTemplatePortalConfig)
    • getDynamicLayoutMatcher

      public DynamicPortalLayoutMatcher getDynamicLayoutMatcher()
    • setDynamicLayoutMatcher

      public void setDynamicLayoutMatcher(DynamicPortalLayoutMatcher dynamicLayoutMatcher)
    • getLayoutTemplate

      public org.exoplatform.portal.config.model.Container getLayoutTemplate()