oracle.cle.process
Class Service

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

public class Service
extends ParentProcess

A sequence of Processes assembled to perform some task.

See Also:
Serialized Form

Field Summary
protected  java.util.Hashtable aliasTable
          A table containing aliases for the names of some of the ProcessInfo (Parameters and Results) objects.
protected static java.lang.String ALLVALIDATIONS
           
protected  boolean dtdValidation
          Determines whether to validate the Service descriptor file against the dtd
protected  java.util.Vector globalInfoNames
          A list of the names of the ProcessInfos that will be passed on to a subsequently called Service.
protected  java.util.Hashtable groupNavigationTable
          A table for storing the information to be passed to each of the DisplayGroups of this Service.
protected  java.util.Hashtable infoTable
          A table containing all of this Service's offspring's prerequisites and results (ProcessParameters and ProcessResults).
protected static java.lang.String NOVALIDATIONS
           
protected static java.lang.String STATEMACHINEVALIDATION
           
protected  java.lang.String validationAttributes
          Contains validation attributes.
protected static java.lang.String VALIDATIONDELIMITER
           
 
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
Service()
          Deprecated. This constructor may be removed in a future release. Services should be created with XML descriptors.
Service(ServiceController aController, java.lang.String descriptorName)
          Instantiate a Service based on the information in the xml named: descriptorName.xml where descriptorName is the sole String argument to this constructor.
Service(ServiceController aController, java.lang.String descriptorName, boolean performDtdValidation)
          Instantiate a Service based on the information in the xml named: descriptorName.xml the DtdValidation argument determines whether the content of descriptorName.xml is validated against the dtd specified in document.
 
Method Summary
 void addAlias(Process aProcess, java.lang.String localName, java.lang.String globalName)
           
 void addGlobalInfoName(java.lang.String globalInfoName)
          Adds the specified ProcessInfo name to the list of the names of the ProcessInfos that will be passed on to a subsequently called Service.
protected  void addGroupTransition(java.lang.String sourceGroupName, java.lang.String sourceGroupProcessName, java.lang.String destinationName)
          A convenient way to add a Group Transition to this group navigation table.
protected  void buildGroupNavigationTable()
          Empty implementation so that Services can be instantiated in a runtime scenario (loaded from XML definition).
 java.lang.Object clone()
           
 Service cloneService(ServiceController controller)
           
 boolean containsKey(java.lang.String aKey)
          Returns true if the infoTable contains the specified key, false otherwise.
 Process findByProcessName(Process node, java.lang.String name)
           
 java.lang.String findGlobalName(Process aProcess, java.lang.String localName)
          Returns the global ProcessInfo name for the specified Process and the ProcessInfo's name local to that Process.
 java.util.Hashtable getAliasTable()
          Returns a reference to the current AliasTable Applications should not use this
 java.util.Vector getGlobalInfoNames()
           
 java.util.Hashtable getHashtableFromInfoTable()
          Return a flat name/value pair map for the info table where name=processInfo.name and value=processInfo.value
 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.util.Hashtable getInfoTable()
          Returns a reference to the current InfoTable Applications should not use this
protected  java.lang.Class getRelativeClass()
          Returns the class for this service's parent or the class for this service if the parent is null
protected  void loadFromXML(java.lang.String urlString)
          Loads a Service's definition from the XML file at the specified URL.
static void main(java.lang.String[] args)
           
 void putInfo(ProcessInfo info)
          Put the specified ProcessInfo into the info table keyed by its name
protected  void registerInfo()
          Empty implementation so that Services can be instantiated in a runtime scenario (loaded from XML definition).
 void removeGlobalInfoName(java.lang.String globalInfoName)
          Removes the specified ProcessInfo name to the list of the names of the ProcessInfos that will be passed on to a subsequently called Service.
 void removeInfo(ProcessInfo[] processInfoArray)
          Deprecated. This might be moved to a private or protected method Please use removeInfo(ProcessInfo[], Process) when calling from a Child Process
 void removeInfo(ProcessInfo[] processInfoArray, Process callingProcess)
          Removes the ProcessInfo objects from the InfoTable.
 void removeInfo(java.lang.String key)
          Deprecated. This may be moved to a private or protected method Please use removeInfo(String, Process) when calling from a Child Process to enable alias lookups.
 void removeInfo(java.lang.String key, Process callingProcess)
          Removes the ProcessInfo object with the specified key from the InfoTable.
 void removeInfo(java.util.Vector processInfoVector)
          Deprecated. This may be moved to a private or protected method Please use removeInfo(Vector, Process) when calling from a Child Process to enable alias lookups.
 void removeInfo(java.util.Vector processInfoVector, Process callingProcess)
          Removes the infoTable entries for the specified ProcessInfo objects Use this method to remove info from within a Child Process (eg: GenericProcess) because it removes the ProcessInfo for the alias, as well.
 void setAliasTable(java.util.Hashtable aHashtable)
          Sets the current AliasTable to the specified Hashtable Applications should not use this
 void setGlobalInfoNames(java.util.Vector aVector)
           
