org.jboss.webbeans.servlet
Class ApplicationBeanMap

java.lang.Object
  extended by org.jboss.webbeans.contexts.AbstractBeanMapAdaptor
      extended by org.jboss.webbeans.servlet.ApplicationBeanMap
All Implemented Interfaces:
BeanMap

public class ApplicationBeanMap
extends AbstractBeanMapAdaptor

A BeanMap that uses a servlet context as backing map

Author:
Nicklas Karlsson
See Also:
ApplicationContext

Constructor Summary
ApplicationBeanMap(javax.servlet.ServletContext context)
          Constructor
 
Method Summary
protected  java.lang.Object getAttribute(java.lang.String key)
          Gets an attribute from the underlying storage
protected  java.util.Enumeration<java.lang.String> getAttributeNames()
          Gets an enumeration of the beans present in the underlying storage
protected  java.lang.String getKeyPrefix()
          Gets a key prefix that should be prefixed to names
protected  void removeAttribute(java.lang.String key)
          Removes an attribute from the underlying storage
protected  void setAttribute(java.lang.String key, java.lang.Object instance)
          Sets an instance under a key in the underlying storage
 
Methods inherited from class org.jboss.webbeans.contexts.AbstractBeanMapAdaptor
clear, get, getBeanKey, keySet, put, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationBeanMap

public ApplicationBeanMap(javax.servlet.ServletContext context)
Constructor

Parameters:
context - The servlet context instance
Method Detail

getKeyPrefix

protected java.lang.String getKeyPrefix()
Description copied from class: AbstractBeanMapAdaptor
Gets a key prefix that should be prefixed to names

Specified by:
getKeyPrefix in class AbstractBeanMapAdaptor
Returns:
The prefix
See Also:
AbstractBeanMapAdaptor.getKeyPrefix()

getAttribute

protected java.lang.Object getAttribute(java.lang.String key)
Description copied from class: AbstractBeanMapAdaptor
Gets an attribute from the underlying storage

Specified by:
getAttribute in class AbstractBeanMapAdaptor
Parameters:
key - The key of the attribute
Returns:
The data
See Also:
org.jboss.webbeans.contexts.AbstractBeanMapAdaptor#getAttribute()

getAttributeNames

protected java.util.Enumeration<java.lang.String> getAttributeNames()
Description copied from class: AbstractBeanMapAdaptor
Gets an enumeration of the beans present in the underlying storage

Specified by:
getAttributeNames in class AbstractBeanMapAdaptor
Returns:
The current beans
See Also:
AbstractBeanMapAdaptor.getAttributeNames()

removeAttribute

protected void removeAttribute(java.lang.String key)
Description copied from class: AbstractBeanMapAdaptor
Removes an attribute from the underlying storage

Specified by:
removeAttribute in class AbstractBeanMapAdaptor
Parameters:
key - The attribute to remove
See Also:
org.jboss.webbeans.contexts.AbstractBeanMapAdaptor#removeAttributes()

setAttribute

protected void setAttribute(java.lang.String key,
                            java.lang.Object instance)
Description copied from class: AbstractBeanMapAdaptor
Sets an instance under a key in the underlying storage

Specified by:
setAttribute in class AbstractBeanMapAdaptor
Parameters:
key - The key
instance - The instance
See Also:
org.jboss.webbeans.contexts.AbstractBeanMapAdaptor#setAttribute()


Copyright © 2008. All Rights Reserved.