com.oakgrovesystems.reactor
Class ReactorObjects

java.lang.Object
  |
  +--com.oakgrovesystems.reactor.ReactorObjects

public class ReactorObjects
extends java.lang.Object

This is a convenience collection object for process mediation objects. It has convenience methods to get process mediation objects and get its associated objects.


Field Summary
protected  java.lang.String errorMsg
           
protected  java.util.Map objects
           
 
Constructor Summary
ReactorObjects()
          Creates a new collection object
 
Method Summary
 void add(com.oakgrovesystems.reactor.processMediation.ProcessMediationObject pmo)
          Adds a process mediation object to the collection
 void add(java.util.Set set)
          Adds a set of process mediation objects to the collection.
 void clear()
          Clears the contents of the collection
 com.oakgrovesystems.reactor.processMediation.Status getCurrentStatus(com.oakgrovesystems.reactor.processMediation.Process process, java.lang.String label)
          Gets a current status for a process
 java.util.Set getCurrentStatuses(com.oakgrovesystems.reactor.LabelPath processLabelPath)
          Gets set of current statuses of a process The label path must resolve to only ONE process
 java.util.Set getCurrentStatuses(com.oakgrovesystems.reactor.processMediation.Process process)
          Gets set of current statuses of a process
 java.util.Set getCurrentStatuses(com.oakgrovesystems.reactor.ReactorObjectId processId)
          Gets set of current statuses of a process
 java.util.Collection getObjects()
          Gets all objects
 com.oakgrovesystems.reactor.processMediation.Operand getOperand(com.oakgrovesystems.reactor.LabelPath labelPath)
          Gets operand from the collection The label path must resolve to only ONE operand
 com.oakgrovesystems.reactor.processMediation.Operand getOperand(com.oakgrovesystems.reactor.processMediation.Process process, java.lang.String label)
          Gets operand of a process
 com.oakgrovesystems.reactor.processMediation.Operand getOperand(com.oakgrovesystems.reactor.ReactorObjectId id)
          Gets operand from the collection
 java.util.Set getOperands()
          Gets all operands from the collection
 java.util.Set getOperands(com.oakgrovesystems.reactor.LabelPath processLabelPath)
          Gets set of operands of a process The label path must resolve to only ONE process
 java.util.Set getOperands(com.oakgrovesystems.reactor.processMediation.Process process)
          Gets set of operands of a process
 java.util.Set getOperands(com.oakgrovesystems.reactor.ReactorObjectId processId)
          Gets set of operands of a process
 com.oakgrovesystems.reactor.processMediation.Process getParent(com.oakgrovesystems.reactor.processMediation.Process process)
          Gets the parent of a process
 java.util.Set getPolicies()
          Gets all policies from the collection
 java.util.Set getPolicies(com.oakgrovesystems.reactor.LabelPath processLabelPath)
          Gets set of policies of a process The label path must resolve to only ONE process
 java.util.Set getPolicies(com.oakgrovesystems.reactor.processMediation.Process process)
          Gets set of policies of a process
 java.util.Set getPolicies(com.oakgrovesystems.reactor.ReactorObjectId processId)
          Gets set of policies of a process
 com.oakgrovesystems.reactor.processMediation.Policy getPolicy(com.oakgrovesystems.reactor.LabelPath labelPath)
          Gets policy from the collection The label path must resolve to only ONE policy
 com.oakgrovesystems.reactor.processMediation.Policy getPolicy(com.oakgrovesystems.reactor.processMediation.Process process, java.lang.String label)
          Gets policy of a process
 com.oakgrovesystems.reactor.processMediation.Policy getPolicy(com.oakgrovesystems.reactor.ReactorObjectId id)
          Gets policy from the collection
 com.oakgrovesystems.reactor.processMediation.Process getProcess(com.oakgrovesystems.reactor.LabelPath labelPath)
          Gets process from the collection The label path must resolve to only ONE process.
 com.oakgrovesystems.reactor.processMediation.Process getProcess(com.oakgrovesystems.reactor.processMediation.Operand operand)
          Gets the process to which the operand is associated
 com.oakgrovesystems.reactor.processMediation.Process getProcess(com.oakgrovesystems.reactor.processMediation.Policy policy)
          Gets the process to which the policy is associated
 com.oakgrovesystems.reactor.processMediation.Process getProcess(com.oakgrovesystems.reactor.ReactorObjectId id)
          Gets process from the collection
 com.oakgrovesystems.reactor.processMediation.Process getProcess(com.oakgrovesystems.reactor.processMediation.Status status)
          Gets the process to which the status is associated
 java.util.Set getProcesses()
          Gets all processes from the collection
 java.util.Set getRootProcesses()
          Gets all the root processes from the collection
 com.oakgrovesystems.reactor.processMediation.Status getStatus(com.oakgrovesystems.reactor.LabelPath labelPath)
          Gets status from the collection The label path must resolve to only ONE status
 com.oakgrovesystems.reactor.processMediation.Status getStatus(com.oakgrovesystems.reactor.processMediation.Process process, java.lang.String label)
          Gets status of a process
 com.oakgrovesystems.reactor.processMediation.Status getStatus(com.oakgrovesystems.reactor.ReactorObjectId id)
          Gets status from the collection
 java.util.Set getStatuses()
          Gets all statuses from the collection
 java.util.Set getStatuses(com.oakgrovesystems.reactor.LabelPath processLabelPath)
          Gets set of statuses of a process The label path must resolve to only ONE process
 java.util.Set getStatuses(com.oakgrovesystems.reactor.processMediation.Process process)
          Gets set of statuses of a process
 java.util.Set getStatuses(com.oakgrovesystems.reactor.ReactorObjectId processId)
          Gets set of statuses of a process
 com.oakgrovesystems.reactor.processMediation.Process getSubprocess(com.oakgrovesystems.reactor.processMediation.Process process, java.lang.String label)
          Gets the subprocess of the process
 java.util.Set getSubprocesses(com.oakgrovesystems.reactor.LabelPath processLabelPath)
          Gets set of subprocesses of a process The label path must resolve to only ONE process
 java.util.Set getSubprocesses(com.oakgrovesystems.reactor.processMediation.Process process)
          Gets set of subprocesses of a process
 java.util.Set getSubprocesses(com.oakgrovesystems.reactor.ReactorObjectId processId)
          Gets set of subprocesses of a process
 com.oakgrovesystems.reactor.processMediation.ProcessMediationObject remove(com.oakgrovesystems.reactor.LabelPath labelPath)
          Removes the process mediation object from the collection.
 com.oakgrovesystems.reactor.processMediation.ProcessMediationObject remove(com.oakgrovesystems.reactor.processMediation.ProcessMediationObject pmo)
          Removes the process mediation object from the collection
 com.oakgrovesystems.reactor.processMediation.ProcessMediationObject remove(com.oakgrovesystems.reactor.ReactorObjectId id)
          Removes the process mediation object from the collection
 int size()
          Gets the size of the collection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objects

