org.jboss.weld.servlet
Class ApplicationBeanStore

java.lang.Object
  extended by org.jboss.weld.context.beanstore.AbstractAttributeBackedBeanStore
      extended by org.jboss.weld.servlet.ApplicationBeanStore
All Implemented Interfaces:
org.jboss.weld.context.api.BeanStore

public class ApplicationBeanStore
extends AbstractAttributeBackedBeanStore

A BeanStore that uses a servlet context as backing storage

Author:
Nicklas Karlsson
See Also:
AbstractApplicationContext

Constructor Summary
ApplicationBeanStore(javax.servlet.ServletContext context)
          Constructor
 
Method Summary
 void clear()
          Clears the bean store
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 attribute names present in the underlying storage
 java.util.Collection<java.lang.String> getContextualIds()
          Returns the beans present in the store
protected  NamingScheme getNamingScheme()
          Gets an naming scheme for handling keys in a bean store
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.weld.context.beanstore.AbstractAttributeBackedBeanStore
get, put, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApplicationBeanStore

public ApplicationBeanStore(javax.servlet.ServletContext context)
Constructor

Parameters:
context - The servlet context instance
Method Detail

getAttribute

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

Specified by:
getAttribute in class AbstractAttributeBackedBeanStore
Parameters:
key - The key of the attribute
Returns:
The data
See Also:
org.jboss.weld.context.beanstore.AbstractAttributeBackedBeanStore#getAttribute()

getAttributeNames

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

Specified by:
getAttributeNames in class AbstractAttributeBackedBeanStore
Returns:
The attribute names
See Also:
AbstractAttributeBackedBeanStore.getAttributeNames()

removeAttribute

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

Specified by:
removeAttribute in class AbstractAttributeBackedBeanStore
Parameters:
key - The attribute to remove
See Also:
org.jboss.weld.context.beanstore.AbstractAttributeBackedBeanStore#removeAttributes()

setAttribute

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

Specified by:
setAttribute in class AbstractAttributeBackedBeanStore
Parameters:
key - The key
instance - The instance
See Also:
org.jboss.weld.context.beanstore.AbstractAttributeBackedBeanStore#setAttribute()

getNamingScheme

protected NamingScheme getNamingScheme()
Description copied from class: AbstractAttributeBackedBeanStore
Gets an naming scheme for handling keys in a bean store

Specified by:
getNamingScheme in class AbstractAttributeBackedBeanStore
Returns:
The naming scheme

getContextualIds

public java.util.Collection<java.lang.String> getContextualIds()
Description copied from class: AbstractAttributeBackedBeanStore
Returns the beans present in the store

Specified by:
getContextualIds in interface org.jboss.weld.context.api.BeanStore
Overrides:
getContextualIds in class AbstractAttributeBackedBeanStore
Returns:
The beans

clear

public void clear()
Description copied from class: AbstractAttributeBackedBeanStore
Clears the bean store

Specified by:
clear in interface org.jboss.weld.context.api.BeanStore
Overrides:
clear in class AbstractAttributeBackedBeanStore


Copyright © 2008-2009 Seam Framework. All Rights Reserved.