Skip navigation links

Oracle Enterprise Scheduler Java API Reference
11g Release 1 (11.1.1.7)
E26229-06


oracle.as.scheduler
Class JobSet

java.lang.Object
  extended by oracle.as.scheduler.BaseMetadata<JobSet>
      extended by oracle.as.scheduler.JobSet

All Implemented Interfaces:
java.io.Serializable

public class JobSet
extends BaseMetadata<JobSet>
implements java.io.Serializable

This class represents a JobSet. A JobSet is a collection of JobDefinitions or other JobSet definitions grouped together to run as a single unit in the scheduling system. Every JobDefinition or JobSet definition included within a given JobDefinition is known as step.

Steps within a JobSet can run either in serial or in parallel mode. In case of serial execution, the JobSet also supports conditional branching based on the execution status of the previous step. For example within a serial JobSet JS, consisting of JobDefinitions J1, J2, and J3, the step J2 can be defined to run if and only if J1 completes successfully. Similarly J3 can be defined to run if J2 finishes with Success or Warning.

See Also:
Serialized Form

Nested Class Summary
static class JobSet.ExecutionMode
          Enums to indicate the execution mode for the JobSet.

 

Field Summary
static java.lang.String STEPID_DELIMITER
           

 

Constructor Summary
JobSet(java.lang.String name, java.lang.String description, JobSet.ExecutionMode mode)
          Constructs a JobSet with basic attributes.
JobSet(java.lang.String name, java.lang.String description, JobSet.ExecutionMode mode, MetadataObjectId objectId)
          Constructs a JobSet.
JobSet(java.lang.String name, java.lang.String description, JobSet.ExecutionMode mode, ParameterList parameters, JobSetStep[] steps)
          Constructs a nearly fully defined JobSet.
JobSet(java.lang.String name, java.lang.String description, JobSet.ExecutionMode mode, ParameterList parameters, JobSetStep[] steps, java.lang.String firstStep)
          Constructs a fully defined JobSet.
JobSet(java.lang.String name, java.lang.String displayName, java.lang.String description, JobSet.ExecutionMode mode, MetadataObjectId objectId)
          Constructs a JobSet.
JobSet(java.lang.String name, java.lang.String displayNameKey, java.lang.String descriptionKey, JobSet.ExecutionMode mode, ParameterList parameters, JobSetStep[] steps, java.lang.String[] resourceBundleIDs)
          Constructs a nearly fully defined JobSet.
JobSet(java.lang.String name, java.lang.String displayNameKey, java.lang.String descriptionKey, JobSet.ExecutionMode mode, ParameterList parameters, JobSetStep[] steps, java.lang.String firstStep, java.lang.String[] resourceBundleIDs)
          Constructs a fully defined JobSet and associate the JobSet definition with a set of resource bundles.
JobSet(java.lang.String name, java.lang.String displayNameKey, java.lang.String descriptionKey, JobSet.ExecutionMode mode, java.lang.String[] resourceBundleIDs)
          Constructs a JobSet with basic attributes.

 

Method Summary
 void addStep(JobSetStep step)
          Adds the given step to this JobSet.
 JobSet clone(java.lang.String newName)
           
 JobSetStep deleteStep(java.lang.String stepId)
          Deletes the JobSet step with the given step id.
 boolean equals(java.lang.Object obj)
          Compares an object for equality with this JobSet object.
static JobSet from(javax.management.openmbean.CompositeData cd)
          Create an instance of the model specific class out of an associated CompositeData instance
 java.util.HashMap<java.lang.String,JobSetStep> getAllSteps()
          Returns a HashMap that contains all of the steps in this JobSet and all steps in any JobSet that is nested in this JobSet.
 BaseMetadataType<JobSet> getBaseMetadataType()
           
 JobSet.ExecutionMode getExecutionMode()
          Checks whether this JobSet is a serial or a parallel JobSet.
 java.lang.String getFirstStep()
          Returns the id of the first or starting step in a serial JobSet.
 java.util.HashMap<java.lang.String,JobSetStep> getJobSetSteps()
          Deprecated. Replaced by getJsSteps()
 java.util.List<JobSetStep> getJsSteps()
          Returns a List that contains the steps in this JobSet.
 ParameterList getParameters()
          Returns all the parameters defined for this JobSet