protected java.util.Map objects

errorMsg

protected java.lang.String errorMsg
Constructor Detail

ReactorObjects

public ReactorObjects()
Creates a new collection object

Method Detail

clear

public void clear()
Clears the contents of the collection


size

public int size()
Gets the size of the collection

Returns:
the size of the collection. 0 if empty.

add

public void add(com.oakgrovesystems.reactor.processMediation.ProcessMediationObject pmo)
Adds a process mediation object to the collection

Parameters:
pmo - the process mediation object to add

add

public void add(java.util.Set set)
Adds a set of process mediation objects to the collection. The objects that are not process mediation objects will be ignored.

Parameters:
set - The set of process mediation objects

remove

public com.oakgrovesystems.reactor.processMediation.ProcessMediationObject remove(com.oakgrovesystems.reactor.ReactorObjectId id)
Removes the process mediation object from the collection

Parameters:
id - The id of the process mediation object to be removed.
Returns:
The process mediation object removed.

remove

public com.oakgrovesystems.reactor.processMediation.ProcessMediationObject remove(com.oakgrovesystems.reactor.processMediation.ProcessMediationObject pmo)
Removes the process mediation object from the collection

Parameters:
pmo - The process mediation object to be removed
Returns:
The process mediation object removed

remove

public com.oakgrovesystems.reactor.processMediation.ProcessMediationObject remove(com.oakgrovesystems.reactor.LabelPath labelPath)
Removes the process mediation object from the collection. The labelPath must resolve to only ONE process mediation object

Parameters:
labelPath - The label path of the process mediation object to be removed. The label path must resolve to only ONE process mediation object.
Returns:
The process mediation object removed.

getProcess

public com.oakgrovesystems.reactor.processMediation.Process getProcess(com.oakgrovesystems.reactor.ReactorObjectId id)
Gets process from the collection

Parameters:
id - The id of the process
Returns:
The process if found else returns null

getProcess

public com.oakgrovesystems.reactor.processMediation.Process getProcess(com.oakgrovesystems.reactor.LabelPath labelPath)
Gets process from the collection The label path must resolve to only ONE process.

Parameters:
labelPath - The label path of the process. The label path must resolve to only one process.
Returns:
The process if found else returns null

getSubprocess

public com.oakgrovesystems.reactor.processMediation.Process getSubprocess(com.oakgrovesystems.reactor.processMediation.Process process,
                                                                          java.lang.String label)