protected  void setGroupNavigationTables()
          Put the group navigation table into each DisplayGroup so that they each "know" where to go next.
 void setInfoTable(java.util.Hashtable aHashtable)
          Sets the current InfoTable to the specified Hashtable Applications should not use this
protected  void setServiceAndParent(Service service, Process node)
           
protected  void setServiceInitialState()
           
 void setValidations(java.lang.String validations)
          Sets the validations specified int the Service XML file Applications should not use this
 void start()
          Everything starts here, for the execution of a Service.
 
Methods inherited from class oracle.cle.process.ParentProcess
addTransition, buildTransitionTable, doSkip, getChildren, getEndStates, getInitialState, getSkipable, isReady, processParameters, processResults, registerProcess, registerProcesses, setInitialState, setSkipable, skip
 
Methods inherited from class oracle.cle.process.GenericProcess
getBooleanInfo, getFloatInfo, 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
 
Methods inherited from interface oracle.cle.process.Parent
getInfo, getName, getParents
 
Methods inherited from interface oracle.cle.process.Child
getParameters, getParent, getParents, getResults, setParent
 

Field Detail

infoTable

protected java.util.Hashtable infoTable
A table containing all of this Service's offspring's prerequisites and results (ProcessParameters and ProcessResults). This includes children, grandchildren, great grandchildren, etc...

aliasTable

protected java.util.Hashtable aliasTable
A table containing aliases for the names of some of the ProcessInfo (Parameters and Results) objects. In short, a Process can call a ProcessInfo one name but it can actually refer to a ProcessInfo of another name at the Service level. This table is checked first before finding or setting a ProcessInfo.

groupNavigationTable

protected java.util.Hashtable groupNavigationTable
A table for storing the information to be passed to each of the DisplayGroups of this Service. This table will provide the information that the Group needs to set the Service's next initial state

globalInfoNames

protected java.util.Vector globalInfoNames
A list of the names of the ProcessInfos that will be passed on to a subsequently called Service. This allows us keep information among services without having to get it again.

validationAttributes

protected java.lang.String validationAttributes
Contains validation attributes.

dtdValidation

protected boolean dtdValidation
Determines whether to validate the Service descriptor file against the dtd

STATEMACHINEVALIDATION

protected static final java.lang.String STATEMACHINEVALIDATION

ALLVALIDATIONS

protected static final java.lang.String ALLVALIDATIONS

NOVALIDATIONS

protected static final java.lang.String NOVALIDATIONS

VALIDATIONDELIMITER

protected static final java.lang.String VALIDATIONDELIMITER
Constructor Detail

Service

public Service()
Deprecated. This constructor may be removed in a future release. Services should be created with XML descriptors.

Default constructor for an abstract service. This constructor, unlike Service(String) requires compiled classes to be in place for Service, DisplayGroups and Process in order to succeed.

We might want to make the default constructor do nothing and provide another constructor for the functionality currently provided here.


Service

public Service(ServiceController aController,
               java.lang.String descriptorName)
        throws CLEException

Instantiate a Service based on the information in the xml named: descriptorName.xml where descriptorName is the sole String argument to this constructor.


Service

public Service(ServiceController aController,
               java.lang.String descriptorName,
               boolean performDtdValidation)
        throws CLEException

Instantiate a Service based on the information in the xml named: descriptorName.xml the DtdValidation argument determines whether the content of descriptorName.xml is validated against the dtd specified in document. This argument will be overriden by the System property for dtdValidaton - look in ProcessConstant for the System Property to use

Method Detail

loadFromXML

protected void loadFromXML(java.lang.String urlString)
                    throws CLEException
Loads a Service's definition from the XML file at the specified URL.

start

public void start()
Everything starts here, for the execution of a Service.
Overrides:
start in class ParentProcess

setServiceInitialState

protected void setServiceInitialState()

buildGroupNavigationTable

protected void buildGroupNavigationTable()
                                  throws CLERuntimeException
Empty implementation so that Services can be instantiated in a runtime scenario (loaded from XML definition).

setGroupNavigationTables

protected void setGroupNavigationTables()
Put the group navigation table into each DisplayGroup so that they each "know" where to go next.

addGroupTransition

protected void addGroupTransition(java.lang.String sourceGroupName,
                                  java.lang.String sourceGroupProcessName,
                                  java.lang.String destinationName)
                           throws CLEException
A convenient way to add a Group Transition to this group navigation table.
Throws:
CLEException -  

