Weaver 3.1.0a1-D1

com.oldlight.weaver.context
Interface WeaverExecutionContext

All Known Implementing Classes:
WeaverExecutionContextImpl

public interface WeaverExecutionContext

The WeaverExecutionContext interface collects the various "context" classes that represent the current state of execution of a Weaver application. This is the primary interface via which W-Bean code interacts with Weaver.

Author:
Paul Harvey

Method Summary
 Object findAttribute(String name)
          Finds a scoped attribute.
 WeaverApplicationContext getApplicationContext()
          Gets the application context.
 Object getAttribute(String name, WeaverAttributeScope scope)
          Gets a named attribute from a named scope.
 WeaverBeanContext getBeanContext()
          Gets the current bean context.
 WeaverLocalContext getLocalContext()
          Gets the current local context.
 WeaverRequestContext getRequestContext()
          Gets the current request context.
 WeaverResponseContext getResponseContext()
          Gets the current response context.
 WeaverSecurityContext getSecurityContext()
          Get the security context.
 WeaverServletContext getServletContext()
          Gets the servlet context.
 WeaverSessionContext getSessionContext()
          Gets the session context.
 void removeAttribute(String name)
          Removes a named attribute from all scopes.
 void removeAttribute(String name, WeaverAttributeScope scope)
          Removes a named attribute from a named scope.
 void setAttribute(String name, WeaverAttributeScope scope, Object value)
          Sets the value of a named attribute in a named scope.
 

Method Detail

getSecurityContext

public WeaverSecurityContext getSecurityContext()
Get the security context.

Returns:
The security context.

findAttribute

public Object findAttribute(String name)
Finds a scoped attribute. The available scopes are searched for the named attribute.

Parameters:
name - Name of the attribute to retrieve.
Returns:
Value of the named attribute, or null if not found.

getAttribute

public Object getAttribute(String name,
                           WeaverAttributeScope scope)
Gets a named attribute from a named scope.

Parameters:
name - Name of the attribute to retrieve.
scope - Scope to retrieve the attribute from (taken from the WeaverAttributeScope values)
Returns:
The value of the name attribute from the named scope, or null if not found.

setAttribute

public void setAttribute(String name,
                         WeaverAttributeScope scope,
                         Object value)
Sets the value of a named attribute in a named scope.

Parameters:
name - Name of the attribute to set.
scope - Name of scope to set the attribute in (taken from the WeaverAttributeScope values).
value - Value to set the attribute to.

removeAttribute

public void removeAttribute(String name,
                            WeaverAttributeScope scope)
Removes a named attribute from a named scope.

Parameters:
name - The name of the attribute to remove.
scope - The scope to remove the attribute from (taken from the WeaverAttributeScope values).

removeAttribute

public void removeAttribute(String name)
Removes a named attribute from all scopes.

Parameters:
name - The name of the attribute to remove.

getBeanContext

public WeaverBeanContext getBeanContext()
Gets the current bean context.

Returns:
The bean context.

getLocalContext

public WeaverLocalContext getLocalContext()
Gets the current local context.

Returns:
The local context.

getRequestContext

public WeaverRequestContext getRequestContext()
Gets the current request context.

Returns:
The request context.

getResponseContext

public WeaverResponseContext getResponseContext()
Gets the current response context.

Returns:
The response context.

getSessionContext

public WeaverSessionContext getSessionContext()
Gets the session context.

Returns:
The session context.

getServletContext

public WeaverServletContext getServletContext()
Gets the servlet context.

Returns:
The servlet context.

getApplicationContext

public WeaverApplicationContext getApplicationContext()
Gets the application context.

Returns:
The application context.

Copyright ©Paul Harvey