Oracle Fusion Applications Java API Reference for Oracle Enterprise Scheduler Service
11g Release 1 (11.1.1.5)
E20742-01


oracle.as.scheduler
Class RequestParameters

java.lang.Object
  extended by oracle.as.scheduler.RequestParameters
All Implemented Interfaces:
java.io.Serializable

public class RequestParameters
extends java.lang.Object
implements java.io.Serializable

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.

See Also:
RuntimeService, Serialized Form

Field 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

NAME_SEPARATOR

public static final java.lang.String NAME_SEPARATOR
Separator used to concatenate step ID and parameter name for JobSet requests.

See Also:
Constant Field Values
Constructor Detail

RequestParameters

public RequestParameters()
Constructs a new instance.


RequestParameters

public RequestParameters(RequestParameters source)
Constructs an instance with the same parameter mappings as the specified object.

Parameters:
source - the source parameters to be placed in this object
Throws:
java.lang.NullPointerException - if the specified list is null.
Method Detail

add

public void add(java.lang.String name,
                java.lang.Object value)
Adds a request parameter to this object.

Parameters:
name - the name of the parameter.
value - the value of the parameter. This can be null.

add

public 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.

Parameters:
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.

contains

public boolean contains(java.lang.String name)
Checks if this object contains a parameter for the specified name.

Parameters:
name - the name of the parameter to check.
Returns:
true if the parameter exists, false otherwise.

contains

public boolean contains(java.lang.String name,
                        java.lang.String stepId)
Checks if a parameter for a given name and step exist.

Parameters:
name - the name of the parameter to check.
stepId - the identifier of the step for which the parmeter is checked.
Returns:
true if the parameter exists, false otherwise.

getValue

public java.lang.Object getValue(java.lang.String name)
Gets the value of the specifed parameter. This method retrieves the value for the parameter using exactly the value specified by the 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.

Parameters:
name - the name of the parameter whose value is to be returned.
Returns:
the value of the parameter. This will be null if the parameter value is null, or if no such parameter exists.

getValue

public java.lang.Object getValue(java.lang.String name,
                                 java.lang.String stepId)
Returns the value of given parameter and step identifer. The concatenation of the stepID and name is used to generate the unique name for the parameter being returned.

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.

Parameters:
name - the name of the parameter whose value is to be returned.
stepId - the identifier of the step for which the parameter applies.
Returns:
the value of the parameter. This will be null if the parameter value is null, or if no such parameter exists.

getNames

public java.util.Collection<java.lang.String> getNames()
Returns a collection of all the parameter names. This is useful for iterating over the parameters.

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.

Returns:
a collection of all the parameter contained by this object.

getNames

public java.util.Collection<java.lang.String> getNames(java.lang.String stepId)
Returns a collection of all the parameter names for a step ID. This is useful for iterating over the parameters.

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.

Returns:
a collection of all the parameter contained by this object.

remove

public void remove(java.lang.String name)
Removes a parameter from this object. The name should uniquely identify a parameter contained in this object.

For a JobSet request, a stepId:name format is used to identify a unique parameter for a stepId, unless its a global parameter.

Parameters:
name - the parameter to be removed.

remove

public void remove(java.lang.String name,
                   java.lang.String stepId)
Removes a parameter uniquely identified by a step ID and parameter name. This is typically used to remove a parameter from a JobSet parameter bundle.

For a JobSet request, a stepId:name format is used to identify a unique parameter for a stepId, unless its a global parameter.

Parameters:
name - the parameter to be removed.
stepId - the step ID for which the parameter applies.

clear

public void clear()
Removes all parameter information from this object.


toCompositeType

public static javax.management.openmbean.CompositeType toCompositeType()
Returns the CompositeType that describes this model specific class


toCompositeData

public javax.management.openmbean.CompositeData toCompositeData(javax.management.openmbean.CompositeType ct)
Convert an instance of this model specific type to a CompositeData. This ensure that clients that do not have access to the model specific class can still use the MBean. The MXBean framework can perform this conversion automatically. However MXBeans are part of JDK 6.0 and AS11g is required to support JDK 5.0

Parameters:
ct - This parameter is there only for future compatibility reasons with JDK 6.0. It can be ignored at this point.

from

public static RequestParameters from(javax.management.openmbean.CompositeData cd)
                              throws java.lang.IllegalArgumentException
Create an instance of the model specific class out of an associated CompositeData instance

Throws:
java.lang.IllegalArgumentException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Oracle Fusion Applications Java API Reference for Oracle Enterprise Scheduler Service
11g Release 1 (11.1.1.5)
E20742-01


Copyright © 2008, 2011 Oracle. All rights reserved.