oracle.clex.process
Class ProcessRouter

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

public class ProcessRouter
extends GenericProcess

This process handles simple routing for services. Use the constructor to specify the number of parameters the router should check. The router will loop the specified number, checking the info table for the alias matching the condition in the xml service definition document. If the info is found, a matching transition condition is set and, optionally, the info is removed from the service's info table. For example, the xml service definition should set up info alias for the router process like below:

    <infoalias local="pp1" global="view"></infoalias>
    <infoalias local="pp2" global="edit"></infoalias>
 
With this mapping, if "view" is in the info table, this router will find it as "pp1" and set a transition condition of "tc1" accordingly. The "tc1" transition condition must be coded for in the xml service definition as well.

See Also:
Serialized Form

Field Summary
protected  java.util.List parameterTokens
           
 
Fields inherited from class oracle.cle.process.GenericProcess
parent
 
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
ProcessRouter()
          Default Constructor for ProcessRouter
ProcessRouter(java.lang.Integer numberOfParameters)
          Deprecated. use constructor ProcessRouter(String parameters, String defaultCondition) instead
ProcessRouter(java.lang.Integer numberOfParameters, java.lang.Boolean removeAllInfoFlag)
          Deprecated. use constructor ProcessRouter(String parameters, Boolean removeInfoFlag, String defaultCondition) instead
ProcessRouter(java.lang.Integer numberOfParameters, java.lang.Boolean removeAllInfoFlag, java.lang.String defaultCondition)
          Deprecated. use constructor ProcessRouter(String parameters, Boolean removeAllInfoFlag, String defaultCondition) instead
ProcessRouter(java.lang.Integer numberOfParameters, java.lang.Boolean useGlobalName, java.lang.String infos, java.lang.Boolean removeInfosFlag, java.lang.String defaultCondition)
          Deprecated. use constructor ProcessRouter(String parameters, Boolean useGlobalName String infos, Boolean removeInfosFlag, String defaultCondition) instead Enhancement #2371527
ProcessRouter(java.lang.Integer numberOfParameters, java.lang.Boolean useGlobalName, java.lang.String infos, java.lang.String defaultCondition)
          Deprecated. use constructor ProcessRouter(String parameters, Boolean useGlobalName String infos, String defaultCondition) instead Bug #2371527
ProcessRouter(java.lang.Integer numberOfParameters, java.lang.String defaultCondition)
          Deprecated. use constructor ProcessRouter(String parameters, String defaultCondition) instead
ProcessRouter(java.lang.Integer numberOfParameters, java.lang.String infos, java.lang.Boolean removeInfosFlag, java.lang.String defaultCondition)
          Deprecated. use constructor ProcessRouter(String parameters, String infos, Boolean removeInfosFlag, String defaultCondition) instead Enhancement #1546037
ProcessRouter(java.lang.Integer numberOfParameters, java.lang.String infos, java.lang.String defaultCondition)
          Deprecated. use constructor ProcessRouter(String parameters, String infos, String defaultCondition) instead
ProcessRouter(Service aService, java.lang.String defaultCondition)
          Constructor for ProcessRouter that takes a Service and a string default condition to be set.
ProcessRouter(java.lang.String parameters, java.lang.Boolean removeAllInfoFlag)
          Deprecated. use constructor ProcessRouter(String parameters, Boolean removeAllInfoFlag, String defaultCondition) instead
ProcessRouter(java.lang.String parameters, java.lang.Boolean removeAllInfoFlag, java.lang.String defaultCondition)
          Constructor for ProcessRouter.
ProcessRouter(java.lang.String parameters, java.lang.Boolean useGlobalName, java.lang.String infos, java.lang.Boolean removeInfosFlag, java.lang.String defaultCondition)
          Constructor for ProcessRouter.
ProcessRouter(java.lang.String parameters, java.lang.Boolean useGlobalName, java.lang.String infosToRemove, java.lang.String defaultCondition)
          Constructor for ProcessRouter.
ProcessRouter(java.lang.String parameters, java.lang.String defaultCondition)
          Constructor for ProcessRouter.
ProcessRouter(java.lang.String parameters, java.lang.String infos, java.lang.Boolean removeInfosFlag, java.lang.String defaultCondition)
          Constructor for ProcessRouter.
ProcessRouter(java.lang.String parameters, java.lang.String infosToRemove, java.lang.String defaultCondition)
          Constructor for ProcessRouter.
 
Method Summary
protected  void registerInfo()
          Register processes/activities in this activity group
 void start()
          Effectively loops through the info table for the number of conditions, checking the info table for parameters equal to "pp1"..."ppn".
 
