public interface JobBatchAdminSession extends JobAdminSession
This session creates, updates, and deletes Jobs in bulk.
The data for create and update is provided by the consumer via the form
object. OsidForms are requested for each create or update
and may not be reused.
Create and update operations differ in their usage. To create a
Job, a JobForm is requested using
getJobFormsForCreate() specifying the desired record Types
or none if no record Types are needed. Each of the
returned JobForms will indicate that it is to be used with
a create operation and can be used to examine metdata or validate data
prior to creation. Once a JobForm is submiited to a create
operation, it cannot be reused with another create operation unless the
first operation was unsuccessful. Each JobForm corresponds
to an attempted transaction.
The JobForms returned from
getJobFormsForCreate() may be linked to the originating request
through the peer Ids of the JobForm. In the
case where there may be duplicates, any JobForm of the same
peer Ids may be used for a create operation.
Once a batch of JobForms are submitted for create, a
CreateResponse is returned for each JobForm,
although the ordering is not defined. Only errors that pertain to the
entire create operation are returned from createJobs(),
errors specific to an individual JobForm are indicated in
the corresponding CreateResponse. CreateResponses
may be linked to the originating JobForm through
the JobForm Id .
For updates, JobForms are requested to the Job
Id that is to be updated using
getJobFormsForUpdate() where the reference Id in
the JobForm may be used to link the request. Similarly, the
JobForm has metadata about the data that can be updated and
it can perform validation before submitting the update. The JobForm
can only be used once for a successful update and cannot be
reused.
Once a batch of JobForms are submitted for update, an
UpdateResponse is returned for each JobForm,
although the ordering is not defined. Only errors that pertain to the
entire update operation are returned from updateJobs(),
errors specific to an individual JobForm are indicated in
the corresponding UpdateResponse. UpdateResponses
may be linked to the originating JobForm through
the JobForm Id.
The delete operations delete Jobs in bulk. To unmap a
Job from the current Foundry, the
JobFoundryAssignmentSession should be used. These delete
operations attempt to remove the Job itself thus removing
it from all known Foundry catalogs. Bulk delete operations
return the results in DeleteResponses.
| Modifier and Type | Method and Description |
|---|---|
AliasResponseList |
aliasJobs(AliasRequestList aliasRequests)
Adds an
Id to a Job for the purpose of
creating compatibility. |
CreateResponseList |
createJobs(JobBatchFormList jobForms)
Creates a new set of
Jobs. |
DeleteResponseList |
deleteAllJobs()
Deletes all
Jobs in this Foundry . |
DeleteResponseList |
deleteJobs(IdList jobIds)
Deletes jobs for the given
Ids. |
JobBatchFormList |
getJobFormsForCreate(long number,
Type[] jobRecordTypes)
Gets the job forms for creating a bunch of new jobs.
|
JobBatchFormList |
getJobFormsForUpdate(IdList jobIds)
Gets the job forms for updating an existing set of jobs.
|
UpdateResponseList |
updateJobs(JobBatchFormList jobForms)
Updates existing jobs.
|
aliasJob, canCreateJobs, canCreateJobWithRecordTypes, canDeleteJobs, canManageJobAliases, canUpdateJobs, createJob, deleteJob, getFoundry, getFoundryId, getJobFormForCreate, getJobFormForUpdate, updateJobgetAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseJobBatchFormList getJobFormsForCreate(long number, Type[] jobRecordTypes) throws OperationFailedException, PermissionDeniedException
number - the number of forms to retrievejobRecordTypes - array of job record types to be included in
each create operation or an empty list if noneNullArgumentException - jobRecordTypes
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to request forms with
given record typesmandatory - This method must be implemented. CreateResponseList createJobs(JobBatchFormList jobForms) throws OperationFailedException, PermissionDeniedException
Jobs. This method returns an error
if the entire operation fails. Otherwise, the status of an individual
create operation is indicated in the BatchCreateResponse
.jobForms - the job formsNullArgumentException - jobForms is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. JobBatchFormList getJobFormsForUpdate(IdList jobIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
jobIds - the Ids of the Job NotFoundException - a jobId is not foundNullArgumentException - jobIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. UpdateResponseList updateJobs(JobBatchFormList jobForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse .jobForms - the form containing the elements to be updatedNullArgumentException - jobForms is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteAllJobs() throws OperationFailedException, PermissionDeniedException
Jobs in this Foundry .OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteJobs(IdList jobIds) throws OperationFailedException, PermissionDeniedException
Ids. jobIds - the Ids of the jobs to deleteNullArgumentException - jobIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. AliasResponseList aliasJobs(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id to a Job for the purpose of
creating compatibility. The primary Id of the
Job is determined by the provider. The new Id
is an alias to the primary Id. If the alias is a
pointer to another job, it is reassigned to the given job Id.
aliasRequests - the alias requestsNullArgumentException - aliasRequests is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.