public class PortalContainer extends ExoContainer implements org.exoplatform.container.SessionManagerContainer
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
PortalContainer.RegisterTask
This class is used to register a portal container 
 | 
static class  | 
PortalContainer.UnregisterTask
This class is used to unregister a portal container 
 | 
| Modifier and Type | Field and Description | 
|---|---|
static String | 
DEFAULT_PORTAL_CONTAINER_NAME
The default name of the portal container 
 | 
static String | 
DEFAULT_REALM_NAME
The default name of a the realm 
 | 
static String | 
DEFAULT_REST_CONTEXT_NAME
The default name of a the  
ServletContext of the rest web application | 
context, LOG, parent, stopping| Constructor and Description | 
|---|
PortalContainer(RootContainer parent,
               javax.servlet.ServletContext portalContext)  | 
| Modifier and Type | Method and Description | 
|---|---|
static void | 
addInitTask(javax.servlet.ServletContext context,
           RootContainer.PortalContainerInitTask task)
Add an init-task to all the portal container instances related to the given ServletContext 
 | 
static void | 
addInitTask(javax.servlet.ServletContext context,
           RootContainer.PortalContainerInitTask task,
           String portalContainerName)
Add an init-task to all the portal container instances related to the given ServletContext if the
 given portal container name is  
null other it will execute the task only of this
 portal container if the ServletContext is on of its dependencies | 
org.exoplatform.container.SessionContainer | 
createSessionContainer(String id,
                      String owner)  | 
static Object | 
getComponent(Class key)  | 
String | 
getConfigurationXML()  | 
static PortalContainer | 
getCurrentInstance(javax.servlet.ServletContext context)
We first try to get the ExoContainer that has been stored into the ThreadLocal
 if the value is of type PortalContainer, we return it otherwise we get the
 portal container corresponding the given servlet context 
 | 
static String | 
getCurrentPortalContainerName()
Returns the name of the current portal container that has been stored into the ThreadLocal. 
 | 
static String | 
getCurrentRealmName()
Returns the name of the current realm corresponding to the portal container
 that has been stored into the ThreadLocal. 
 | 
static String | 
getCurrentRestContextName()
Returns the name of the current rest context corresponding to the portal container
 that has been stored into the ThreadLocal. 
 | 
static Object | 
getCurrentSetting(String settingName)
Returns the current value of the setting corresponding to the portal container
 that has been stored into the ThreadLocal. 
 | 
static PortalContainer | 
getInstance()  | 
static PortalContainer | 
getInstance(javax.servlet.ServletContext context)
Gives the first portal container instance related to the given ServletContext 
 | 
static PortalContainer | 
getInstanceIfPresent()  | 
List<org.exoplatform.container.SessionContainer> | 
getLiveSessions()  | 
String | 
getName()  | 
ClassLoader | 
getPortalClassLoader()  | 
org.exoplatform.container.xml.PortalContainerInfo | 
getPortalContainerInfo()  | 
javax.servlet.ServletContext | 
getPortalContext()  | 
String | 
getRealmName()
Returns the name of the realm corresponding to the current portal container 
 | 
static String | 
getRealmName(String portalContainerName)
Returns the name of the realm corresponding to the given portal container name 
 | 
String | 
getRestContextName()
Returns the name of the rest context corresponding to the current portal container 
 | 
static String | 
getRestContextName(String portalContainerName)
Returns the name of the rest context corresponding to the given portal container name 
 | 
org.exoplatform.container.SessionManager | 
getSessionManager()  | 
Object | 
getSetting(String settingName)
Returns the value of the setting corresponding to the current portal container 
 | 
static Object | 
getSetting(String portalContainerName,
          String settingName)
Returns the value of the setting corresponding to the given portal container name
 and the given setting name 
 | 
ClassLoader | 
getWebAppClassLoader(javax.servlet.ServletContext context)
This gives the merged  
ClassLoader between the PortalContainerClassLoader and the
 ClassLoader of the web application. | 
static boolean | 
isPortalContainerName(String name)  | 
static boolean | 
isPortalContainerNameDisabled(String name)  | 
static boolean | 
isScopeValid(PortalContainer container,
            javax.servlet.ServletContext context)
Indicates if the given servlet context is a dependency of the given portal container 
 | 
boolean | 
isStarted()  | 
void | 
registerContext(javax.servlet.ServletContext context)
Register a new servlet context that contains configuration files and potentially resource files
 We assume that this method is called within the initialization context of the related web application 
 | 
void | 
removeSessionContainer(String sessionID)  | 
static void | 
setInstance(PortalContainer instance)  | 
void | 
start()
Start the components of this PicoContainer and all its logical child containers. 
 | 
void | 
stop()
Stop the components of this PicoContainer and all its logical child containers. 
 | 
void | 
unregisterContext(javax.servlet.ServletContext context)
Unregister a servlet context that contains configuration files and potentially resource files 
 | 
