oracle.cle.process
Class Process

java.lang.Object
  |
  +--oracle.cle.process.Process
All Implemented Interfaces:
Child, java.lang.Cloneable, ProcessConstants, java.io.Serializable, State
Direct Known Subclasses:
GenericProcess

public abstract class Process
extends java.lang.Object
implements java.io.Serializable, State, Child, ProcessConstants, java.lang.Cloneable

The abstract superclass of all CLE Processes, DisplayGroups and Service . Anything that is executable in a Service.

Changed the start method to handle the standard process of:
1.Gathering the paramaters
2.Start the statemachine
3.Process the results

See Also:
Serialized Form

Field Summary
protected  TransitionCondition condition
          The TransitionCondition that is curently set to be returned by this State.
protected  boolean DEBUG
          Set this to true to get diagnostic remarks
protected  boolean endState
           
static java.lang.String FAILURE
          Constant for a failure condition - Defect # 1575345
protected  java.lang.String name
          A hopefully unique name given to this process
protected  java.util.Vector processes
          A list containing all of this process' child processes
ie: Services would contain DisplayGroups, DisplayGroups would contain Processes, Processes would contain ??? Anything ???
protected  Service service
          The Service that contains this Process.
protected  StateMachine stateMachine
          A statemachine object
static java.lang.String SUCCESS
          Constant for a success condition - Defect # 1575345
static TransitionCondition TRANSITION_CONDITION_FAILURE
          Constant for success transition condition - Bug 2426904
static TransitionCondition TRANSITION_CONDITION_SUCCESS
          Constant for success transition condition - Bug 2426904
 
Fields inherited from interface oracle.cle.process.ProcessConstants
ALLINFO, BINARYSIZE, CONNECTION_PROVIDER_DTD_NAME, CONNECTION_PROVIDER_VALIDATION_PROPERTY, CONTENTTYPE, CURRENTPAGEID, CURRENTSERVICE, ERRORMESSAGE, GENERICBINARYRESULT, GENERICTEXTRESULT, GETINFO_CHECK_ALL, GETINFO_CHECK_CONTROLLERONLY, GETINFO_CHECK_SERVICEONLY, HTML, HTMLRESULT, JSPRESULT, LOGOFF, NOMESSAGE, PAGEID, PDF, PDFRESULT, PRE_GROUP_DTD_NAME, PRE_GROUP_VALIDATION_PROPERTY, PROCESS_FEEDBACK, RESTART, RESULTTYPE, RULES_DTD_NAME, SERVICE_DESCRIPTOR, SERVICE_DTD_NAME, SERVICE_VALIDATION_PROPERTY, SERVICEINITIALSTATE, SERVICENAME, SESSIONID, SKIP, STACKTRACE, USER, USERROLE, WML, XML, XMLRESULT
 
Constructor Summary
Process()
          Construct this Process Cand create the two default conditions: "success" and "failure".
Process(Service aService)
          Construct this Process
 
Method Summary
 void addCondition(TransitionCondition aTransitionCondition)
          Add a TransitionCondition to the set of possible conditions for this state.
 void addProcess(Child aChild)
          Adds a Process to the "processes" list Vector.
 java.lang.Object clone()
           
 void cloneProcess(Process p)
          This method must be implemented by all Process subclasses which can have different representations like Evaluator.
 void debug(java.lang.String text)
          a simple way to print some debug messages out
 TransitionCondition generateFailureCondition()
          Returns a TransitionCondition with a negative int
 TransitionCondition generateSuccessCondition()
          Returns a TransitionCondition with a positive int or zero
protected  java.lang.String getClassname()
           
 TransitionCondition getCondition(java.lang.String key)
          Returns a TransitionCondition for the specified key
 java.util.Vector getConditions()
          Return a Vector of the possible TransitionConditions that are available for this State.
 java.lang.String getIconName()
          Returns a static String that tells us the location of the icon representing this Process.
 java.lang.String getImageName()
          Returns a static String that tells us the location of the image representing this Process.
 java.lang.String getName()
          Returns a the name of this Process.
 java.util.Vector getProcesses()
          Access method for the processes attribute
 Process getProcessNamed(java.lang.String aProcessName)
          Goes through the processes Vector and returns the Process whose name matches the specified string.
 StateMachine getStateMachine()
           
 int hashCode()
           
 boolean isEndState()
          Returns true if this is an end State...
 void removeCondition(java.lang.String aConditionString)
          Add a TransitionCondition to the set of possible conditions for this state.
 void removeCondition(TransitionCondition aTransitionCondition)
          Remove a TransitionCondition from the set of possible conditions for this state.
 void reportException(java.lang.Exception anException, boolean trace)
          A simple way to print out Exception messages If trace is "true", then the stack trace is printed.
 TransitionCondition returnCondition()
          Returns the transition condition for this State
 void setCondition(java.lang.String aCondition)
          Sets the condition attribute.
 void setCondition(TransitionCondition aCondition)
          Sets the condition attribute to the parameter passed in
 void setEndState(boolean aBoolean)
           
 void setName(java.lang.String newName)
           
 void setService(Service service)
           
 void start()
          Everything starts here, for the execution of a Process.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.cle.process.Child
getParameters, getParent, getParents, getResults, setParent
 