protected  JobSet getSelf()
           
 JobSetStep getStep(java.lang.String stepId)
          Gets the JobSet step with the given step id.
 org.w3c.dom.Document getSteps()
          Deprecated. Replaced by getJsSteps().
 void setExecutionMode(JobSet.ExecutionMode mode)
          Sets the JobSet execution mode to either serial or parallel mode.
 void setFirstStep(java.lang.String firstStep)
          Sets the unique id of the first step to run for a serial JobSet.
 void setJobSetSteps(JobSetStep[] steps)
          Deprecated. Replaced by setJsSteps(JobSetStep[]).
 void setJsSteps(JobSetStep[] steps)
          Sets the steps for this jobset to the given steps.
 void setParameters(ParameterList params)
          Sets the parameters of this JobSet.
 void setSteps(org.w3c.dom.Document doc, java.lang.String firstStep)
          Deprecated. Replaced by setJsSteps(JobSetStep[]).
 javax.management.openmbean.CompositeData toCompositeData(javax.management.openmbean.CompositeType ct)
           
static javax.management.openmbean.CompositeType toCompositeType()
          Returns the CompositeType that describes this model specific class
 java.lang.String toDebugString()
          Returns a debug string representation for this JobSet object.
protected  void validateCustom()
          Validates this JobSet.
 void validateForExecution()
          Validates this JobSet for execution.

 

Methods inherited from class oracle.as.scheduler.BaseMetadata
from, getDescription, getDescriptionKey, getDisplayName, getDisplayNameKey, getMessages, getMetadataObjectId, getName, getResourceBundles, hashCode, localize, setDescription, setDescriptionKey, setDisplayName, setDisplayNameKey, setResourceBundles, toCompositeData, toString, validate

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

 

Field Detail

STEPID_DELIMITER

public static final java.lang.String STEPID_DELIMITER
See Also:
Constant Field Values

Constructor Detail

JobSet

public JobSet(java.lang.String name,
              java.lang.String description,
              JobSet.ExecutionMode mode)
Constructs a JobSet with basic attributes.
Parameters:
name - name of the JobSet definition to be created. The name is also used as the default display name unless otherwise specifially set.
description - optional description for the JobSet definition. A null value is acceptable.
mode - true for serial JobSet, false for parallel JobSet.

JobSet

public JobSet(java.lang.String name,
              java.lang.String displayNameKey,
              java.lang.String descriptionKey,
              JobSet.ExecutionMode mode,
              java.lang.String[] resourceBundleIDs)
Constructs a JobSet with basic attributes.
Parameters:
name - name of the JobSet definition to be created. The name is also used as the default display name unless otherwise specifially set.
displayNameKey - the key of the entry in the resourcebundles to lookup the name. Optional.
descriptionKey - the key of the entry in the resourcebundles to lookup the description. Optional.
mode - true for serial JobSet, false for parallel JobSet.
resourceBundleIDs - an array of resource bundle id. Optional.

JobSet

public JobSet(java.lang.String name,
              java.lang.String description,
              JobSet.ExecutionMode mode,
              MetadataObjectId objectId)
Constructs a JobSet. This constructor is for internal use ONLY and should not be used to construct a new instance. This constructor is used internally by the MetadataService to populate the unique identifier of this object(definition) within the metadata repository.
Parameters:
name - name of the JobSet definition to be created. The name is also used as the default display name unless otherwise specifially set.
description - optional description for the JobSet definition. A null value is acceptable.
mode - true for serial JobSet, false for parallel JobSet.
objectId - unique identifier of this object in the metadata repository. The identifier is set which this object is retrieved via MetadataService.

JobSet

public JobSet(java.lang.String name,
              java.lang.String displayName,
              java.lang.String description,
              JobSet.ExecutionMode mode,
              MetadataObjectId objectId)
Constructs a JobSet. This constructor is for internal use ONLY and should not be used to construct a new instance. This constructor is used internally by the MetadataService to populate the unique identifier of this object(definition) within the metadata repository.
Parameters:
name - name of the JobSet definition to be created.
description - optional description for the JobSet definition. A null value is acceptable.
mode - true for serial JobSet, false for parallel JobSet.
objectId - unique identifier of this object in the metadata repository. The identifier is set which this object is retrieved via MetadataService.

JobSet

public JobSet(java.lang.String name,
              java.lang.String description,
              JobSet.ExecutionMode mode,
              ParameterList parameters,
              JobSetStep[] steps)
Constructs a nearly fully defined JobSet. If the JobSet is serial, the first step must be set by calling setFirstStep.
Parameters:
name - name for the JobSet definition to be created. The name is also used as the default display name unless otherwise specifially set.
description - optional description field for the JobSet.
mode - flag to indicate execution mode, true must be passed for a serial JobSet, false for parallel JobSet.
parameters - Parameters declared at the JobSet level.
steps - array of JobSetStep objects that represent the steps for this jobset. This is required for a Serial JobSet. The step id must be a valid step id from within the XML document specifying the steps.

JobSet