registerInfo

protected void registerInfo()
Empty implementation so that Services can be instantiated in a runtime scenario (loaded from XML definition).
Overrides:
registerInfo in class GenericProcess

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. 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.
The Integer checkFlag argument can be one of the following values:
   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)
  
Overrides:
getInfo in class GenericProcess

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.
Overrides:
getInfo in class GenericProcess
See Also:
getInfo(String, Integer)

putInfo

public void putInfo(ProcessInfo info)
Put the specified ProcessInfo into the info table keyed by its name

removeInfo

public void removeInfo(java.lang.String key)
Deprecated. This may be moved to a private or protected method Please use removeInfo(String, Process) when calling from a Child Process to enable alias lookups.

Removes the ProcessInfo object with the specified key from the InfoTable Use removeInfo(String, Process) when calling this method from a Process

removeInfo

public void removeInfo(java.lang.String key,
                       Process callingProcess)
Removes the ProcessInfo object with the specified key from the InfoTable. Use this method to remove info from within a Child Process (eg: GenericProcess) because it removes the ProcessInfo for the alias, as well.

removeInfo

public void removeInfo(ProcessInfo[] processInfoArray)
Deprecated. This might be moved to a private or protected method Please use removeInfo(ProcessInfo[], Process) when calling from a Child Process

Removes the infoTable entries for the specified ProcessInfo objects

removeInfo

public void removeInfo(ProcessInfo[] processInfoArray,
                       Process callingProcess)
Removes the ProcessInfo objects from the InfoTable. Use this method to remove info from within a Child Process (eg: GenericProcess) because it removes the ProcessInfo for the alias, as well.

removeInfo

public void removeInfo(java.util.Vector processInfoVector)
Deprecated. This may be moved to a private or protected method Please use removeInfo(Vector, Process) when calling from a Child Process to enable alias lookups.

Removes the infoTable entries for the specified ProcessInfo objects

removeInfo

public void removeInfo(java.util.Vector processInfoVector,
                       Process callingProcess)
Removes the infoTable entries for the specified ProcessInfo objects Use this method to remove info from within a Child Process (eg: GenericProcess) because it removes the ProcessInfo for the alias, as well.

addGlobalInfoName

public void addGlobalInfoName(java.lang.String globalInfoName)
Adds the specified ProcessInfo name to the list of the names of the ProcessInfos that will be passed on to a subsequently called Service. This feature allows us keep information among services without having to get it again.

removeGlobalInfoName

public void removeGlobalInfoName(java.lang.String globalInfoName)
Removes the specified ProcessInfo name to the list of the names of the ProcessInfos that will be passed on to a subsequently called Service. This feature allows us keep information among services without having to get it again.

getGlobalInfoNames

public java.util.Vector getGlobalInfoNames()

setGlobalInfoNames

public void setGlobalInfoNames(java.util.Vector aVector)

setValidations

public void setValidations(java.lang.String validations)
Sets the validations specified int the Service XML file Applications should not use this

setInfoTable

public void setInfoTable(java.util.Hashtable aHashtable)
Sets the current InfoTable to the specified Hashtable Applications should not use this

getInfoTable

public java.util.Hashtable getInfoTable()
Returns a reference to the current InfoTable Applications should not use this

getHashtableFromInfoTable

public java.util.Hashtable getHashtableFromInfoTable()
Return a flat name/value pair map for the info table where name=processInfo.name and value=processInfo.value

containsKey

public boolean containsKey(java.lang.String aKey)
Returns true if the infoTable contains the specified key, false otherwise.

addAlias

public void addAlias(Process aProcess,
                     java.lang.String localName,
                     java.lang.String globalName)

findGlobalName

public java.lang.String findGlobalName(Process aProcess,
                                       java.lang.String localName)
Returns the global ProcessInfo name for the specified Process and the ProcessInfo's name local to that Process. Returns null if a global name does not exist in the aliasTable for the specified Process and local name String.

setAliasTable

public void setAliasTable(java.util.Hashtable aHashtable)
Sets the current AliasTable to the specified Hashtable Applications should not use this

getAliasTable

public java.util.Hashtable getAliasTable()
Returns a reference to the current AliasTable Applications should not use this

getRelativeClass

protected java.lang.Class getRelativeClass()
Returns the class for this service's parent or the class for this service if the parent is null
Returns:
Class

main

public static void main(java.lang.String[] args)

clone

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

findByProcessName

public Process findByProcessName(Process node,
                                 java.lang.String name)

setServiceAndParent

protected void setServiceAndParent(Service service,
                                   Process node)

cloneService

public Service cloneService(ServiceController controller)
                     throws java.lang.CloneNotSupportedException


Copyright © 2003 ORACLE Corp. All Rights Reserved.