Methods inherited from class oracle.cle.process.GenericProcess
clone, getBooleanInfo, getFloatInfo, getInfo, getInfo, getInfo, getInfoValue, getInfoValue, getInfoValueFromController, getInfoValueFromService, getIntegerInfo, getParameterNamed, getParameters, getParent, getParents, getResultNamed, getResults, getSessionId, getStringInfo, processParameters, processResults, registerBooleanParameter, registerBooleanResult, registerIntegerParameter, registerIntegerResult, registerParameter, registerProcessInfo, registerResult, registerStringArrayParameter, registerStringArrayResult, registerStringParameter, registerStringParameter, registerStringResult, registerStringResult, retrieveStringParameter, runTest, setParent, setResult, setResult, setResult
 
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

parameterTokens

protected java.util.List parameterTokens
Constructor Detail

ProcessRouter

public ProcessRouter(java.lang.Integer numberOfParameters)
Deprecated. use constructor ProcessRouter(String parameters, String defaultCondition) instead

Constructor for ProcessRouter. Takes an Integer for the number of parameters to be checked by the router.

ProcessRouter

public ProcessRouter(java.lang.Integer numberOfParameters,
                     java.lang.Boolean removeAllInfoFlag)
Deprecated. use constructor ProcessRouter(String parameters, Boolean removeInfoFlag, String defaultCondition) instead

Constructor for ProcessRouter. Takes an Integer for the number of parameters to be checked by the router and a boolean to tell router whether or not to remove info.

ProcessRouter

public ProcessRouter(java.lang.Integer numberOfParameters,
                     java.lang.String defaultCondition)
Deprecated. use constructor ProcessRouter(String parameters, String defaultCondition) instead

Constructor for ProcessRouter. Takes an Integer for the number of parameters to be checked by the router and a string default condition to be set.

ProcessRouter

public ProcessRouter(java.lang.Integer numberOfParameters,
                     java.lang.Boolean removeAllInfoFlag,
                     java.lang.String defaultCondition)
Deprecated. use constructor ProcessRouter(String parameters, Boolean removeAllInfoFlag, String defaultCondition) instead

Constructor for ProcessRouter. Takes an Integer for the number of parameters to be checked by the router, a boolean to tell router whether or not to remove info and a string default condition to be set.

ProcessRouter

public ProcessRouter(java.lang.Integer numberOfParameters,
                     java.lang.String infos,
                     java.lang.String defaultCondition)
Deprecated. use constructor ProcessRouter(String parameters, String infos, String defaultCondition) instead

Constructor for ProcessRouter. Takes an Integer for the number of parameters to be checked by the router, a String of numbers separated by commas to tell the router which infos to remove from the info table when the appropriate condition is set and a string default condition to be set.

ProcessRouter

public ProcessRouter(java.lang.Integer numberOfParameters,
                     java.lang.Boolean useGlobalName,
                     java.lang.String infos,
                     java.lang.String defaultCondition)
Deprecated. use constructor ProcessRouter(String parameters, Boolean useGlobalName String infos, String defaultCondition) instead Bug #2371527

Constructor for ProcessRouter. Takes an Integer for the number of parameters to be checked by the router, a Boolean indicating whether to use global name(true) for the info to remove, a String of numbers or Strings separated by commas to tell the router which infos to remove from the info table when the appropriate condition is set and a string default condition to be set.

ProcessRouter

public ProcessRouter(java.lang.Integer numberOfParameters,
                     java.lang.String infos,
                     java.lang.Boolean removeInfosFlag,
                     java.lang.String defaultCondition)
Deprecated. use constructor ProcessRouter(String parameters, String infos, Boolean removeInfosFlag, String defaultCondition) instead Enhancement #1546037

Constructor for ProcessRouter. Takes an Integer for the number of parameters to be checked by the router, a String of numbers separated by commas to tell the router which infos to remove or keep when the appropriate condition is set, a Boolean designating whether to remove (True) or keep (false) the infos, and a string default condition to be set

ProcessRouter

public ProcessRouter(java.lang.Integer numberOfParameters,
                     java.lang.Boolean useGlobalName,
                     java.lang.String infos,
                     java.lang.Boolean removeInfosFlag,
                     java.lang.String defaultCondition)
Deprecated. use constructor ProcessRouter(String parameters, Boolean useGlobalName String infos, Boolean removeInfosFlag, String defaultCondition) instead Enhancement #2371527

Constructor for ProcessRouter. Takes an Integer for the number of parameters to be checked by the router, a Boolean indicating whether to use global name(true) for the infos to remove, a String of numbers or Strings separated by commas to tell the router which infos to remove or keep when the appropriate condition is set, a Boolean designating whether to remove (True) or keep (false) the infos, and a string default condition to be set

ProcessRouter

