Class PortalApplication

java.lang.Object
org.exoplatform.container.component.BaseComponentPlugin
org.exoplatform.web.application.Application
org.exoplatform.webui.application.WebuiApplication
org.exoplatform.portal.application.PortalApplication
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin

public class PortalApplication extends WebuiApplication
The PortalApplication class is an implementation of the WebuiApplication abstract class which defines the type of application that can be deployed in our framework (that includes portal, portlets, widgets...) This class is a wrapper of all portal information such as ResourceBundle for i18n, the current ExoContainer in use as well as the init parameters defined along with the servlet web.xml
  • Field Details

    • log

      protected static org.exoplatform.services.log.Log log
    • PORTAL_APPLICATION_ID

      public static final String PORTAL_APPLICATION_ID
      See Also:
  • Constructor Details

    • PortalApplication

      public PortalApplication(jakarta.servlet.ServletConfig config)
      The constructor references resource resolvers that allows the ApplicationResourceResolver to extract files from different locations such as the current war or external one such as the resource one where several static files are shared among all portal instances.
      Parameters:
      config - , the servlet config that contains init params such as the path location of the XML configuration file for the WebUI framework
  • Method Details

    • onInit

      public void onInit() throws Exception
      This method first calls the super.onInit() of the WebuiApplication. That super method parse the XML file and stores its content in the ConfigurationManager object. It also set up he StateManager and init the application lifecycle phases. Then we get all the properties file that will be used to create ResourceBundles
      Overrides:
      onInit in class WebuiApplication
      Throws:
      Exception
    • getServletConfig

      public jakarta.servlet.ServletConfig getServletConfig()
    • getApplicationId

      public String getApplicationId()
      Specified by:
      getApplicationId in class org.exoplatform.web.application.Application
    • getApplicationName

      public String getApplicationName()
      Specified by:
      getApplicationName in class org.exoplatform.web.application.Application
    • getApplicationGroup

      public String getApplicationGroup()
      Specified by:
      getApplicationGroup in class org.exoplatform.web.application.Application
    • getApplicationType

      public String getApplicationType()
      Specified by:
      getApplicationType in class org.exoplatform.web.application.Application
    • getResourceBundle

      public ResourceBundle getResourceBundle(Locale locale)
      extract ResourceBundle from the ResourceBundleService using the bundle defined in the configuration XML file for the UI application
      Specified by:
      getResourceBundle in class org.exoplatform.web.application.Application
    • getOwnerResourceBundle

      public ResourceBundle getOwnerResourceBundle(String username, Locale locale)
      extract the ResourceBundle associated with the current user from the ResourceBundleService
      Specified by:
      getOwnerResourceBundle in class org.exoplatform.web.application.Application
    • getApplicationInitParam

      public String getApplicationInitParam(String name)
      Specified by:
      getApplicationInitParam in class WebuiApplication