Field Detail

SUCCESS

public static final java.lang.String SUCCESS
Constant for a success condition - Defect # 1575345

FAILURE

public static final java.lang.String FAILURE
Constant for a failure condition - Defect # 1575345

TRANSITION_CONDITION_SUCCESS

public static final TransitionCondition TRANSITION_CONDITION_SUCCESS
Constant for success transition condition - Bug 2426904

TRANSITION_CONDITION_FAILURE

public static final TransitionCondition TRANSITION_CONDITION_FAILURE
Constant for success transition condition - Bug 2426904

name

protected java.lang.String name
A hopefully unique name given to this process

stateMachine

protected StateMachine stateMachine
A statemachine object

service

protected Service service
The Service that contains this Process.

endState

protected boolean endState

condition

protected TransitionCondition condition
The TransitionCondition that is curently set to be returned by this State. In other owrds, if we called returnCondition() at any given point in time, it would return this attribute.

processes

protected java.util.Vector processes
A list containing all of this process' child processes
ie: Services would contain DisplayGroups, DisplayGroups would contain Processes, Processes would contain ??? Anything ???

DEBUG

protected boolean DEBUG
Set this to true to get diagnostic remarks
Constructor Detail

Process

public Process()
Construct this Process Cand create the two default conditions: "success" and "failure". All Activities will have at least have these conditions defined.

Process

public Process(Service aService)
Construct this Process
Method Detail

start

public void start()
           throws TransitionConditionException
Everything starts here, for the execution of a Process.
Specified by:
start in interface State

setService

public void setService(Service service)

getProcesses

public java.util.Vector getProcesses()
Access method for the processes attribute

getStateMachine

public StateMachine getStateMachine()

cloneProcess

public void cloneProcess(Process p)
This method must be implemented by all Process subclasses which can have different representations like Evaluator. The method is called after the new instance is created. The parameter is the orld instance. Evalutor uses this method for example to pass the linked processes on to the new Evaluator type

getName

public java.lang.String getName()
Returns a the name of this Process. It should be unique.
Specified by:
getName in interface State

setName

public void setName(java.lang.String newName)

addProcess

public void addProcess(Child aChild)
                throws CLEException
Adds a Process to the "processes" list Vector.

getProcessNamed

public Process getProcessNamed(java.lang.String aProcessName)
Goes through the processes Vector and returns the Process whose name matches the specified string.

generateSuccessCondition

public TransitionCondition generateSuccessCondition()
Returns a TransitionCondition with a positive int or zero
Specified by:
generateSuccessCondition in interface State

generateFailureCondition

public TransitionCondition generateFailureCondition()
Returns a TransitionCondition with a negative int
Specified by:
generateFailureCondition in interface State

addCondition

public void addCondition(TransitionCondition aTransitionCondition)
Add a TransitionCondition to the set of possible conditions for this state.
Specified by:
addCondition in interface State
Following copied from interface: oracle.cle.util.statemachine.State
See Also:
StateMachine

removeCondition

public void removeCondition(java.lang.String aConditionString)
Add a TransitionCondition to the set of possible conditions for this state.
See Also:
TransitionTable, StateMachine

removeCondition

public void removeCondition(TransitionCondition aTransitionCondition)
Remove a TransitionCondition from the set of possible conditions for this state. Typically, this method is used bt the TransitionTable when the StateMachine's transitiontable is being edited. You should never need to call this.
Specified by:
removeCondition in interface State
See Also:
TransitionTable, StateMachine

getConditions

public java.util.Vector getConditions()
Return a Vector of the possible TransitionConditions that are available for this State. The key is the String description in the TransitionCondition.
Specified by:
getConditions in interface State

getCondition

public TransitionCondition getCondition(java.lang.String key)
Description copied from interface: State
Returns a TransitionCondition for the specified key
Specified by:
getCondition in interface State

setCondition

public void setCondition(java.lang.String aCondition)
                  throws TransitionConditionException
Sets the condition attribute. getCondition(String a String will be called to get a TransitionCondition and then the value will be used for the attribute condition
Specified by:
setCondition in interface State
See Also:
getCondition(String)

setCondition

public void setCondition(TransitionCondition aCondition)
                  throws TransitionConditionException
Sets the condition attribute to the parameter passed in
Specified by:
setCondition in interface State

returnCondition

public TransitionCondition returnCondition()
Description copied from interface: State
Returns the transition condition for this State
Specified by:
returnCondition in interface State

setEndState

public void setEndState(boolean aBoolean)

isEndState

public boolean isEndState()
Description copied from interface: State
Returns true if this is an end State... false otherwise
Specified by:
isEndState in interface State

getIconName

public java.lang.String getIconName()
Returns a static String that tells us the location of the icon representing this Process.

getImageName

public java.lang.String getImageName()
Returns a static String that tells us the location of the image representing this Process.

toString

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

getClassname

protected final java.lang.String getClassname()

reportException

public final void reportException(java.lang.Exception anException,
                                  boolean trace)
                           throws CLERuntimeException
A simple way to print out Exception messages If trace is "true", then the stack trace is printed.

debug

public void debug(java.lang.String text)
a simple way to print some debug messages out

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object

hashCode

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


Copyright © 2003 ORACLE Corp. All Rights Reserved.