org.milyn.container
Class MockApplicationContext

java.lang.Object
  extended by org.milyn.container.MockApplicationContext
All Implemented Interfaces:
ApplicationContext, BoundAttributeStore

public class MockApplicationContext
extends Object
implements ApplicationContext

Author:
tfennelly

Field Summary
 MockContainerResourceLocator containerResourceLocator
           
 ProfileStore profileStore
           
 
Constructor Summary
MockApplicationContext()
           
 
Method Summary
 Object getAttribute(Object key)
          Returns the object bound with the specified name in this BoundAttributeStore implementation, or null if no object is bound under the name.
 Map getAttributes()
          Returns the Map of attributes bound in this BoundAttributeStore
 ProfileStore getProfileStore()
          Get the ProfileStore in use within this Context.
 ContainerResourceLocator getResourceLocator()
          Get the container resource locator for the context.
 SmooksResourceConfigurationStore getStore()
          Get the Store for from the container application context.
 void removeAttribute(Object key)
          Removes the object bound with the specified name from this BoundAttributeStore implementation.
 void setAttribute(Object key, Object value)
          Binds an object to this BoundAttributeStore implementation, using the name specified.
 void setResourceLocator(ContainerResourceLocator resourceLocator)
          Set the resource locator for this Smooks application context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

containerResourceLocator

public MockContainerResourceLocator containerResourceLocator

profileStore

public ProfileStore profileStore
Constructor Detail

MockApplicationContext

public MockApplicationContext()
Method Detail

getResourceLocator

public ContainerResourceLocator getResourceLocator()
Description copied from interface: ApplicationContext
Get the container resource locator for the context.

Specified by:
getResourceLocator in interface ApplicationContext
Returns:
ContainerResourceLocator for the context.

setAttribute

public void setAttribute(Object key,
                         Object value)
Description copied from interface: BoundAttributeStore
Binds an object to this BoundAttributeStore implementation, using the name specified. If an object of the same name is already bound, the object is replaced.

Specified by:
setAttribute in interface BoundAttributeStore
Parameters:
key - The key against which the object is bound; cannot be null.
value - The object to be bound; cannot be null.

getAttribute

public Object getAttribute(Object key)
Description copied from interface: BoundAttributeStore
Returns the object bound with the specified name in this BoundAttributeStore implementation, or null if no object is bound under the name.

Specified by:
getAttribute in interface BoundAttributeStore
Parameters:
key - The key against which the object is bound; cannot be null.
Returns:
The object bound with the specified name in this BoundAttributeStore implementation, or null if no object is bound under the name.

removeAttribute

public void removeAttribute(Object key)
Description copied from interface: BoundAttributeStore
Removes the object bound with the specified name from this BoundAttributeStore implementation. If the BoundAttributeStore implementation does not have an object bound with the specified name, this method does nothing.

Specified by:
removeAttribute in interface BoundAttributeStore
Parameters:
key - The key against which the object is bound; cannot be null.

getStore

public SmooksResourceConfigurationStore getStore()
Description copied from interface: ApplicationContext
Get the Store for from the container application context.

Specified by:
getStore in interface ApplicationContext
Returns:
SmooksResourceConfigurationStore instance.

getProfileStore

public ProfileStore getProfileStore()
Description copied from interface: ApplicationContext
Get the ProfileStore in use within this Context.

Specified by:
getProfileStore in interface ApplicationContext
Returns:
The ProfileStore.

setResourceLocator

public void setResourceLocator(ContainerResourceLocator resourceLocator)
Description copied from interface: ApplicationContext
Set the resource locator for this Smooks application context.

Specified by:
setResourceLocator in interface ApplicationContext
Parameters:
resourceLocator - The Resource locator.

getAttributes

public Map getAttributes()
Description copied from interface: BoundAttributeStore
Returns the Map of attributes bound in this BoundAttributeStore

Specified by:
getAttributes in interface BoundAttributeStore
Returns:
Map of all objects bound in this BoundAttributeStore


Copyright © 2009. All Rights Reserved.