addComponentLifecylePlugin, addContainerLifecylePlugin, createComponent, createComponent, destroyContainer, dispose, getConfiguration, getContext, getProfiles, hasProfile, initContainer, start, startContainer, stopContainer, unregisterAllComponentsgetManagementContext, getMBeanServer, getRegisteredComponentNames, getScopingObjectName, registerComponentInstance, unregisterComponentgetComponentAdapterOfType, getComponentAdaptersOfType, getComponentInstance, getComponentInstanceOfType, getComponentInstancesOfType, registerComponent, registerComponentImplementation, registerComponentImplementation, registerComponentImplementation, registerComponentImplementation, registerComponentInstanceaccept, accept, addChildContainer, addComponentToCtx, canBeDisposed, canBeStarted, canBeStopped, getComponentAdapter, getComponentAdapters, getComponentInstances, getParent, makeChildContainer, removeChildContainer, removeComponentFromCtx, unregisterComponentByInstance, verifypublic static String DEFAULT_PORTAL_CONTAINER_NAME
public static String DEFAULT_REST_CONTEXT_NAME
ServletContext of the rest web applicationpublic static String DEFAULT_REALM_NAME
public PortalContainer(RootContainer parent, javax.servlet.ServletContext portalContext)
public ClassLoader getWebAppClassLoader(javax.servlet.ServletContext context)
ClassLoader between the PortalContainerClassLoader and the
 ClassLoader of the web application.context - the ServletContext of the web applicationClassLoader between the PortalContainerClassLoader and
 the ClassLoader of the web application that allows us to override resources contained
 into the ClassLoader of the web applicationpublic ClassLoader getPortalClassLoader()
ClassLoader of the portal container after merging all the 
 ClassLoader of all ServletContext that have been registeredpublic javax.servlet.ServletContext getPortalContext()
ServletContext of the portal container after merging all the 
 ServletContext that have been registeredpublic void registerContext(javax.servlet.ServletContext context)
context - the ServletContext of the web application to registerpublic void unregisterContext(javax.servlet.ServletContext context)
context - the ServletContext of the web application to unregisterpublic String getName()
public String getConfigurationXML()
public org.exoplatform.container.SessionContainer createSessionContainer(String id, String owner)
createSessionContainer in interface org.exoplatform.container.SessionManagerContainerid - the session container identifierowner - the owner namepublic void removeSessionContainer(String sessionID)
removeSessionContainer in interface org.exoplatform.container.SessionManagerContainersessionID - the identifier of session to removepublic List<org.exoplatform.container.SessionContainer> getLiveSessions()
getLiveSessions in interface org.exoplatform.container.SessionManagerContainerpublic org.exoplatform.container.SessionManager getSessionManager()
getSessionManager in interface org.exoplatform.container.SessionManagerContainerpublic org.exoplatform.container.xml.PortalContainerInfo getPortalContainerInfo()
public static PortalContainer getInstance()
PortalContainer that has been stored into the related
 ThreadLocal. If no value has been set the default portal container will be returnedpublic static PortalContainer getInstanceIfPresent()
ExoContainer that has been stored into the
 ThreadLocal of ExoContainerContext. If no PortalContainer has been set, 
 it will return nullpublic static boolean isPortalContainerName(String name)
name - the portal container namePortalContainerConfig.isPortalContainerName(String)public static boolean isPortalContainerNameDisabled(String name)
name - the portal container namePortalContainerConfig.isPortalContainerNameDisabled(String)public static void addInitTask(javax.servlet.ServletContext context,
               RootContainer.PortalContainerInitTask task)
context - the context from which we extract the context nametask - the task to executepublic static void addInitTask(javax.servlet.ServletContext context,
               RootContainer.PortalContainerInitTask task,
               String portalContainerName)
null other it will execute the task only of this
 portal container if the ServletContext is on of its dependenciescontext - the context from which we extract the context nametask - the task to executeportalContainerName - the name of the portal container for which we want to execute the taskpublic static PortalContainer getInstance(javax.servlet.ServletContext context)
context - the context from which we extract the context namepublic static PortalContainer getCurrentInstance(javax.servlet.ServletContext context)
context - the context from which we extract the portal container namepublic static String getCurrentPortalContainerName()
public static String getCurrentRestContextName()
public static String getRestContextName(String portalContainerName)
portalContainerName - the name of the portal container for which we want the
 name of the rest ServletContextpublic String getRestContextName()
public static String getCurrentRealmName()
public static String getRealmName(String portalContainerName)
portalContainerName - the name of the portal container for which we want the
 name of the realmpublic String getRealmName()
public static Object getCurrentSetting(String settingName)
null will be
 returnedsettingName - the name of the setting wantedpublic static Object getSetting(String portalContainerName, String settingName)
portalContainerName - the name of the portal container for which we want the
 name of the value of the settingsettingName - the name of the setting wantedpublic Object getSetting(String settingName)
settingName - the name of the setting wantedpublic static boolean isScopeValid(PortalContainer container, javax.servlet.ServletContext context)
container - the portal containercontext - the ServletContexttrue if the dependencies matches, false otherwise;public boolean isStarted()
public void start()
org.exoplatform.container.ConcurrentPicoContainerStartable will be started.start in interface org.picocontainer.Startablestart in class ExoContainerConcurrentPicoContainer.makeChildContainer(), 
ConcurrentPicoContainer.addChildContainer(PicoContainer), 
ConcurrentPicoContainer.removeChildContainer(PicoContainer)public void stop()
org.exoplatform.container.ConcurrentPicoContainerStartable will be stopped.stop in interface org.picocontainer.Startablestop in class ExoContainerConcurrentPicoContainer.makeChildContainer(), 
ConcurrentPicoContainer.addChildContainer(PicoContainer), 
ConcurrentPicoContainer.removeChildContainer(PicoContainer)public static void setInstance(PortalContainer instance)
Copyright © 2003-2017 eXo Platform SAS. All Rights Reserved.