public JobSet(java.lang.String name,
              java.lang.String displayNameKey,
              java.lang.String descriptionKey,
              JobSet.ExecutionMode mode,
              ParameterList parameters,
              JobSetStep[] steps,
              java.lang.String[] resourceBundleIDs)
Constructs a nearly fully defined JobSet. If the JobSet is serial, the first step must be set by calling setFirstStep.
Parameters:
name - name of the JobSet definition to be created. The name is also used as the default display name unless otherwise specifially set.
displayNameKey - the key of the entry in the resourcebundles to lookup the name. Optional.
descriptionKey - the key of the entry in the resourcebundles to lookup the description. Optional.
mode - flag to indicate execution mode, true must be passed for a serial JobSet, false for parallel JobSet.
parameters - Parameters declared at the JobSet level.
steps - array of JobSetStep objects that represent the steps for this jobset.
resourceBundleIDs - an array of resource bundle id. Optional This is required for a Serial JobSet. The step id must be a valid step id from within the XML document specifying the steps.

JobSet

public JobSet(java.lang.String name,
              java.lang.String description,
              JobSet.ExecutionMode mode,
              ParameterList parameters,
              JobSetStep[] steps,
              java.lang.String firstStep)
Constructs a fully defined JobSet.
Parameters:
name - name for the JobSet definition to be created. The name is also used as the default display name unless otherwise specifially set.
description - optional description field for the JobSet.
mode - flag to indicate execution mode, true must be passed for a serial JobSet, false for parallel JobSet.
parameters - Parameters declared at the JobSet level.
steps - array of JobSetStep objects that represent the steps for this jobset.
firstStep - unique identifier of the step where execution begins for a serial jobset. This parameter is ignored for a parallel jobset.

JobSet

public JobSet(java.lang.String name,
              java.lang.String displayNameKey,
              java.lang.String descriptionKey,
              JobSet.ExecutionMode mode,
              ParameterList parameters,
              JobSetStep[] steps,
              java.lang.String firstStep,
              java.lang.String[] resourceBundleIDs)
Constructs a fully defined JobSet and associate the JobSet definition with a set of resource bundles.
Parameters:
name - name of the JobSet definition to be created. The name is also used as the default display name unless otherwise specifially set.
displayNameKey - the key of the entry in the resourcebundles to lookup the name. Optional.
descriptionKey - the key of the entry in the resourcebundles to lookup the description. Optional.
mode - flag to indicate execution mode, true must be passed for a serial JobSet, false for parallel JobSet.
parameters - Parameters declared at the JobSet level.
steps - array of JobSetStep objects that represent the steps for this jobset.
firstStep - unique identifier of the step where execution begins for a serial jobset. This parameter is ignored for a parallel jobset.
resourceBundleIDs - an array of resource bundle id. Optional

Method Detail

getExecutionMode

public JobSet.ExecutionMode getExecutionMode()
Checks whether this JobSet is a serial or a parallel JobSet.
Returns:
execution mode of this JobSet (serial or parallel)

setExecutionMode

public void setExecutionMode(JobSet.ExecutionMode mode)
Sets the JobSet execution mode to either serial or parallel mode.
Parameters:
mode - execution mode to be set (serial or parallel).

getParameters

public ParameterList getParameters()
Returns all the parameters defined for this JobSet
Returns:
instance of ParameterList containing all the parameters.

setParameters

public void setParameters(ParameterList params)
Sets the parameters of this JobSet.
Parameters:
params - instance of ParameterList containing all the parameters.

getSteps

@Deprecated
public org.w3c.dom.Document getSteps()
Deprecated. Replaced by getJsSteps().
Retrieves the details of all the steps in this JobSet definition. The details are returned in the form of XML fragment that comply with the corresponding XML Schema.
Returns:
XML fragment containing steps of this JobSet.

setFirstStep

public void setFirstStep(java.lang.String firstStep)
Sets the unique id of the first step to run for a serial JobSet.

Note that the first step is ignored for a parallel JobSet.

Parameters:
firstStep - unique step id where serial JobSet execution starts.

getFirstStep

public java.lang.String getFirstStep()
Returns the id of the first or starting step in a serial JobSet.

Note that the first step is ignored for a parallel JobSet.

Returns:
step Id of the first (starting) step for a serial jobset.

setSteps

@Deprecated
public void setSteps(org.w3c.dom.Document doc,
                                java.lang.String firstStep)
Deprecated. Replaced by setJsSteps(JobSetStep[]).
Sets the steps and the details of the steps for this JobSet. All details should be specified in an XML fragment that comply with the corresponding XML schema.
Parameters:
doc - the XML fragment containing the details of JobSet.
firstStep - the valid step Id from within the XML fragment that indicates the first step. Required only for a Serial JobSet. For parallel JobSet, it can be null.

