info.magnolia.module.workflow
Class WorkItemContext

java.lang.Object
  extended by info.magnolia.context.AbstractContext
      extended by info.magnolia.context.ContextDecorator
          extended by info.magnolia.module.workflow.WorkItemContext
All Implemented Interfaces:
Serializable, Map, org.apache.commons.chain.Context

public class WorkItemContext
extends ContextDecorator

This context wrapps a workitem and delegates the most of the methods to the inner context.

Version:
$Revision: 41137 $ ($Author: gjoseph $)
Author:
Philipp Bracher
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class info.magnolia.context.ContextDecorator
ctx
 
Fields inherited from class info.magnolia.context.AbstractContext
locale
 
Fields inherited from interface info.magnolia.context.Context
APPLICATION_SCOPE, ATTRIBUTE_COMMENT, ATTRIBUTE_EXCEPTION, ATTRIBUTE_MESSAGE, ATTRIBUTE_PATH, ATTRIBUTE_RECURSIVE, ATTRIBUTE_REPOSITORY, ATTRIBUTE_UUID, ATTRIBUTE_VERSION, ATTRIBUTE_VERSION_MAP, LOCAL_SCOPE, SESSION_SCOPE
 
Constructor Summary
WorkItemContext(Context ctx, openwfe.org.engine.workitem.WorkItem workItem)
           
 
Method Summary
 Object getAttribute(String name, int scope)
          Use work item if request scope.
 Map<String,Object> getAttributes(int scope)
          Use work item if request scope.
 openwfe.org.engine.workitem.WorkItem getWorkItem()
           
 void removeAttribute(String name, int scope)
          Use work item if request scope.
 void setAttribute(String name, Object value, int scope)
          Use work item if request scope.
 void setWorkItem(openwfe.org.engine.workitem.WorkItem workItem)
           
 
Methods inherited from class info.magnolia.context.ContextDecorator
getAccessManager, getHierarchyManager, getQueryManager, getUser, getWrappedContext, release
 
Methods inherited from class info.magnolia.context.AbstractContext
clear, containsKey, containsValue, entrySet, get, getAccessManager, getAttribute, getAttributes, getAttributeStrategy, getHierarchyManager, getLocale, getMessages, getMessages, getQueryManager, getRepositoryStrategy, isEmpty, keySet, put, putAll, remove, setAttributeStrategy, setLocale, setRepositoryStrategy, size, values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

WorkItemContext

public WorkItemContext(Context ctx,
                       openwfe.org.engine.workitem.WorkItem workItem)
Method Detail

getAttribute

public Object getAttribute(String name,
                           int scope)
Use work item if request scope.

Overrides:
getAttribute in class ContextDecorator
Parameters:
name - to which value is associated to
scope - the scope (request, session, application)
Returns:
attribute value

getAttributes

public Map<String,Object> getAttributes(int scope)
Use work item if request scope.

Overrides:
getAttributes in class ContextDecorator
Returns:
the map

setAttribute

public void setAttribute(String name,
                         Object value,
                         int scope)
Use work item if request scope.

Overrides:
setAttribute in class ContextDecorator
Parameters:
name - is used as a key
scope - , highest level of scope from which this attribute is visible

removeAttribute

public void removeAttribute(String name,
                            int scope)
Use work item if request scope.

Overrides:
removeAttribute in class ContextDecorator

getWorkItem

public openwfe.org.engine.workitem.WorkItem getWorkItem()

setWorkItem

public void setWorkItem(openwfe.org.engine.workitem.WorkItem workItem)


Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.