Oracle® Data Integrator Java API Reference
11g Release 1 (11.1.1.3.0)

E17060-01

oracle.odi.domain.runtime.ess.support
Class JobDefinitionRepositoryImpl

java.lang.Object
  extended by oracle.odi.domain.runtime.ess.support.JobDefinitionRepositoryImpl
All Implemented Interfaces:
IJobDefinitionRepository

public final class JobDefinitionRepositoryImpl
extends java.lang.Object
implements IJobDefinitionRepository

Default IJobDefinitionRepository implementation, storing / querying ESS metadata according connection information from provided OdiEnterpriseScheduler.

This implementation makes every methods participate in surrounding ODI transaction, if one exists, using transaction synchronization mechanism.


Constructor Summary
JobDefinitionRepositoryImpl(OdiInstance pOdiInstance, OdiEnterpriseScheduler pEnterpriseScheduler)
          Constructs a JobDefinitionRepositoryImpl object.
 
Method Summary
 oracle.as.scheduler.JobDefinition createNewJobDefinition(java.lang.String pJobName, OdiScenario pScenario, StartupParameters pVariables)
          Create an store a new ODI job definition for the given scenario and execution variables.
 oracle.as.scheduler.JobDefinition createNewJobDefinition(java.lang.String pJobName, OdiScenario pScenario, StartupParameters pVariables, java.lang.Integer pLogLevel, OdiLogicalAgent pAgent, OdiContext pExecutionContext, java.lang.String pRunAsId, boolean pIsAsync)
          Create an store a new ODI job definition for the given scenario and execution parameters.
 oracle.as.scheduler.JobDefinition createNewJobDefinition(java.lang.String pJobName, OdiScenario pScenario, StartupParameters pVariables, java.lang.Integer pLogLevel, OdiLogicalAgent pAgent, OdiContext pExecutionContext, java.lang.String pOdiUsername, oracle.odi.domain.Password pOdiPassword)
          Create an store a new ODI job definition for the given scenario and execution parameters.
 oracle.as.scheduler.JobDefinition createNewJobDefinition(java.lang.String pJobName, OdiScenario pScenario, StartupParameters pVariables, java.lang.String pRunAsId, boolean pIsAsync)
          Create an store a new ODI job definition for the given scenario and execution variables.
 oracle.as.scheduler.JobDefinition createNewJobDefinition(java.lang.String pJobName, java.lang.String pScenarioName, java.lang.String pScenarioVersion, StartupParameters pVariables)
          Same as IJobDefinitionRepository.createNewJobDefinition(String, OdiScenario, StartupParameters), but allow for specification of the scenario using its name and version (which are unique key for OdiScenarios).
 oracle.as.scheduler.JobDefinition createNewJobDefinition(java.lang.String pJobName, java.lang.String pScenarioName, java.lang.String pScenarioVersion, StartupParameters pVariables, java.lang.Integer pLogLevel, java.lang.String pLogicalAgentName, java.lang.String pContextCode, java.lang.String pRunAsId, boolean pIsAsync)
          Same as IJobDefinitionRepository.createNewJobDefinition(String, OdiScenario, StartupParameters, Integer, OdiLogicalAgent, OdiContext, String, Password) but allow for specification of the scenario, agent and context using their unique key and code.
 oracle.as.scheduler.JobDefinition createNewJobDefinition(java.lang.String pJobName, java.lang.String pScenarioName, java.lang.String pScenarioVersion, StartupParameters pVariables, java.lang.Integer pLogLevel, java.lang.String pLogicalAgentName, java.lang.String pContextCode, java.lang.String pOdiUsername, oracle.odi.domain.Password pOdiPassword)
          Same as IJobDefinitionRepository.createNewJobDefinition(String, OdiScenario, StartupParameters, Integer, OdiLogicalAgent, OdiContext, String, Password) but allow for specification of the scenario, agent and context using their unique key and code.
 oracle.as.scheduler.JobDefinition createNewJobDefinition(java.lang.String pJobName, java.lang.String pScenarioName, java.lang.String pScenarioVersion, StartupParameters pVariables, java.lang.String pRunAsId, boolean pIsAsync)
          Same as IJobDefinitionRepository.createNewJobDefinition(String, OdiScenario, StartupParameters), but allow for specification of the scenario using its name and version (which are unique key for OdiScenarios).
 java.util.Collection<oracle.as.scheduler.JobDefinition> getAllJobDefinitions()
          Returns the all job definitions.
 oracle.as.scheduler.JobDefinition getJobDefinitionForId(oracle.as.scheduler.MetadataObjectId pJobId)
          Obtains the job definition with the given ID from this repository instance.
 oracle.as.scheduler.JobDefinition getJobDefinitionForName(java.lang.String pJobName)
          Obtains the job definition with the given name from this repository instance.
 java.util.Collection<oracle.as.scheduler.JobDefinition> getJobDefinitionForScenario(OdiScenario pScenario)
          Returns the job definitions for scenario.
 java.util.Collection<oracle.as.scheduler.JobDefinition> getJobDefinitionsForScenarioNameAndVersion(java.lang.String pName, java.lang.String pVersion)
          Returns the job definitions for scenario.
 void removeJobDefinition(oracle.as.scheduler.JobDefinition pJobDefinition)
          Remove the given job definition from this repository instance.
 void updateJobDefinition(oracle.as.scheduler.JobDefinition pJobDefinition)
          Update the given job definition from this repository instance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobDefinitionRepositoryImpl

