com.pmease.quickbuild.plugin.report.engine.extensionpoint
Class ExecutionContext

java.lang.Object
  extended by com.pmease.quickbuild.plugin.report.engine.extensionpoint.ExecutionContext
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
GeneratorContext, ItemContext, MigrationContext, RendererContext, SessionData

public class ExecutionContext
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Constructor Summary
ExecutionContext()
          Default constructor.
ExecutionContext(ExecutionContext executionContext)
           
ExecutionContext(java.util.Map<java.lang.String,java.lang.Object> map)
          Initializes a new execution context with the contents of another map.
 
Method Summary
 void clear()
           
 void clearDirtyFlag()
          Clears the dirty flag.
 boolean containsKey(java.lang.String key)
          Indicates whether or not a key is represented in this context.
 boolean containsValue(java.lang.Object value)
          Indicates whether or not a value is represented in this context.
 java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
          Returns the entry set containing the contents of this context.
 boolean equals(java.lang.Object obj)
           
 java.lang.Object get(java.lang.String key)
          Getter for the value represented by the provided key.
 java.lang.Object get(java.lang.String key, java.lang.Object defaultValue)
           
 java.util.Map<java.lang.String,java.lang.Object> getContextMap()
           
 java.lang.Object getCurrentBean()
           
 int hashCode()
           
 boolean isDirty()
          Indicates if context has been changed with a "put" operation since the dirty flag was last cleared.
 boolean isEmpty()
          Indicates whether or not the context is empty.
 void put(java.lang.String key, java.lang.Object value)
          Add an Object value to the context (must be Serializable).
<T> T
readAndValidate(java.lang.String key, java.lang.Class<T> type)
          Utility method that attempts to take a value represented by a given key and validate it as a member of the specified type.
 java.lang.Object remove(java.lang.String key)
          Removes the mapping for a key from this context if it is present.
 void setContextMap(java.util.Map<java.lang.String,java.lang.Object> map)
           
 void setCurrentBean(java.lang.Object obj)
           
 int size()
          Returns number of entries in the context
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExecutionContext

public ExecutionContext()
Default constructor. Initializes a new execution context with an empty internal map.


ExecutionContext

public ExecutionContext(java.util.Map<java.lang.String,java.lang.Object> map)
Initializes a new execution context with the contents of another map.

Parameters:
map - Initial contents of context.

ExecutionContext

public ExecutionContext(ExecutionContext executionContext)
Parameters:
executionContext -
Method Detail

put

public void put(java.lang.String key,
                java.lang.Object value)
Add an Object value to the context (must be Serializable). Putting null value for a given key removes the key.

Parameters:
key - Key to add to context
value - Value to associate with key

isDirty

public boolean isDirty()
Indicates if context has been changed with a "put" operation since the dirty flag was last cleared. Note that the last time the flag was cleared might correspond to creation of the context.

Returns:
True if "put" operation has occurred since flag was last cleared

get

public java.lang.Object get(java.lang.String key)
Getter for the value represented by the provided key.

Parameters:
key - The key to get a value for
Returns:
The value represented by the given key

get

public java.lang.Object get(java.lang.String key,
                            java.lang.Object defaultValue)

readAndValidate

public <T> T readAndValidate(java.lang.String key,
                             java.lang.Class<T> type)
Utility method that attempts to take a value represented by a given key and validate it as a member of the specified type.

Parameters:
key - The key to validate a value for
type - Class against which value should be validated
Returns:
Value typed to the specified Class

isEmpty

public boolean isEmpty()
Indicates whether or not the context is empty.

Returns:
True if the context has no entries, false otherwise.
See Also:
Map.isEmpty()

clearDirtyFlag

public void clearDirtyFlag()
Clears the dirty flag.


entrySet

public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
Returns the entry set containing the contents of this context.

Returns:
A set representing the contents of the context
See Also:
Map.entrySet()

containsKey

public boolean containsKey(java.lang.String key)
Indicates whether or not a key is represented in this context.

Parameters:
key - Key to check existence for
Returns:
True if key is represented in context, false otherwise
See Also:
Map.containsKey(Object)

remove

public java.lang.Object remove(java.lang.String key)
Removes the mapping for a key from this context if it is present.

See Also:
Map.remove(Object)

containsValue

public boolean containsValue(java.lang.Object value)
Indicates whether or not a value is represented in this context.

Parameters:
value - Value to check existence for
Returns:
True if value is represented in context, false otherwise
See Also:
Map.containsValue(Object)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getCurrentBean

public java.lang.Object getCurrentBean()

setCurrentBean

public void setCurrentBean(java.lang.Object obj)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

size

public int size()
Returns number of entries in the context

Returns:
Number of entries in the context
See Also:
Map.size()

clear

public void clear()

getContextMap

public java.util.Map<java.lang.String,java.lang.Object> getContextMap()

setContextMap

public void setContextMap(java.util.Map<java.lang.String,java.lang.Object> map)


Copyright © 2005-2010 PMEase Inc. All Rights Reserved.