public final class ExoContainerContext extends Object implements Serializable
| Constructor and Description |
|---|
ExoContainerContext(ExoContainer container) |
ExoContainerContext(ExoContainer container,
String name) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAttribute(String name) |
Set<String> |
getAttributeNames() |
ExoContainer |
getContainer() |
static ExoContainer |
getContainerByName(String name) |
static ExoContainer |
getCurrentContainer() |
static ExoContainer |
getCurrentContainerIfPresent() |
String |
getName() |
String |
getPortalContainerName() |
String |
getRealmName() |
String |
getRestContextName() |
static <T> T |
getService(Class<T> clazz)
Gets a service from current container.
|
static <T> T |
getService(Class<T> clazz,
String containerName)
Gets the service.
|
Object |
getSetting(String settingName) |
static ExoContainer |
getTopContainer() |
void |
setAttribute(String name,
Object value) |
static void |
setCurrentContainer(ExoContainer instance)
Sets the current container
|
void |
setName(String name)
sets the name of the container name
|
public ExoContainerContext(ExoContainer container)
public ExoContainerContext(ExoContainer container, String name)
public ExoContainer getContainer()
public String getPortalContainerName()
PortalContainer, it will return the name the
portal container otherwise it will return nullpublic String getRestContextName()
PortalContainer, it will return the name
of the rest context related to the portal container otherwise it will return the default namepublic String getRealmName()
PortalContainer, it will return the name
of the realm related to the portal container otherwise it will return the default namepublic Object getSetting(String settingName)
PortalContainer, it will return the value
of the setting related to the portal container otherwise it will return nullpublic String getName()
public void setName(String name)
name - the container namepublic static ExoContainer getTopContainer()
public static ExoContainer getCurrentContainer()
public static ExoContainer getCurrentContainerIfPresent()
public static void setCurrentContainer(ExoContainer instance)
instance - the current containerpublic static ExoContainer getContainerByName(String name)
name - the container namepublic Set<String> getAttributeNames()
public void setAttribute(String name, Object value)
name - the name of the attribute to setvalue - the value of the attribute to setpublic static <T> T getService(Class<T> clazz)
clazz - the clazzCopyright © 2020 eXo Platform SAS. All Rights Reserved.