|
Oracle Fusion Applications Java API Reference for Oracle Enterprise Scheduler Service 11g Release 1 (11.1.1.6) E20742-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.as.scheduler.RequestParameters
public class RequestParameters
Container for all the parameters for a request.
Some methods provided by this class take a step ID as an argument. Such methods are useful for JobSet requests, where parameters can be specified for (scoped to) individual steps of the JobSet request.
For such methods, the step ID argument identifies the step within
the JobSet to which the given parameter applies. The step ID should
be specified in the format id1.id2.id3...
where the fully
qualified step ID identifies the unique step (node) in the JobSet
hierarchy (tree).
Parameters without any step ID in a JobSet request are treated as global parameters and they apply to each step of the JobSet request. This provides the capability of shared parameters. For non-JobSet requests, the step ID does not apply.
Since multiple steps in a JobSet request can have parameters with the
same name, a parameter is therefore uniquely identified by both the
name and the step ID. ESS prepends the step ID to the name in the
form of stepId:name
to generate the unique identifier
with ":" being the separator. Clients should use the
NAME_SEPARATOR
constant rather than hard-coding a name seperator.
Using RequestParameters with RuntimeService
Request parameters may be passed to RuntimeService.submitRequest
when a request is submitted. A given parameter may represent an ESS
system property or an application-specific parameter. The parameter
may be used to override a parameter specified in metadata, or specify
the value for a parameter not previously defined in metatadata.
The submitRequest
method will validate each request parameter
against its definition in the metadata, if one exists. Such validations
include checking the data type of the parameter against the data type
specified in the metadata, checking the read-only constraint for the
parameter, and so on. If a given request parameter does not exist in the
corresponding metadata, the data type for the parameter is determined by
doing an instanceof
on the parameter value.
The data type of a request parameter value must be one of the supported
types specified by ParameterInfo.DataType
.
In general, the value of a request parameter can be null
.
However, if submitRequest
is called with a null parameter,
then that parameter must have been defined in metatdata in order for
ESS to be able to associate a data type with the parameter.
RuntimeService
,
Serialized FormField Summary | |
---|---|
static java.lang.String |
NAME_SEPARATOR
Separator used to concatenate step ID and parameter name for JobSet requests. |
Constructor Summary | |
---|---|
RequestParameters()
Constructs a new instance. |
|
RequestParameters(RequestParameters source)
Constructs an instance with the same parameter mappings as the specified object. |
Method Summary | |
---|---|
void |
add(java.lang.String name,
java.lang.Object value)
Adds a request parameter to this object. |
void |
add(java.lang.String name,
java.lang.String stepId,
java.lang.Object value)
Adds a request parameter for the specified step in a JobSet request to this object. |
void |
clear()
Removes all parameter information from this object. |
boolean |
contains(java.lang.String name)
Checks if this object contains a parameter for the specified name. |
boolean |
contains(java.lang.String name,
java.lang.String stepId)
Checks if a parameter for a given name and step exist. |
static RequestParameters |
from(javax.management.openmbean.CompositeData cd)
Create an instance of the model specific class out of an associated CompositeData instance |
java.util.Collection<java.lang.String> |
getNames()
Returns a collection of all the parameter names. |
java.util.Collection<java.lang.String> |
getNames(java.lang.String stepId)
Returns a collection of all the parameter names for a step ID. |
java.lang.Object |
getValue(java.lang.String name)
Gets the value of the specifed parameter. |
java.lang.Object |
getValue(java.lang.String name,
java.lang.String stepId)
Returns the value of given parameter and step identifer. |
void |
remove(java.lang.String name)
Removes a parameter from this object. |
void |
remove(java.lang.String name,
java.lang.String stepId)
Removes a parameter uniquely identified by a step ID and parameter name. |
javax.management.openmbean.CompositeData |
toCompositeData(javax.management.openmbean.CompositeType ct)
Convert an instance of this model specific type to a CompositeData. |
static javax.management.openmbean.CompositeType |
toCompositeType()
Returns the CompositeType that describes this model specific class |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NAME_SEPARATOR
Constructor Detail |
---|
public RequestParameters()
public RequestParameters(RequestParameters source)
source
- the source parameters to be placed in this object
java.lang.NullPointerException
- if the specified list is null
.Method Detail |
---|
public void add(java.lang.String name, java.lang.Object value)
name
- the name of the parameter.value
- the value of the parameter. This can be null
.public void add(java.lang.String name, java.lang.String stepId, java.lang.Object value)
name
- the name of the parameter.stepId
- the identifier of the step to which this parameter
applies.value
- the value of the parameter. This can be null
.public boolean contains(java.lang.String name)
name
- the name of the parameter to check.
true
if the parameter exists, false
otherwise.public boolean contains(java.lang.String name, java.lang.String stepId)
name
- the name of the parameter to check.stepId
- the identifier of the step for which the parmeter
is checked.
true
if the parameter exists, false
otherwise.public java.lang.Object getValue(java.lang.String name)
name
argument.
This returns
null
if this object does not contain
such a parameter. Since null
is a valid parameter value,
the contains
method should be used to verify whether this
object contains such a parameter.
If this method is called for the parameter of a JobSet request,
it effectively looks for global parameter (not scoped to any stepId),
unless the name
argument is the format of
stepId:name
.
name
- the name of the parameter whose value is to be returned.
null
if the parameter value is null, or if no such parameter exists.public java.lang.Object getValue(java.lang.String name, java.lang.String stepId)
This returns
null
if this object does not contain
such a parameter. Since null
is a valid parameter value,
the contains
method should be used to verify whether this
object contains such a parameter.
name
- the name of the parameter whose value is to be returned.stepId
- the identifier of the step for which the parameter
applies.
null
if the parameter value is null, or if no such parameter exists.public java.util.Collection<java.lang.String> getNames()
If the method is called for a JobSet request, parameters for all the
steps are returned. The names will therefore be returned in the
format stepId:name
where applicable. A name without a stepId
portion is considered to be global/shared parameter for the
JobSet request.
public java.util.Collection<java.lang.String> getNames(java.lang.String stepId)
If the method is called for a JobSet request, parameters for all the
steps are returned. The names will therefore be returned in the
format stepId:name
where applicable. A name without stepId is
thus a global/shared parameter for the JobSet request.
public void remove(java.lang.String name)
For a JobSet request, a stepId:name
format is used to
identify a unique parameter for a stepId, unless its a global
parameter.
name
- the parameter to be removed.public void remove(java.lang.String name, java.lang.String stepId)
For a JobSet request, a stepId:name
format is used to
identify a unique parameter for a stepId, unless its a global
parameter.
name
- the parameter to be removed.stepId
- the step ID for which the parameter applies.public void clear()
public static javax.management.openmbean.CompositeType toCompositeType()
public javax.management.openmbean.CompositeData toCompositeData(javax.management.openmbean.CompositeType ct)
ct
- This parameter is there only for future compatibility reasons
with JDK 6.0. It can be ignored at this point.public static RequestParameters from(javax.management.openmbean.CompositeData cd) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public java.lang.String toString()
toString
in class java.lang.Object
|
Oracle Fusion Applications Java API Reference for Oracle Enterprise Scheduler Service 11g Release 1 (11.1.1.6) E20742-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |