org.vraptor.scope
Class DefaultApplicationContext

java.lang.Object
  extended by org.vraptor.scope.DefaultApplicationContext
All Implemented Interfaces:
ApplicationContext, Context

public class DefaultApplicationContext
extends Object
implements ApplicationContext

The basic implementation of the application context.

Author:
Guilherme Silveira

Constructor Summary
DefaultApplicationContext(javax.servlet.ServletContext application)
           
 
Method Summary
 Object getAttribute(String name)
          Retrieves an attribute
 String getRealPath(String path)
           
 Set getResourcePaths(String directory)
           
 boolean hasAttribute(String name)
          Whether it contains an attribute
 Object removeAttribute(String name)
          Removes an attribute
 void setAttribute(String name, Object value)
          Sets an attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultApplicationContext

public DefaultApplicationContext(javax.servlet.ServletContext application)
Method Detail

hasAttribute

public boolean hasAttribute(String name)
Description copied from interface: Context
Whether it contains an attribute

Specified by:
hasAttribute in interface Context
Parameters:
name - name
Returns:
true if contained

setAttribute

public void setAttribute(String name,
                         Object value)
Description copied from interface: Context
Sets an attribute. Optional operation.

Specified by:
setAttribute in interface Context
Parameters:
name - name
value - value

getAttribute

public Object getAttribute(String name)
Description copied from interface: Context
Retrieves an attribute

Specified by:
getAttribute in interface Context
Parameters:
name - name
Returns:
value or null if not found

removeAttribute

public Object removeAttribute(String name)
Description copied from interface: Context
Removes an attribute

Specified by:
removeAttribute in interface Context
Parameters:
name - name
Returns:
value

getRealPath

public String getRealPath(String path)
Specified by:
getRealPath in interface ApplicationContext

getResourcePaths

public Set getResourcePaths(String directory)
Specified by:
getResourcePaths in interface ApplicationContext


Copyright © 2004-2008 VRaptor. All Rights Reserved.