addStep

public void addStep(JobSetStep step)
             throws ValidationException
Adds the given step to this JobSet.
Parameters:
step - the step to add.
Throws:
ValidationException - if the step id already exists in this JobSet.

getStep

public JobSetStep getStep(java.lang.String stepId)
Gets the JobSet step with the given step id.
Parameters:
stepId - the id of the step to get.
Returns:
requested JobSetStep or null if the step does not exist.

deleteStep

public JobSetStep deleteStep(java.lang.String stepId)
Deletes the JobSet step with the given step id.
Parameters:
stepId - the id of the step to delete.
Returns:
the deleted step or null if the step does not exist.

getAllSteps

public java.util.HashMap<java.lang.String,JobSetStep> getAllSteps()
                                                           throws MetadataNotFoundException,
                                                                  MetadataServiceException
Returns a HashMap that contains all of the steps in this JobSet and all steps in any JobSet that is nested in this JobSet.
Returns:
HashMap that maps fully qualified stepId (sequence of step names delimited with STEPID_DELIMITER) to JobSetStep and includes all steps in this JobSet and any nested jobsets.
Throws:
MetadataNotFoundException - if any nested JobSet definition does not exist.
MetadataServiceException - if the metadata subsystem encounters an error.

getJobSetSteps

@Deprecated
public java.util.HashMap<java.lang.String,JobSetStep> getJobSetSteps()
Deprecated. Replaced by getJsSteps()
Returns a HashMap that contains the steps in this JobSet. Note that order is not defined for the steps and may be different on a subsequent call.

Note that steps in nested jobsets are not included. To include all nested steps, use getAllSteps().

Returns:
HashMap that maps stepId to JobSetStep.

getJsSteps

public java.util.List<JobSetStep> getJsSteps()
Returns a List that contains the steps in this JobSet. The steps are returned in the order that they were added to this jobset.

Note that steps in nested jobsets are not included. To include all nested steps, use getAllSteps().

Returns:
ordered List of steps in this JobSetStep.
See Also:
setJsSteps(JobSetStep[])

setJsSteps

public void setJsSteps(JobSetStep[] steps)
                throws ValidationException
Sets the steps for this jobset to the given steps. Any steps already in the jobset will be replaced. If the JobSet is serial, the first step must be set after this by calling setFirstStep.
Parameters:
steps - array of JobSetStep objects to set as the steps for this jobset.
Throws:
ValidationException - if the step ids are not unique.
See Also:
getJsSteps()

setJobSetSteps

@Deprecated
public void setJobSetSteps(JobSetStep[] steps)
Deprecated. Replaced by setJsSteps(JobSetStep[]).
Sets the steps for this jobset to the given steps. Any steps already in the jobset will be replaced.
Parameters:
steps - array of JobSetStep objects to set as the steps for this jobset.

validateCustom

protected void validateCustom()
                       throws ValidationException
Validates this JobSet. The method checks for completeness and correctness of this instance. Performs only those validations that are possible just on this instance.

The method does not validate the actual existence of the JobDefinition or other JobSet definitions referenced by this JobSet in its steps. Such validations are performed when the JobSet is persisted via the MetadataService.

Specified by:
validateCustom in class BaseMetadata<JobSet>
Throws:
ValidationException - if any validation errors occur.

validateForExecution

public void validateForExecution()
                          throws ValidationException
Validates this JobSet for execution. Performs normal jobset validation and performs additional validation to ensure the jobset is valid for execution.
Throws:
ValidationException - if any validation errors occur.

equals

public boolean equals(java.lang.Object obj)
Compares an object for equality with this JobSet object.
Overrides:
equals in class java.lang.Object
Parameters:
obj - object to compare with this JobSet.
Returns:
true if the object passed in is an instance of JobSet and is equal to this JobSet, false otherwise.

toDebugString

public java.lang.String toDebugString()
Returns a debug string representation for this JobSet object.
Returns:
String representation of this JobSet.

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)
Specified by:
toCompositeData in class BaseMetadata<JobSet>

from

public static JobSet 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

getSelf

protected JobSet getSelf()
Specified by:
getSelf in class BaseMetadata<JobSet>

getBaseMetadataType

public BaseMetadataType<JobSet> getBaseMetadataType()
Specified by:
getBaseMetadataType in class BaseMetadata<JobSet>

clone

public JobSet clone(java.lang.String newName)
             throws ValidationException
Specified by:
clone in class BaseMetadata<JobSet>
Throws:
ValidationException

Skip navigation links

Oracle Enterprise Scheduler Java API Reference
11g Release 1 (11.1.1.7)
E26229-06


Copyright © 2008, 2013, Oracle and/or its affiliates. All rights reserved.