public JobDefinitionRepositoryImpl(OdiInstance pOdiInstance,
                                   OdiEnterpriseScheduler pEnterpriseScheduler)
Constructs a JobDefinitionRepositoryImpl object.

Parameters:
pOdiInstance - an OdiInstance object
pEnterpriseScheduler - an OdiEnterpriseScheduler object
Method Detail

createNewJobDefinition

public oracle.as.scheduler.JobDefinition createNewJobDefinition(java.lang.String pJobName,
                                                                OdiScenario pScenario,
                                                                StartupParameters pVariables)
                                                         throws DuplicateJobDefinitionException
Description copied from interface: IJobDefinitionRepository
Create an store a new ODI job definition for the given scenario and execution variables.

That is the common method to be used in order to create a design time job definition. Specific execution / runtime parameters like execution agent, execution context, ODI user, etc. have to be defined at job submission time.

Note: for consistency with the current IRepositoryDefinition used to access the domain layer, this method sets job's work repository parameter with the current one using IRepositoryDefinition.getWorkRepositoryName(). However that job parameter can be overrided at job submission time for specific use case where job definitions and scenarios have been exported and imported from an ODI / ESS environment to another one and possibly having another work repository name.

Specified by:
createNewJobDefinition in interface IJobDefinitionRepository
Parameters:
pJobName - the name of the ESS job
pScenario - the ODI scenario to be executed when submitting that job
pVariables - the execution variables to be used during execution of the specified scenario
Returns:
ESS job definition for the given parameters
Throws:
DuplicateJobDefinitionException - if a job with the same name already exist

createNewJobDefinition

public oracle.as.scheduler.JobDefinition createNewJobDefinition(java.lang.String pJobName,
                                                                OdiScenario pScenario,
                                                                StartupParameters pVariables,
                                                                java.lang.Integer pLogLevel,
                                                                OdiLogicalAgent pAgent,
                                                                OdiContext pExecutionContext,
                                                                java.lang.String pRunAsId,
                                                                boolean pIsAsync)
                                                         throws DuplicateJobDefinitionException
Description copied from interface: IJobDefinitionRepository
Create an store a new ODI job definition for the given scenario and execution parameters.

Overload IJobDefinitionRepository.createNewJobDefinition(String, OdiScenario, StartupParameters) to allow specification of runtime job parameters like execution agent, execution context, ODI user, etc. However those parameters can still be overrided at job submission time.

