Class PortalContainerConfig
java.lang.Object
org.exoplatform.container.definition.PortalContainerConfig
- All Implemented Interfaces:
Startable
This class is used to define the configuration related to the portal containers themselves.
It is mainly dedicated to the
RootContainer to allows to understand how to manage and
deploy all the portal containers
Created by The eXo Platform SAS
Author : Nicolas Filotto
nicolas.filotto@exoplatform.com
26 ao�t 2009-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default name of a portal containerstatic final StringThe default realm namestatic final StringThe default name of a theServletContextof the rest web applicationstatic final StringThe name of the setting corresponding to the portal container namestatic final StringThe name of the setting corresponding to the relam namestatic final StringThe name of the setting corresponding to the rest context name -
Constructor Summary
ConstructorsConstructorDescriptionPortalContainerConfig(ConfigurationManager cm, J2EEServerInfo serverInfo) PortalContainerConfig(ConfigurationManager cm, J2EEServerInfo serverInfo, PropertyConfigurator pc) PortalContainerConfig(InitParams params, ConfigurationManager cm) PortalContainerConfig(InitParams params, ConfigurationManager cm, J2EEServerInfo serverInfo) PortalContainerConfig(InitParams params, ConfigurationManager cm, J2EEServerInfo serverInfo, PropertyConfigurator pc) We add thePropertyConfiguratorin the constructor, in order to make sure that it is created before since it could define some JVM parameters that could be used internally by thePortalContainerConfigPortalContainerConfig(InitParams params, ConfigurationManager cm, PropertyConfigurator pc) -
Method Summary
Modifier and TypeMethodDescriptionvoiddisablePortalContainer(String name) Disables a portal container if it has not yet been disabled.getDependencies(String portalContainerName) Gives all the dependencies related to the given portal containergetPortalContainerName(String contextName) Gives the portal container names for which the web application is available if several portal container are available only the fist one will be returnedgetPortalContainerNames(String contextName) Gives the list of all the portal container names for which the web application is availablegetRealmName(String portalContainerName) Gives the name of the realm related to the given portal containergetRestContextName(String portalContainerName) Gives the name of the restServletContextrelated to the given portal containergetSetting(String portalContainerName, String settingName) Give the value of a given setting for a given portal container namebooleanIndicates if at least one portal container definition has been defined.booleanisPortalContainerName(String name) Indicates if the given name is the name of a registered portal containerbooleanIndicates if the given name is the name of a portal container that has been registered as disabledbooleanisScopeValid(String portalContainerName, String contextName) Indicates if the given servlet context is a dependency of the given portal containervoidAllow to define a set of changes to apply to the registeredPortalContainerDefinitionvoidAllow to disable a set of portal containersvoidAllow to define a set ofPortalContainerDefinitionvoidRegisters a name of a portal container if it has not yet been registeredvoidstart()Start this component.voidstop()Stop this component.voidUnregisters a name of a portal container if it has not yet been unregistered
-
Field Details
-
PORTAL_CONTAINER_SETTING_NAME
The name of the setting corresponding to the portal container name- See Also:
-
REST_CONTEXT_SETTING_NAME
The name of the setting corresponding to the rest context name- See Also:
-
REALM_SETTING_NAME
The name of the setting corresponding to the relam name- See Also:
-
DEFAULT_PORTAL_CONTAINER_NAME
The default name of a portal container -
DEFAULT_REST_CONTEXT_NAME
The default name of a theServletContextof the rest web application -
DEFAULT_REALM_NAME
The default realm name
-
-
Constructor Details
-
PortalContainerConfig
-
PortalContainerConfig
-
PortalContainerConfig
-
PortalContainerConfig
public PortalContainerConfig(ConfigurationManager cm, J2EEServerInfo serverInfo, PropertyConfigurator pc) -
PortalContainerConfig
-
PortalContainerConfig
-
PortalContainerConfig
-
PortalContainerConfig
public PortalContainerConfig(InitParams params, ConfigurationManager cm, J2EEServerInfo serverInfo, PropertyConfigurator pc) We add thePropertyConfiguratorin the constructor, in order to make sure that it is created before since it could define some JVM parameters that could be used internally by thePortalContainerConfig
-
-
Method Details
-
getDefaultPortalContainer
- Returns:
- the default name of the portal container
-
getDefaultRestContext
- Returns:
- the default name of the rest
ServletContext
-
getDefaultRealmName
- Returns:
- the default name of the realm
-
hasDefinition
public boolean hasDefinition()Indicates if at least one portal container definition has been defined. If no portal definition has been defined, we assume that we want the old behavior- Returns:
trueif at least one definition has been set,falseotherwise
-
disablePortalContainer
Disables a portal container if it has not yet been disabled.- Parameters:
name- the name of the portal container to disable
-
isPortalContainerNameDisabled
Indicates if the given name is the name of a portal container that has been registered as disabled- Parameters:
name- the name to check- Returns:
trueif the name is a name of a disabled portal container,falseotherwise.
-
registerPortalContainerName
Registers a name of a portal container if it has not yet been registered- Parameters:
name- the name of the portal container to register
-
unregisterPortalContainerName
Unregisters a name of a portal container if it has not yet been unregistered- Parameters:
name- the name of the portal container to register
-
isPortalContainerName
Indicates if the given name is the name of a registered portal container- Parameters:
name- the name to check- Returns:
trueif the name is a name of a portal container,falseotherwise.
-
getPortalContainerNames
Gives the list of all the portal container names for which the web application is available- Parameters:
contextName- the context name of the web application- Returns:
- the list of all the portal container names for which the web application is available
-
getPortalContainerName
Gives the portal container names for which the web application is available if several portal container are available only the fist one will be returned- Parameters:
contextName- the context name of the web application- Returns:
- the portal container names for which the web application is available
-
getDependencies
Gives all the dependencies related to the given portal container- Parameters:
portalContainerName- the name of the portal container for which we want the dependencies- Returns:
- a list of sorted context names
-
getSetting
Give the value of a given setting for a given portal container name- Parameters:
portalContainerName- the name of the portal container for which we want the value of the settingsettingName- the name of the setting that we seek- Returns:
- the value of the setting,
nullif it cans not be found.
-
getRestContextName
Gives the name of the restServletContextrelated to the given portal container- Parameters:
portalContainerName- the name of the portal container for which we want the rest context name- Returns:
- the name of the related rest context name. It tries to get it from the
PortalContainerDefinitionif it has not been set it will returndefaultDefinition.getRestContextName()
-
getRealmName
Gives the name of the realm related to the given portal container- Parameters:
portalContainerName- the name of the portal container for which we want the realm name- Returns:
- the name of the related realm name. It tries to get it from the
PortalContainerDefinitionif it has not been set it will returndefaultDefinition.getRealmName()
-
isScopeValid
Indicates if the given servlet context is a dependency of the given portal container- Parameters:
portalContainerName- the name of the portal containercontextName- the name of theServletContext- Returns:
trueif the dependencies matches,falseotherwise;
-
registerPlugin
Allow to define a set ofPortalContainerDefinition- Parameters:
plugin- the plugin that contains all thePortalContainerDefinitionto define
-
registerDisablePlugin
Allow to disable a set of portal containers- Parameters:
plugin- the plugin that defines the name of portal containers to disable
-
registerChangePlugin
Allow to define a set of changes to apply to the registeredPortalContainerDefinition- Parameters:
plugin- the plugin that defines the changes to apply
-
start
public void start()Start this component. Called initially at the begin of the lifecycle. It can be called again after a stop. -
stop
public void stop()Stop this component. Called near the end of the lifecycle. It can be called again after a further start. ImplementDisposableif you need a single call at the definite end of the lifecycle.
-