public ProcessRouter(java.lang.String parameters,
                     java.lang.Boolean removeAllInfoFlag)
Deprecated. use constructor ProcessRouter(String parameters, Boolean removeAllInfoFlag, String defaultCondition) instead

Constructor for ProcessRouter. Takes a comma delimited String of parameters to be checked by the router. A condition by the same name will be set if the parameter is found.
Parameters:
parameters - A comma delimited String of parameters to be checked
removeAllInfoFlag - A boolean to tell router whether or not to remove info

ProcessRouter

public ProcessRouter(java.lang.String parameters,
                     java.lang.String defaultCondition)
Constructor for ProcessRouter. Takes a comma delimited String of parameters to be checked by the router. A condition by the same name will be set if the parameter is found.
Parameters:
parameters - A comma delimited String of parameters to be checked
defaultCondition - A string default condition to be set.

ProcessRouter

public ProcessRouter(java.lang.String parameters,
                     java.lang.Boolean removeAllInfoFlag,
                     java.lang.String defaultCondition)
Constructor for ProcessRouter. Takes a comma delimited String of parameters to be checked by the router. A condition by the same name will be set if the parameter is found.
Parameters:
parameters - A comma delimited String of parameters to be checked
removeAllInfoFlag - A boolean to tell router whether or not to remove info
defaultCondition - A string default condition to be set.

ProcessRouter

public ProcessRouter(java.lang.String parameters,
                     java.lang.String infosToRemove,
                     java.lang.String defaultCondition)
Constructor for ProcessRouter. Takes a comma delimited String of parameters to be checked by the router. A condition by the same name will be set if the parameter is found.
Parameters:
parameters - A comma delimited String of parameters to be checked
infosToRemove - A String of parameters separated by commas to tell the router which infos to remove from the info table when the appropriate condition is set
defaultCondition - A string default condition to be set.

ProcessRouter

public ProcessRouter(java.lang.String parameters,
                     java.lang.Boolean useGlobalName,
                     java.lang.String infosToRemove,
                     java.lang.String defaultCondition)
Constructor for ProcessRouter. Takes a comma delimited String of parameters to be checked by the router. A condition by the same name will be set if the parameter is found.
Parameters:
parameters - A comma delimited String of parameters to be checked
useGlobalName - a Boolean indicating whether to use global name(true) for the info to remove
infosToRemove - A String of parameters separated by commas to tell the router which infos to remove from the info table when the appropriate condition is set
defaultCondition - A string default condition to be set.

ProcessRouter

public ProcessRouter(java.lang.String parameters,
                     java.lang.String infos,
                     java.lang.Boolean removeInfosFlag,
                     java.lang.String defaultCondition)
Constructor for ProcessRouter. Takes a comma delimited String of parameters to be checked by the router. A condition by the same name will be set if the parameter is found.
Parameters:
parameters - A comma delimited String of parameters to be checked
infos - a String of parameters separated by commas to tell the router which infos to remove or keep when the appropriate condition is set
removeInfosFlag - a Boolean designating whether to remove (True) or keep (false) the infos specified by the "infos" parameter.
defaultCondition - A string default condition to be set.

ProcessRouter

public ProcessRouter(java.lang.String parameters,
                     java.lang.Boolean useGlobalName,
                     java.lang.String infos,
                     java.lang.Boolean removeInfosFlag,
                     java.lang.String defaultCondition)
Constructor for ProcessRouter. Takes a comma delimited String of parameters to be checked by the router. A condition by the same name will be set if the parameter is found.
Parameters:
parameters - A comma delimited String of parameters to be checked
useGlobalName - a Boolean indicating whether to use global name(true) for the info to remove
infos - a String of parameters separated by commas to tell the router which infos to remove or keep when the appropriate condition is set
removeInfosFlag - a Boolean designating whether to remove (True) or keep (false) the infos specified by the "infos" parameter.
defaultCondition - A string default condition to be set.

ProcessRouter

public ProcessRouter()
Default Constructor for ProcessRouter

ProcessRouter

public ProcessRouter(Service aService,
                     java.lang.String defaultCondition)
Constructor for ProcessRouter that takes a Service and a string default condition to be set.
Method Detail

registerInfo

protected void registerInfo()
Register processes/activities in this activity group
Overrides:
registerInfo in class GenericProcess

start

public void start()
Effectively loops through the info table for the number of conditions, checking the info table for parameters equal to "pp1"..."ppn". If the info is found, the appropriate transition condition is set. If the removeInfoFlag has been set to true, or if the info has been ID'd as one to be removed, the info is removed from the info table. This is done so that the router can be reused within the scope of the service.
Overrides:
start in class GenericProcess


Copyright © 2003 ORACLE Corp. All Rights Reserved.