Specified by:
createNewJobDefinition in interface IJobDefinitionRepository
Parameters:
pJobName - the ESS job name
pScenario - the ODI scenario to be executed
pVariables - the execution variables to be used during execution of the specified scenario
pLogLevel - log level of the execution
pAgent - target logical agent where to execute the specified scenario
pExecutionContext - ODI execution context for the specified agent and scenario
pRunAsId - applicationId to runAs, if null, runs as submitting user
pIsAsync - whether execution is asynchronous or not
Returns:
ESS job definition for the given parameters
Throws:
DuplicateJobDefinitionException - if a job with the same name already exist
See Also:
IJobDefinitionRepository.createNewJobDefinition(String, OdiScenario, StartupParameters)

createNewJobDefinition

public oracle.as.scheduler.JobDefinition createNewJobDefinition(java.lang.String pJobName,
                                                                OdiScenario pScenario,
                                                                StartupParameters pVariables,
                                                                java.lang.Integer pLogLevel,
                                                                OdiLogicalAgent pAgent,
                                                                OdiContext pExecutionContext,
                                                                java.lang.String pOdiUsername,
                                                                oracle.odi.domain.Password pOdiPassword)
                                                         throws DuplicateJobDefinitionException
Description copied from interface: IJobDefinitionRepository
Create an store a new ODI job definition for the given scenario and execution parameters.

Overload IJobDefinitionRepository.createNewJobDefinition(String, OdiScenario, StartupParameters) to allow specification of runtime job parameters like execution agent, execution context, ODI user, etc. However those parameters can still be overrided at job submission time.

Specified by:
createNewJobDefinition in interface IJobDefinitionRepository
Parameters:
pJobName - the ESS job name
pScenario - the ODI scenario to be executed
pVariables - the execution variables to be used during execution of the specified scenario
pLogLevel - log level of the execution
pAgent - target logical agent where to execute the specified scenario
pExecutionContext - ODI execution context for the specified agent and scenario
pOdiUsername - ODI username for execution
pOdiPassword - ODI password for execution
Returns:
ESS job definition for the given parameters
Throws:
DuplicateJobDefinitionException - if a job with the same name already exist
See Also:
IJobDefinitionRepository.createNewJobDefinition(String, OdiScenario, StartupParameters)

createNewJobDefinition

public oracle.as.scheduler.JobDefinition createNewJobDefinition(java.lang.String pJobName,
                                                                OdiScenario pScenario,
                                                                StartupParameters pVariables,
                                                                java.lang.String pRunAsId,
                                                                boolean pIsAsync)
                                                         throws DuplicateJobDefinitionException
Description copied from interface: IJobDefinitionRepository
Create an store a new ODI job definition for the given scenario and execution variables.

That is the common method to be used in order to create a design time job definition. Specific execution / runtime parameters like execution agent, execution context, ODI user, etc. have to be defined at job submission time.

Note: for consistency with the current IRepositoryDefinition used to access the domain layer, this method sets job's work repository parameter with the current one using IRepositoryDefinition.getWorkRepositoryName(). However that job parameter can be overrided at job submission time for specific use case where job definitions and scenarios have been exported and imported from an ODI / ESS environment to another one and possibly having another work repository name.

Specified by:
createNewJobDefinition in interface IJobDefinitionRepository
Parameters:
pJobName - the name of the ESS job
pScenario - the ODI scenario to be executed when submitting that job
pVariables - the execution variables to be used during execution of the specified scenario
pRunAsId - applicationId to runAs, if null, runs as submitting user
pIsAsync - whether execution is asynchronous or not
Returns:
ESS job definition for the given parameters
Throws:
DuplicateJobDefinitionException - if a job with the same name already exist

createNewJobDefinition

public oracle.as.scheduler.JobDefinition createNewJobDefinition(java.lang.String pJobName,
                                                                java.lang.String pScenarioName,
                                                                java.lang.String pScenarioVersion,
                                                                StartupParameters pVariables)
                                                         throws DuplicateJobDefinitionException
Description copied from interface: IJobDefinitionRepository
Same as IJobDefinitionRepository.createNewJobDefinition(String, OdiScenario, StartupParameters), but allow for specification of the scenario using its name and version (which are unique key for OdiScenarios).

