org.exoplatform.container
Class ExoContainerContext
java.lang.Object
org.exoplatform.container.ExoContainerContext
- All Implemented Interfaces:
- Serializable
public class ExoContainerContext
- extends Object
- implements Serializable
The ExoContainerContext helper to invoke a service of a container from any location.
- Since:
- Jan 11, 2005
- Version:
- $Id: ExoContainerContext.java 6677 2006-07-03 10:49:59Z geaz $
- Author:
- Tuan Nguyen (tuan08@users.sourceforge.net)
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExoContainerContext
public ExoContainerContext(ExoContainer container)
ExoContainerContext
public ExoContainerContext(ExoContainer container,
String name)
getContainer
public ExoContainer getContainer()
getPortalContainerName
public String getPortalContainerName()
- Returns:
- if the embedded container is a
PortalContainer, it will return the name the
portal container otherwise it will return null
getRestContextName
public String getRestContextName()
- Returns:
- if the embedded container is a
PortalContainer, it will return the name
of the rest context related to the portal container otherwise it will return the default name
getRealmName
public String getRealmName()
- Returns:
- if the embedded container is a
PortalContainer, it will return the name
of the realm related to the portal container otherwise it will return the default name
getSetting
public Object getSetting(String settingName)
- Returns:
- if the embedded container is a
PortalContainer, it will return the value
of the setting related to the portal container otherwise it will return null
getName
public String getName()
- Returns:
- returns the container name
setName
public void setName(String name)
- sets the name of the container name
- Parameters:
name - the container name
getTopContainer
public static ExoContainer getTopContainer()
- Returns:
- returns the top container that will be the root container
in portal mode and the standalone container in standalone mode
getCurrentContainer
public static ExoContainer getCurrentContainer()
- Returns:
- returns the current container
getCurrentContainerIfPresent
public static ExoContainer getCurrentContainerIfPresent()
- Returns:
- returns the current container if present, otherwise it returns the top container
setCurrentContainer
public static void setCurrentContainer(ExoContainer instance)
- Sets the current container
- Parameters:
instance - the current container
getContainerByName
public static ExoContainer getContainerByName(String name)
- Parameters:
name - the container name
- Returns:
- the ExoContainer instance
getAttributeNames
public Set<String> getAttributeNames()
- Returns:
- returns the list of the name of all the attributes available in the context
getAttribute
public Object getAttribute(String name)
- Returns:
- returns the value of the attribute
setAttribute
public void setAttribute(String name,
Object value)
- Parameters:
name - the name of the attribute to setvalue - the value of the attribute to set
Copyright © 2013 eXo Platform SAS. All Rights Reserved.