planetj.dataengine
Interface IContext

All Known Subinterfaces:
IApplicationContext, IOperationContext
All Known Implementing Classes:
AbstractContext, ApplicationSQLContext, HTMLOperationContext, JavaOperationContext, URLOperationContext

public interface IContext


Method Summary
 java.lang.Object clone()
           
 java.util.Iterator getDisplayParameters()
          Iterates over the parameters in this context which should be displayed to the user.
 ExecutingContext getExecutingContext()
           
 java.lang.String getOriginalCode()
          Gets the original String of code for this context
 IParameter getParameter(int index)
          Gets a parameter, based on its index
 IParameter getParameter(java.lang.String uniqueId)
          Gets a parameter, based on its unique ID
 int getParameterCount()
          Gets the number of parameters present in this context
 int getParameterCount(java.lang.Class paramClass)
          Gets the number of parameters present in this context which are of the specified class (or are subclasses of the specified class)
 java.util.List getParameters()
          Gets a List of this context's IParameter objects.
 java.util.Iterator getParameters(java.lang.Class paramType)
          Iterates over the parameters in this context which are of the specified Java type, or are subclasses of the specified Java type.
 ValidationExceptionCollection getParameterValidationExceptions()
          Be careful when you call this method because it is derived and spins through all the fields.
 int getParameterValuesType()
          Get the type of value a parameter holds.
 PropertyGroup getPropertyGroup(java.lang.String groupName)
          Gets the first PropertyGroup with the given property group name.
 PropertyGroupList getPropertyGroups()
          Get all the property groups associated with this context.
 java.util.List getPropertyGroups(java.lang.String groupName)
          Get this context's property groups with the given group name.
 boolean isContainsDisplayParameters()
          Tests if there are any parameters which should be displayed
 boolean isParameterized()
          Check if this context code is parameterized.
 boolean isSecondaryContext()
          Tests if this context is a secondary context.
 void parameterAltered()
          Callback method so that parameters can inform their context when they are alerted
 void setExecutingContext(ExecutingContext excontext)
           
 void setParameterValues(Row row)
           
 void setParameterValues(java.lang.String parameterId, java.lang.Object value)
          Sets the value of parameters in this context
 

Method Detail

clone

public java.lang.Object clone()

getDisplayParameters

public java.util.Iterator getDisplayParameters()
Iterates over the parameters in this context which should be displayed to the user. The Iterator cannot not be altered.


getExecutingContext

public ExecutingContext getExecutingContext()

getOriginalCode

public java.lang.String getOriginalCode()
Gets the original String of code for this context


getParameter

public IParameter getParameter(int index)
Gets a parameter, based on its index


getParameter

public IParameter getParameter(java.lang.String uniqueId)
Gets a parameter, based on its unique ID


getParameterCount

public int getParameterCount()
Gets the number of parameters present in this context


getParameterCount

public int getParameterCount(java.lang.Class paramClass)
Gets the number of parameters present in this context which are of the specified class (or are subclasses of the specified class)


getParameterValuesType

public int getParameterValuesType()
Get the type of value a parameter holds.


getParameters

public java.util.List getParameters()
Gets a List of this context's IParameter objects.


getParameters

public java.util.Iterator getParameters(java.lang.Class paramType)
Iterates over the parameters in this context which are of the specified Java type, or are subclasses of the specified Java type.


getParameterValidationExceptions

public ValidationExceptionCollection getParameterValidationExceptions()
Be careful when you call this method because it is derived and spins through all the fields. This will return a collection of al the Exceptions of each field.


getPropertyGroup

public PropertyGroup getPropertyGroup(java.lang.String groupName)
Gets the first PropertyGroup with the given property group name.


getPropertyGroups

public PropertyGroupList getPropertyGroups()
Get all the property groups associated with this context.


getPropertyGroups

public java.util.List getPropertyGroups(java.lang.String groupName)
Get this context's property groups with the given group name.


isContainsDisplayParameters

public boolean isContainsDisplayParameters()
Tests if there are any parameters which should be displayed


isParameterized

public boolean isParameterized()
Check if this context code is parameterized.


isSecondaryContext

public boolean isSecondaryContext()
Tests if this context is a secondary context. A secondary context can only get its parameter values from another context in the same operation


parameterAltered

public void parameterAltered()
                      throws DataEngineException
Callback method so that parameters can inform their context when they are alerted

Throws:
DataEngineException

setExecutingContext

public void setExecutingContext(ExecutingContext excontext)

setParameterValues

public void setParameterValues(Row row)
                        throws CMException
Throws:
CMException

setParameterValues

public void setParameterValues(java.lang.String parameterId,
                               java.lang.Object value)
                        throws CMException
Sets the value of parameters in this context

Parameters:
parameterId - A String which identifies the parameters whose values will be set. This String can either be a context specific id, a name, or by a named index. The context specific id looks like ¤3¿ or ¤0¿ The parameter name is the string corresponding to the parameter's key or column (e.g. BALANCE or VAL) A parameter name may correspond to multiple parameters, in which case all of these parameters will have their values set by this method The named index is the string "_parm" with the parameter's index appended on the end (e.g. _parm0 or _parm2)
value - The value to set parameters to
Throws:
CMException