Specified by:
createNewJobDefinition in interface IJobDefinitionRepository
Parameters:
pJobName - the name of the ESS job
pScenarioName - the name of the scenario to be executed when submitting that job
pScenarioVersion - the version of the scenario to be executed when submitting that job
pVariables - the execution variables to be used during execution of the specified scenario
Returns:
ESS job definition for the given parameters
Throws:
DuplicateJobDefinitionException - if a job with the same name already exist
See Also:
IJobDefinitionRepository.createNewJobDefinition(String, OdiScenario, StartupParameters)

createNewJobDefinition

public oracle.as.scheduler.JobDefinition createNewJobDefinition(java.lang.String pJobName,
                                                                java.lang.String pScenarioName,
                                                                java.lang.String pScenarioVersion,
                                                                StartupParameters pVariables,
                                                                java.lang.Integer pLogLevel,
                                                                java.lang.String pLogicalAgentName,
                                                                java.lang.String pContextCode,
                                                                java.lang.String pRunAsId,
                                                                boolean pIsAsync)
                                                         throws DuplicateJobDefinitionException
Description copied from interface: IJobDefinitionRepository
Same as IJobDefinitionRepository.createNewJobDefinition(String, OdiScenario, StartupParameters, Integer, OdiLogicalAgent, OdiContext, String, Password) but allow for specification of the scenario, agent and context using their unique key and code.

Specified by:
createNewJobDefinition in interface IJobDefinitionRepository
Parameters:
pJobName - the name of the ESS job
pScenarioName - the name of the scenario to be executed when submitting that job
pScenarioVersion - the version of the scenario to be executed when submitting that job
pVariables - the execution variables to be used during execution of the specified scenario
pLogLevel - log level of the execution
pLogicalAgentName - target logical agent where to execute the specified scenario
pContextCode - ODI execution context for the specified agent and scenario
pRunAsId - applicationId to runAs, if null, runs as submitting user
pIsAsync - whether execution is asynchronous or not
Returns:
ESS job definition for the given parameters
Throws:
DuplicateJobDefinitionException - if a job with the same name already exist
See Also:
IJobDefinitionRepository.createNewJobDefinition(String, OdiScenario, StartupParameters, Integer, OdiLogicalAgent, OdiContext, String, Password)

createNewJobDefinition

public oracle.as.scheduler.JobDefinition createNewJobDefinition(java.lang.String pJobName,
                                                                java.lang.String pScenarioName,
                                                                java.lang.String pScenarioVersion,
                                                                StartupParameters pVariables,
                                                                java.lang.Integer pLogLevel,
                                                                java.lang.String pLogicalAgentName,
                                                                java.lang.String pContextCode,
                                                                java.lang.String pOdiUsername,
                                                                oracle.odi.domain.Password pOdiPassword)
                                                         throws DuplicateJobDefinitionException
Description copied from interface: IJobDefinitionRepository
Same as IJobDefinitionRepository.createNewJobDefinition(String, OdiScenario, StartupParameters, Integer, OdiLogicalAgent, OdiContext, String, Password) but allow for specification of the scenario, agent and context using their unique key and code.

Specified by:
createNewJobDefinition in interface IJobDefinitionRepository
Parameters:
pJobName - the name of the ESS job
pScenarioName - the name of the scenario to be executed when submitting that job
pScenarioVersion - the version of the scenario to be executed when submitting that job
pVariables - the execution variables to be used during execution of the specified scenario
pLogLevel - log level of the execution
pLogicalAgentName - target logical agent where to execute the specified scenario
pContextCode - ODI execution context for the specified agent and scenario
pOdiUsername - ODI username for execution
pOdiPassword - ODI password for execution
Returns:
ESS job definition for the given parameters
Throws:
DuplicateJobDefinitionException - if a job with the same name already exist
See Also:
IJobDefinitionRepository.createNewJobDefinition(String, OdiScenario, StartupParameters, Integer, OdiLogicalAgent, OdiContext, String, Password)

createNewJobDefinition

public oracle.as.scheduler.JobDefinition createNewJobDefinition(java.lang.String pJobName,
                                                                java.lang.String pScenarioName,
                                                                java.lang.String pScenarioVersion,
                                                                StartupParameters pVariables,
                                                                java.lang.String pRunAsId,
                                                                boolean pIsAsync)
                                                         throws DuplicateJobDefinitionException