Gets the subprocess of the process

Parameters:
process - The process whose subprocess is required
label - The label of the subprocess
Returns:
The process if found else returns null

getSubprocesses

public java.util.Set getSubprocesses(com.oakgrovesystems.reactor.ReactorObjectId processId)
Gets set of subprocesses of a process

Parameters:
processId - The id of the process whose subprocesses are required
Returns:
The set of subprocesses found

getSubprocesses

public java.util.Set getSubprocesses(com.oakgrovesystems.reactor.LabelPath processLabelPath)
Gets set of subprocesses of a process The label path must resolve to only ONE process

Parameters:
processLabelPath - The label path of the process whose subprocesses are required The label path must resolve to only ONE process.
Returns:
The set of subprocesses found

getSubprocesses

public java.util.Set getSubprocesses(com.oakgrovesystems.reactor.processMediation.Process process)
Gets set of subprocesses of a process

Parameters:
process - The process whose subprocesses are required
Returns:
The set of subprocesses found

getRootProcesses

public java.util.Set getRootProcesses()
Gets all the root processes from the collection

Returns:
The set of root processes found in the collection

getProcesses

public java.util.Set getProcesses()
Gets all processes from the collection

Returns:
The set of processes found in the collection. Empty set if no processes are found.

getParent

public com.oakgrovesystems.reactor.processMediation.Process getParent(com.oakgrovesystems.reactor.processMediation.Process process)
Gets the parent of a process

Parameters:
process - The process whose parent is required
Returns:
The parent of the process. Returns null if parent is a root process

getProcess

public com.oakgrovesystems.reactor.processMediation.Process getProcess(com.oakgrovesystems.reactor.processMediation.Operand operand)
Gets the process to which the operand is associated

Parameters:
operand - The operand whose process is required
Returns:
The process to which the operand is associated. Returns null if operand is a root level operand

getProcess

public com.oakgrovesystems.reactor.processMediation.Process getProcess(com.oakgrovesystems.reactor.processMediation.Status status)
Gets the process to which the status is associated

Parameters:
status - The status whose process is required
Returns:
The process to which the status is associated. Returns null if status is a root level status

getProcess

public com.oakgrovesystems.reactor.processMediation.Process getProcess(com.oakgrovesystems.reactor.processMediation.Policy policy)
Gets the process to which the policy is associated

Parameters:
policy - The policy whose process is required
Returns:
The process to which the policy is associated. Returns null if policy is a root level policy

getOperand

public com.oakgrovesystems.reactor.processMediation.Operand getOperand(com.oakgrovesystems.reactor.ReactorObjectId id)
Gets operand from the collection

Parameters:
id - The id of the operand
Returns:
The operand if found else returns null

getOperand

public com.oakgrovesystems.reactor.processMediation.Operand getOperand(com.oakgrovesystems.reactor.LabelPath labelPath)
Gets operand from the collection The label path must resolve to only ONE operand

Parameters:
labelPath - The label path of the operand
Returns:
The operand if found else returns null

getOperand

public com.oakgrovesystems.reactor.processMediation.Operand getOperand(com.oakgrovesystems.reactor.processMediation.Process process,
                                                                       java.lang.String label)
Gets operand of a process

Parameters:
process - The process whose operand is required
label - The label of the operand
Returns:
The Operand if found else returns null

getOperands

public java.util.Set getOperands(com.oakgrovesystems.reactor.ReactorObjectId processId)
Gets set of operands of a process

Parameters:
processId - The id of the process whose operands are required
Returns:
The set of operands found

getOperands

public java.util.Set getOperands(com.oakgrovesystems.reactor.LabelPath processLabelPath)
Gets set of operands of a process The label path must resolve to only ONE process

Parameters:
processLabelPath - The label path of the process whose operands are required The label path must resolve to only ONE process.
Returns:
The set of operands found

getOperands

public java.util.Set getOperands(com.oakgrovesystems.reactor.processMediation.Process process)
Gets set of operands of a process

Parameters:
process - The process whose operands are required
Returns:
The set of operands found

getOperands

public java.util.Set getOperands()
Gets all operands from the collection

Returns:
The set of operands found in the collection. Empty set if no operands are found.

getStatus

public com.oakgrovesystems.reactor.processMediation.Status getStatus(com.oakgrovesystems.reactor.ReactorObjectId id)
Gets status from the collection

Parameters:
id - The id of the status
Returns:
The status if found else returns null

getStatus

public com.oakgrovesystems.reactor.processMediation.Status getStatus(com.oakgrovesystems.reactor.LabelPath labelPath)
Gets status from the collection The label path must resolve to only ONE status

Parameters:
labelPath - The label path of the status
Returns:
The status if found else returns null

