Primavera Integration API 8.0

com.primavera.integration.client
Class JobManager

java.lang.Object
  extended by com.primavera.integration.client.JobManager

public class JobManager
extends Object

The Job Manager is retrieved for a particular session by calling Session.getJobManager(). The types of jobs supported in the API are: Schedule, Level, Summarize, Apply Actuals, Recalculate Assignment Costs, and Store Period Performance. All jobs are asynchronous, that is, they are submitted and the client code does not wait for them to complete. You can check the status of an asynchronous job initiated by the Integration API by calling getJobStatus().

An internal job type exists that is invoked when setting Project.LinkActualToActualThisPeriod to true, causing all actual-this-period values to be recalculated for the entire project. Although this job is not invoked using the JobManager, its status may be checked using the getCurrentJobs() and getJobStatus() methods. The type of this internal job is JobType.SYNC_ACTUAL_THIS_PERIOD.


Method Summary
 JobId applyActuals(Project project, Date newDataDate)
          Asynchronously applies actuals to a project.
 JobStatus cancelJob(JobId jobId)
          Cancels an asynchronous job initiated by the Integration API.
 JobInfo[] getCurrentJobs()
          Retrieves job information for current asynchronous jobs of this user.
 JobStatus getJobStatus(JobId jobId)
          Retrieves the status of an asynchronous job initiated by the Integration API.
 JobId level(Project project)
          Asynchronously levels a project.
 JobId level(Project[] projects)
          Asynchronously levels multiple projects.
 JobId recalculateAssignmentCosts(Project[] projects, boolean syncOTFactor)
          Asynchronously recalculates assignment costs for multiple projects if the price per unit has changed for a resource or role and that assignment has been set to calculate cost from units.
 JobId recalculateAssignmentCosts(Project project, boolean syncOTFactor)
          Asynchronously recalculates assignment costs for a single project if the price per unit has changed for a resource or role and that assignment has been set to calculate cost from units.
 JobId schedule(Project[] projects, Date newDataDate)
          Asynchronously schedules multiple projects.
 JobId schedule(Project project, Date newDataDate)
          Asynchronously schedules a project.
 JobId storePeriodPerformance(Project[] projects, ObjectId finPerObjId)
          Asynchronously stores period performance for multiple projects.
 JobId storePeriodPerformance(Project project, ObjectId finPerObjId)
          Asynchronously stores period performance for a single project.
 JobId summarize(EPS eps)
          Asynchronously summarizes an EPS node.
 JobId summarize(Project project)
          Asynchronously summarizes a project.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getJobStatus

public JobStatus getJobStatus(JobId jobId)
                       throws ServerException,
                              NetworkException
Retrieves the status of an asynchronous job initiated by the Integration API. Jobs initiated by Project Management or Primavera's Web application are not accessible.

Parameters:
jobId - the id of the job
Returns:
JobStatus the status of the job: 'Pending', 'Running', 'Failed', 'Complete', or 'Cancelled'.
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer
IllegalArgumentException - if the job id parameter is null

getCurrentJobs

public JobInfo[] getCurrentJobs()
                         throws ServerException,
                                NetworkException
Retrieves job information for current asynchronous jobs of this user. Only jobs initiated by the Integration API are accessible, not those initiated by Project Management or Primavera's Web application.

Returns:
JobInfo[] array containing one JobInfo object for every API-initiated job currently in the database
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer

cancelJob

public JobStatus cancelJob(JobId jobId)
                    throws ServerException,
                           NetworkException
Cancels an asynchronous job initiated by the Integration API. Jobs initiated by Project Management or Primavera's Web application are not accessible.

Parameters:
jobId - the id of the job
Returns:
JobStatus the status of the job. 'Failed' if the job had previously failed, 'Complete' if the job was already completed, or 'Cancelled' if the job was cancelled.
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer
IllegalArgumentException - if the job id parameter is null

schedule

public JobId schedule(Project project,
                      Date newDataDate)
               throws ServerException,
                      NetworkException,
                      BusinessObjectException
Asynchronously schedules a project.

Parameters:
project - the project
newDataDate - the new data date
Returns:
JobId the id of the job
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer
BusinessObjectException - if the project's ObjectId field was not loaded or set

