oracle.cle.process
Class GenericProcess

java.lang.Object
  |
  +--oracle.cle.process.Process
        |
        +--oracle.cle.process.GenericProcess
All Implemented Interfaces:
Child, java.lang.Cloneable, ProcessConstants, java.io.Serializable, State
Direct Known Subclasses:
CheckProcessExistence, ClearInfos, CreateProcessConstants, CreateXSLTransformPage, CreateZipFile, DeleteUser, GetServiceProcesses, InfoSelectionRouter, LoginPage, LoginSwitcher, LogMessages, ModifyUser, PageValueProvider, ParameterConstantsRouter, ParentProcess, PersistingProcess, ProcessRouter, ProcessTypeRouter, RegisterUser, SaveProcess, SendMail, StoreParameters, StoreResults, ValidateAttributes, ValidateHintAnswer, ValidateHTMLForm, ValidateHTMLInput, ValidateLogin, ValidateParameterInfo, ValidateResultInfo, ValidateRoles

public abstract class GenericProcess
extends Process

GenericProcess provides most of the methods processes will use to interact with the service

See Also:
Serialized Form

Field Summary
protected  Parent parent
          The GenericProcess that contains and starts this Process.
 
Fields inherited from class oracle.cle.process.Process
condition, DEBUG, endState, FAILURE, name, processes, service, stateMachine, SUCCESS, TRANSITION_CONDITION_FAILURE, TRANSITION_CONDITION_SUCCESS
 
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
GenericProcess()
          Construct this GenericProcess
GenericProcess(Parent aParent)
          Construct this GenericProcess and pass the Parent that contains and calls it.
GenericProcess(Service aService)
          Construct this GenericProcess and pass the service that contains this process
 