Description copied from interface: IJobDefinitionRepository
Same as IJobDefinitionRepository.createNewJobDefinition(String, OdiScenario, StartupParameters), but allow for specification of the scenario using its name and version (which are unique key for OdiScenarios).

Specified by:
createNewJobDefinition in interface IJobDefinitionRepository
Parameters:
pJobName - the name of the ESS job
pScenarioName - the name of the scenario to be executed when submitting that job
pScenarioVersion - the version of the scenario to be executed when submitting that job
pVariables - the execution variables to be used during execution of the specified scenario
pRunAsId - applicationId to runAs, if null, runs as submitting user
pIsAsync - whether execution is asynchronous or not
Returns:
ESS job definition for the given parameters
Throws:
DuplicateJobDefinitionException - if a job with the same name already exist
See Also:
IJobDefinitionRepository.createNewJobDefinition(String, OdiScenario, StartupParameters)

getAllJobDefinitions

public java.util.Collection<oracle.as.scheduler.JobDefinition> getAllJobDefinitions()
Returns the all job definitions.

Specified by:
getAllJobDefinitions in interface IJobDefinitionRepository
Returns:
all job definitions

getJobDefinitionForId

public oracle.as.scheduler.JobDefinition getJobDefinitionForId(oracle.as.scheduler.MetadataObjectId pJobId)
                                                        throws JobDefinitionNotFoundException
Description copied from interface: IJobDefinitionRepository
Obtains the job definition with the given ID from this repository instance.

Specified by:
getJobDefinitionForId in interface IJobDefinitionRepository
Parameters:
pJobId - the ID of the job
Returns:
job definition
Throws:
JobDefinitionNotFoundException - if not job found with the given ID

getJobDefinitionForName

public oracle.as.scheduler.JobDefinition getJobDefinitionForName(java.lang.String pJobName)
                                                          throws JobDefinitionNotFoundException
Description copied from interface: IJobDefinitionRepository
Obtains the job definition with the given name from this repository instance.

Specified by:
getJobDefinitionForName in interface IJobDefinitionRepository
Parameters:
pJobName - the name of the job
Returns:
job definition
Throws:
JobDefinitionNotFoundException - if no job found with the given name

getJobDefinitionForScenario

public java.util.Collection<oracle.as.scheduler.JobDefinition> getJobDefinitionForScenario(OdiScenario pScenario)
Returns the job definitions for scenario.

Specified by:
getJobDefinitionForScenario in interface IJobDefinitionRepository
Parameters:
pScenario - scenario
Returns:
the job definitions for scenario

getJobDefinitionsForScenarioNameAndVersion

public java.util.Collection<oracle.as.scheduler.JobDefinition> getJobDefinitionsForScenarioNameAndVersion(java.lang.String pName,
                                                                                                          java.lang.String pVersion)
Returns the job definitions for scenario.

Specified by:
getJobDefinitionsForScenarioNameAndVersion in interface IJobDefinitionRepository
Parameters:
pName - a String
pVersion - a String
Returns:
the job definitions for scenario

removeJobDefinition

public void removeJobDefinition(oracle.as.scheduler.JobDefinition pJobDefinition)
Description copied from interface: IJobDefinitionRepository
Remove the given job definition from this repository instance.

Note: if this repository doesn't contains this job, this method will simply return.

Specified by:
removeJobDefinition in interface IJobDefinitionRepository
Parameters:
pJobDefinition - the job to remove

updateJobDefinition

public void updateJobDefinition(oracle.as.scheduler.JobDefinition pJobDefinition)
                         throws JobDefinitionNotFoundException
Description copied from interface: IJobDefinitionRepository
Update the given job definition from this repository instance.

Specified by:
updateJobDefinition in interface IJobDefinitionRepository
Parameters:
pJobDefinition - the job to update
Throws:
JobDefinitionNotFoundException - if this repository doesn't contains this job

Oracle® Data Integrator Java API Reference
11g Release 1 (11.1.1.3.0)

E17060-01

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