schedule

public JobId schedule(Project[] projects,
                      Date newDataDate)
               throws ServerException,
                      NetworkException,
                      ClientException
Asynchronously schedules multiple projects.

Parameters:
projects - the projects
newDataDate - the new data date
Returns:
JobId the id of the job
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer
ClientException - if the Projects array parameter is empty

applyActuals

public JobId applyActuals(Project project,
                          Date newDataDate)
                   throws ServerException,
                          NetworkException,
                          BusinessObjectException
Asynchronously applies actuals to a project.

Parameters:
project - the project
newDataDate - the new data date
Returns:
JobId the id of the job
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer
BusinessObjectException - if the project's ObjectId field was not loaded or set
IllegalArgumentException - if one of the parameters is null

summarize

public JobId summarize(Project project)
                throws ServerException,
                       NetworkException,
                       BusinessObjectException
Asynchronously summarizes a project.

Parameters:
project - the project
Returns:
JobId the id of the job
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer
BusinessObjectException - if the project's ObjectId field was not loaded or set
IllegalArgumentException - if the project parameter is null

summarize

public JobId summarize(EPS eps)
                throws ServerException,
                       NetworkException,
                       BusinessObjectException
Asynchronously summarizes an EPS node.

Parameters:
eps - the EPS
Returns:
JobId the id of the job
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer
BusinessObjectException - if the EPS object's ObjectId field was not loaded or specified
IllegalArgumentException - if the eps parameter is null

storePeriodPerformance

public JobId storePeriodPerformance(Project project,
                                    ObjectId finPerObjId)
                             throws ServerException,
                                    NetworkException,
                                    BusinessObjectException
Asynchronously stores period performance for a single project. The "this period" values are added to the past period actuals values and then the "this period" fields are reset to zero.

Parameters:
project - the project
finPerObjId - the financial period
Returns:
JobId the id of the job
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer
BusinessObjectException - if the project's ObjectId field was not loaded or set

storePeriodPerformance

public JobId storePeriodPerformance(Project[] projects,
                                    ObjectId finPerObjId)
                             throws ServerException,
                                    NetworkException,
                                    ClientException
Asynchronously stores period performance for multiple projects. The "this period" values are added to the past period actuals values and then the "this period" fields are reset to zero.

Parameters:
projects - the projects
finPerObjId - the financial period
Returns:
JobId the id of the job
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer
ClientException - if the Projects array parameter is empty

recalculateAssignmentCosts

public JobId recalculateAssignmentCosts(Project project,
                                        boolean syncOTFactor)
                                 throws ServerException,
                                        NetworkException,
                                        BusinessObjectException
Asynchronously recalculates assignment costs for a single project if the price per unit has changed for a resource or role and that assignment has been set to calculate cost from units.

Parameters:
project - the project to recalculate assignment costs
syncOTFactor - the flag to synchronize the overtime factor
Returns:
JobId the id of the job
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer
ClientException - if the Projects array parameter is empty
BusinessObjectException

recalculateAssignmentCosts

public JobId recalculateAssignmentCosts(Project[] projects,
                                        boolean syncOTFactor)
                                 throws ServerException,
                                        NetworkException,
                                        ClientException
Asynchronously recalculates assignment costs for multiple projects if the price per unit has changed for a resource or role and that assignment has been set to calculate cost from units.

Parameters:
projects - the projects
syncOTFactor - the flag to synchronize the overtime factor
Returns:
JobId the id of the job
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer
ClientException - if the Projects array parameter is empty

level

public JobId level(Project project)
            throws ServerException,
                   NetworkException,
                   BusinessObjectException
Asynchronously levels a project.

Parameters:
project - the project
Returns:
JobId the id of the job
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer
BusinessObjectException - if the project's ObjectId field was not loaded or set

level

public JobId level(Project[] projects)
            throws ServerException,
                   NetworkException,
                   ClientException
Asynchronously levels multiple projects.

Parameters:
projects - the projects
Returns:
JobId the id of the job
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer
ClientException - if the Projects array parameter is empty

Primavera Integration API 8.0

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