getStatus

public com.oakgrovesystems.reactor.processMediation.Status getStatus(com.oakgrovesystems.reactor.processMediation.Process process,
                                                                     java.lang.String label)
Gets status of a process

Parameters:
process - The process whose status is required
label - The label of the status
Returns:
The status if found else returns null
See Also:
getCurrentStatus(Process,String)

getStatuses

public java.util.Set getStatuses(com.oakgrovesystems.reactor.ReactorObjectId processId)
Gets set of statuses of a process

Parameters:
processId - The id of the process whose statuses are required
Returns:
The set of statuses found
See Also:
getCurrentStatuses(ReactorObjectId)

getStatuses

public java.util.Set getStatuses(com.oakgrovesystems.reactor.LabelPath processLabelPath)
Gets set of statuses of a process The label path must resolve to only ONE process

Parameters:
processLabelPath - The label path of the process whose statuses are required The label path must resolve to only ONE process.
Returns:
The set of statuses found
See Also:
getCurrentStatuses(LabelPath)

getStatuses

public java.util.Set getStatuses(com.oakgrovesystems.reactor.processMediation.Process process)
Gets set of statuses of a process

Parameters:
process - The process whose statuses are required
Returns:
The set of statuses found
See Also:
getCurrentStatuses(Process)

getStatuses

public java.util.Set getStatuses()
Gets all statuses from the collection

Returns:
The set of statuses found in the collection. Empty set if no operands are found.

getCurrentStatus

public com.oakgrovesystems.reactor.processMediation.Status getCurrentStatus(com.oakgrovesystems.reactor.processMediation.Process process,
                                                                            java.lang.String label)
Gets a current status for a process

Parameters:
process - The process whose status is required
label - The label of the status
Returns:
The status if found else returns null
See Also:
getStatus(Process,String)

getCurrentStatuses

public java.util.Set getCurrentStatuses(com.oakgrovesystems.reactor.ReactorObjectId processId)
Gets set of current statuses of a process

Parameters:
processId - The id of the process whose statuses are required
Returns:
The set of statuses found
See Also:
getStatuses(ReactorObjectId)

getCurrentStatuses

public java.util.Set getCurrentStatuses(com.oakgrovesystems.reactor.LabelPath processLabelPath)
Gets set of current statuses of a process The label path must resolve to only ONE process

Parameters:
processLabelPath - The label path of the process whose statuses are required The label path must resolve to only ONE process.
Returns:
The set of statuses found
See Also:
getStatuses(LabelPath)

getCurrentStatuses

public java.util.Set getCurrentStatuses(com.oakgrovesystems.reactor.processMediation.Process process)
Gets set of current statuses of a process

Parameters:
process - The process whose statuses are required
Returns:
The set of statuses found
See Also:
getStatuses(Process)

getPolicy

public com.oakgrovesystems.reactor.processMediation.Policy getPolicy(com.oakgrovesystems.reactor.ReactorObjectId id)
Gets policy from the collection

Parameters:
id - The id of the policy
Returns:
The policy if found else returns null

getPolicy

public com.oakgrovesystems.reactor.processMediation.Policy getPolicy(com.oakgrovesystems.reactor.LabelPath labelPath)
Gets policy from the collection The label path must resolve to only ONE policy

Parameters:
labelPath - The label path of the policy
Returns:
The policy if found else returns null

getPolicy

public com.oakgrovesystems.reactor.processMediation.Policy getPolicy(com.oakgrovesystems.reactor.processMediation.Process process,
                                                                     java.lang.String label)
Gets policy of a process

Parameters:
process - The process whose policy is required
label - The label of the policy
Returns:
The policy if found else returns null

getPolicies

public java.util.Set getPolicies(com.oakgrovesystems.reactor.ReactorObjectId processId)
Gets set of policies of a process

Parameters:
processId - The id of the process whose policies are required
Returns:
The set of policies found

getPolicies

public java.util.Set getPolicies(com.oakgrovesystems.reactor.LabelPath processLabelPath)
Gets set of policies of a process The label path must resolve to only ONE process

Parameters:
processLabelPath - The label path of the process whose policies are required The label path must resolve to only ONE process.
Returns:
The set of policies found

getPolicies

public java.util.Set getPolicies(com.oakgrovesystems.reactor.processMediation.Process process)
Gets set of policies of a process

Parameters:
process - The process whose policies are required
Returns:
The set of policies found

getPolicies

public java.util.Set getPolicies()
Gets all policies from the collection

Returns:
The set of policies found in the collection. Empty set if no policies are found.

getObjects

public java.util.Collection getObjects()
Gets all objects

Returns:
collection of all objects.


Copyright (c) 1999-2004 Oak Grove Systems. All Rights Reserved.