org.isam.exehda.services
Class ContextManager.Context

java.lang.Object
  |
  +--org.isam.exehda.services.ContextManager.Context
Enclosing class:
ContextManager

public static class ContextManager.Context
extends java.lang.Object

Represents a context element.


Constructor Summary
(package private) ContextManager.Context(java.lang.String name, ApplicationId scope, java.lang.String def, java.lang.String[] states)
          Creates a new Context instance.
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns whether this object and the given object describe the same context element.
 java.lang.String getDefinition()
          Returns a String containing the XML definition used to create this context.
 java.lang.String getName()
          Returns the name of this context element.
 ApplicationId getScope()
          Returns the scope (application) where this context element was defined.
 ContextManager.ContextState getStateInstance(java.lang.String state)
          Returns a ContextState object that described the given abstract state of this context element.
 int hashCode()
          Computes a hash code for this context object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextManager.Context

ContextManager.Context(java.lang.String name,
                       ApplicationId scope,
                       java.lang.String def,
                       java.lang.String[] states)
Creates a new Context instance.

Parameters:
name - the context element's name
scope - the application where is being defined
def - the raw XML definition
states - the allowed stated for this element
Method Detail

getName

public java.lang.String getName()
Returns the name of this context element.

Returns:
a String value

getScope

public ApplicationId getScope()
Returns the scope (application) where this context element was defined. The scope information is necessary to avoid conflicts and inconsistencies when comparing context elements defined by different applications.

Returns:
an ApplicationId value

getDefinition

public java.lang.String getDefinition()
Returns a String containing the XML definition used to create this context.

Returns:
a String value

getStateInstance

public ContextManager.ContextState getStateInstance(java.lang.String state)
Returns a ContextState object that described the given abstract state of this context element.

Parameters:
state - a String value
Returns:
a ContextState value

equals

public boolean equals(java.lang.Object o)
Returns whether this object and the given object describe the same context element.

Overrides:
equals in class java.lang.Object
Parameters:
o - an Object value
Returns:
a boolean value

hashCode

public int hashCode()
Computes a hash code for this context object.

Overrides:
hashCode in class java.lang.Object
Returns:
an int value