Method Summary
 java.lang.Object clone()
           
 java.lang.Boolean getBooleanInfo(java.lang.String name)
          A shortcut for retrieving Boolean parameters
 java.lang.Float getFloatInfo(java.lang.String name)
          A shortcut for retrieving Float parameters
 java.lang.Object getInfo(java.lang.String key)
          Get the value for the specified key from the controller or infoTable This method is used for resolving parameters.
 java.lang.Object getInfo(java.lang.String key, boolean checkParent)
          Deprecated. Use getInfo(String, Integer) instead
 java.lang.Object getInfo(java.lang.String key, java.lang.Integer checkFlag)
          Get the value for the specified key from the infoTable.
 java.lang.Object getInfoValue(java.lang.String key)
          Returns the value for the specified key.
 java.lang.Object getInfoValue(java.lang.String key, java.lang.Integer checkFlag)
          Returns the value for the specified key.
 java.lang.Object getInfoValueFromController(java.lang.String key)
          This has the same effect as calling: getInfoValue(key, ProcessConstants.GETINFO_CHECK_CONTROLLERONLY
 java.lang.Object getInfoValueFromService(java.lang.String key)
          This has the same effect as calling: getInfoValue(key, ProcessConstants.GETINFO_CHECK_SERVICEONLY
 java.lang.Integer getIntegerInfo(java.lang.String name)
          A shortcut for retrieving Integer parameters
 ProcessParameter getParameterNamed(java.lang.String pname)
          GetParameterNamed returns a Parameter by name
 java.util.Hashtable getParameters()
          Return this child's prerequites for execution
 Parent getParent()
           
 java.util.Vector getParents()
          Returns a Vector of parents of this Process in hierarchical order
 ProcessResult getResultNamed(java.lang.String rname)
          GetResultNamed returns a Result by name
 java.util.Hashtable getResults()
          Return this child's results
protected  java.lang.Object getSessionId()
          A convenience Method for getting the registered ProcessConstants.SESSIONID
 java.lang.String getStringInfo(java.lang.String name)
          A shortcut for retrieving string parameters ...
protected  void processParameters()
          Cycles through all the registered parameters of this class and asks for their values from the user.
protected  void processResults()
          Cycles through all the registered results of this class and prints their values to the standard out.
 void registerBooleanParameter(java.lang.String name)
          A shortcut for registering Boolean parameters ...
 void registerBooleanResult(java.lang.String name)
          A shortcut for registering Boolean result
protected  void registerInfo()
          Here is where we register all ProcessParameters and potential ProcessResults.
 void registerIntegerParameter(java.lang.String name)
          A shortcut for registering Integer parameters ...
 void registerIntegerResult(java.lang.String name)
          A shortcut for registering Integer result
 void registerParameter(ProcessParameter parameter)
           
 void registerProcessInfo(ProcessInfo aProcessInfo)
           
 void registerResult(ProcessResult result)
           
 void registerStringArrayParameter(java.lang.String name)
          A shortcut for registering String Array parameters
 void registerStringArrayResult(java.lang.String name)
          A shortcut for registering String[] result
 void registerStringParameter(java.lang.String name)
          A shortcut for registering string parameters ...
 void registerStringParameter(java.util.Vector parameters)
           
 void registerStringResult(java.lang.String name)
          A shortcut for registering string result ...
 void registerStringResult(java.util.Vector results)
           
 java.lang.String retrieveStringParameter(java.lang.String name)
          A shortcut for retrieving string parameters ...
 void runTest()
          A simple test method for testing the GenericProcess before integration with the Service and DisplayGroup.
 void setParent(Parent aParent)
           
 void setResult(java.util.Hashtable results)
           
 void setResult(Offerable offerable)
           
 void setResult(java.lang.String resultName, java.lang.Object resultValue)
           
 void start()
          Call super.start() and, if this is an end state, force this GenericProcess's parent to call processResults(this) because we never go back to the parent.
 
Methods inherited from class oracle.cle.process.Process
addCondition, addProcess, cloneProcess, debug, generateFailureCondition, generateSuccessCondition, getClassname, getCondition, getConditions, getIconName, getImageName, getName, getProcesses, getProcessNamed, getStateMachine, hashCode, isEndState, removeCondition, removeCondition, reportException, returnCondition, setCondition, setCondition, setEndState, setName, setService, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

parent

protected Parent parent
The GenericProcess that contains and starts this Process. This is NOT a Parent because Parent doesn't implement getParents().
Constructor Detail

GenericProcess

public GenericProcess(Parent aParent)
Construct this GenericProcess and pass the Parent that contains and calls it.

GenericProcess

public GenericProcess(Service aService)
Construct this GenericProcess and pass the service that contains this process

GenericProcess

public GenericProcess()
Construct this GenericProcess
Method Detail

start

public void start()
           throws TransitionConditionException
Call super.start() and, if this is an end state, force this GenericProcess's parent to call processResults(this) because we never go back to the parent.
Overrides:
start in class Process

getParameters

public java.util.Hashtable getParameters()
Return this child's prerequites for execution

getResults

public java.util.Hashtable getResults()
Return this child's results

setParent

public void setParent(Parent aParent)

getParent

public Parent getParent()

registerInfo

protected void registerInfo()
Here is where we register all ProcessParameters and potential ProcessResults.

setResult

public void setResult(java.lang.String resultName,
                      java.lang.Object resultValue)

setResult

public void setResult(Offerable offerable)
               throws ProcessInfoException

setResult

public void setResult(java.util.Hashtable results)
               throws java.lang.ClassCastException

getParents

public java.util.Vector getParents()
Returns a Vector of parents of this Process in hierarchical order

getInfo

public java.lang.Object getInfo(java.lang.String key,
                                boolean checkParent)
Deprecated. Use getInfo(String, Integer) instead

Get the value for the specified key from the infoTable. This method is used for resolving parameters. Setting checkParent to true will cause the controller to be checked first. Setting checkParent to false will cause this method to search for the requested key in the infoTable only.
See Also:
getInfo(String, Integer)

getInfoValueFromController

public java.lang.Object getInfoValueFromController(java.lang.String key)
This has the same effect as calling: getInfoValue(key, ProcessConstants.GETINFO_CHECK_CONTROLLERONLY

getInfoValueFromService

public java.lang.Object getInfoValueFromService(java.lang.String key)
This has the same effect as calling: getInfoValue(key, ProcessConstants.GETINFO_CHECK_SERVICEONLY

getInfo

public java.lang.Object getInfo(java.lang.String key,
                                java.lang.Integer checkFlag)
Get the value for the specified key from the infoTable. This method is used for resolving parameters. The int argument is one of the following:
   GETINFO_CHECK_ALL: check parent and infotable for an entry
   GETINFO_CHECK_SERVICEONLY: check only the infotable for an entry
   GETINFO_CHECK_CONTROLLERONLY: check only the parent for an entry (the controller)
  

getInfo

public java.lang.Object getInfo(java.lang.String key)
Get the value for the specified key from the controller or infoTable This method is used for resolving parameters. This method searches the Controller for new infomation to the system first, and then searches the infoTable for the requested info This method will call the getInfo(String key, int checkFlag) method with checkParent parameter set to "check both parent and infotable for a value"
See Also:
Service

getInfoValue

public java.lang.Object getInfoValue(java.lang.String key)
Returns the value for the specified key. If the value does not exist, then this method returns null. The object that is returned is the value that one would get from safely calling getInfo(key).getValue();

getInfoValue

public java.lang.Object getInfoValue(java.lang.String key,
                                     java.lang.Integer checkFlag)
Returns the value for the specified key. If the value does not exist, then this method returns null. The object that is returned is the value that one would get from safely calling getInfo(key, checkFlag).getValue();

getStringInfo

public java.lang.String getStringInfo(java.lang.String name)
A shortcut for retrieving string parameters ... until we have the tool!

getBooleanInfo

public java.lang.Boolean getBooleanInfo(java.lang.String name)
A shortcut for retrieving Boolean parameters

getIntegerInfo

public java.lang.Integer getIntegerInfo(java.lang.String name)
A shortcut for retrieving Integer parameters

getFloatInfo

public java.lang.Float getFloatInfo(java.lang.String name)
A shortcut for retrieving Float parameters

registerResult

public void registerResult(ProcessResult result)
                    throws ProcessInfoException

registerProcessInfo

public void registerProcessInfo(ProcessInfo aProcessInfo)
                         throws ProcessInfoException

registerParameter

public void registerParameter(ProcessParameter parameter)
                       throws ProcessInfoException

registerStringParameter

public void registerStringParameter(java.lang.String name)
                             throws ProcessInfoException
A shortcut for registering string parameters ... until we have the tool!

registerBooleanParameter

public void registerBooleanParameter(java.lang.String name)
                              throws ProcessInfoException
A shortcut for registering Boolean parameters ... until we have the tool!

registerIntegerParameter

public void registerIntegerParameter(java.lang.String name)
                              throws ProcessInfoException
A shortcut for registering Integer parameters ... until we have the tool!

registerStringArrayParameter

public void registerStringArrayParameter(java.lang.String name)
                                  throws ProcessInfoException
A shortcut for registering String Array parameters

registerStringParameter

public void registerStringParameter(java.util.Vector parameters)
                             throws ProcessInfoException,
                                    java.lang.ClassCastException

retrieveStringParameter

public java.lang.String retrieveStringParameter(java.lang.String name)
A shortcut for retrieving string parameters ... until we have the tool!

registerStringResult

public void registerStringResult(java.lang.String name)
                          throws ProcessInfoException
A shortcut for registering string result ... until we have the tool!

registerStringResult

public void registerStringResult(java.util.Vector results)
                          throws ProcessInfoException,
                                 java.lang.ClassCastException

registerStringArrayResult

public void registerStringArrayResult(java.lang.String name)
                               throws ProcessInfoException
A shortcut for registering String[] result

registerBooleanResult

public void registerBooleanResult(java.lang.String name)
                           throws ProcessInfoException
A shortcut for registering Boolean result

registerIntegerResult

public void registerIntegerResult(java.lang.String name)
                           throws ProcessInfoException
A shortcut for registering Integer result

getParameterNamed

public ProcessParameter getParameterNamed(java.lang.String pname)
GetParameterNamed returns a Parameter by name

getResultNamed

public ProcessResult getResultNamed(java.lang.String rname)
GetResultNamed returns a Result by name

getSessionId

protected java.lang.Object getSessionId()
A convenience Method for getting the registered ProcessConstants.SESSIONID

runTest

public final void runTest()
A simple test method for testing the GenericProcess before integration with the Service and DisplayGroup. It is called by each GenericProcess's main method.

processParameters

protected void processParameters()
Cycles through all the registered parameters of this class and asks for their values from the user. This method is used by the runTest method in running unit testing on a given GenericProcess BEFORE integration into an DisplayGroup or Service. We can clean this up a bit, put it in a better place, or change the method name later I guess.

processResults

protected void processResults()
Cycles through all the registered results of this class and prints their values to the standard out. This method is used by the runTest method in running unit testing on a given GenericProcess BEFORE integration into an DisplayGroup or Service. We can clean this up a bit, put it in a better place, or change the method name later I guess.

clone

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


Copyright © 2003 ORACLE Corp. All Rights Reserved.