public interface ObjectiveBankBatchAdminSession extends ObjectiveBankAdminSession
This session creates, updates, and deletes ObjectiveBanks
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 an
ObjectiveBank,
an ObjectiveBankForm
is
requested using getObjectiveBankFormsForCreate()
specifying
the desired record Types
or none if no record Types
are needed. Each of the returned ObjectiveBankForms
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 an
ObjectiveBankForm
is submiited to a create operation, it cannot be
reused with another create operation unless the first operation was
unsuccessful. Each ObjectiveBankForm
corresponds to an
attempted transaction.
The ObjectiveBankForms
returned from
getObjectiveBankFormsForCreate()
may be linked to the originating
request through the peer Ids
of the
ObjectiveBankForm.
In the case where there may be duplicates, any
ObjectiveBankForm
of the same peer Ids
may
be used for a create operation.
Once a batch of ObjectiveBankForms
are submitted for
create, a CreateResponse
is returned for each
ObjectiveBankForm,
although the ordering is not defined. Only
errors that pertain to the entire create operation are returned from
createObjectiveBanks(),
errors specific to an individual
ObjectiveBankForm
are indicated in the corresponding
CreateResponse.
CreateResponses
may be linked to
the originating ObjectiveBankForm
through the
ObjectiveBankForm
Id
.
For updates, ObjectiveBankForms
are requested to the
ObjectiveBank
Id
that is to be updated using
getObjectiveBankFormsForUpdate()
where the reference
Id
in the ObjectiveBankForm
may be used to link the
request. Similarly, the ObjectiveBankForm
has metadata
about the data that can be updated and it can perform validation before
submitting the update. The ObjectiveBankForm
can only be
used once for a successful update and cannot be reused.
Once a batch of ObjectiveBankForms
are submitted for
update, an UpdateResponse
is returned for each
ObjectiveBankForm,
although the ordering is not defined. Only
errors that pertain to the entire update operation are returned from
updateObjectiveBanks(),
errors specific to an individual
ObjectiveBankForm
are indicated in the corresponding
UpdateResponse.
UpdateResponses
may be linked to
the originating ObjectiveBankForm
through the
ObjectiveBankForm
Id.
The delete operations delete ObjectiveBanks
in bulk.
Bulk delete operations return the results in DeleteResponses.
Modifier and Type | Method and Description |
---|---|
AliasResponseList |
aliasObjectiveBanks(AliasRequestList aliasRequests)
Adds an
Id to an ObjectiveBank for the
purpose of creating compatibility. |
CreateResponseList |
createObjectiveBanks(ObjectiveBankBatchFormList objectiveBankForms)
Creates a new set of
ObjectiveBanks. |
DeleteResponseList |
deleteAllObjectiveBanks()
Deletes all
ObjectiveBanks. |
DeleteResponseList |
deleteObjectiveBanks(IdList objectiveBankIds)
Deletes objective banks for the given
Ids. |
ObjectiveBankBatchFormList |
getObjectiveBankFormsForCreate(long number,
Type[] objectiveBankRecordTypes)
Gets the objective bank forms for creating a bunch of new objective
banks.
|
ObjectiveBankBatchFormList |
getObjectiveBankFormsForUpdate(IdList objectiveBankIds)
Gets the objective bank forms for updating an existing set of
objective banks.
|
UpdateResponseList |
updateObjectiveBanks(ObjectiveBankBatchFormList objectiveBankForms)
Updates existing objective banks.
|
aliasObjectiveBank, canCreateObjectiveBanks, canCreateObjectiveBankWithRecordTypes, canDeleteObjectiveBanks, canManageObjectiveBankAliases, canUpdateObjectiveBanks, createObjectiveBank, deleteObjectiveBank, getObjectiveBankFormForCreate, getObjectiveBankFormForUpdate, updateObjectiveBank
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
ObjectiveBankBatchFormList getObjectiveBankFormsForCreate(long number, Type[] objectiveBankRecordTypes) throws OperationFailedException, PermissionDeniedException
number
- the number of forms to retrieveobjectiveBankRecordTypes
- array of objective bank record types
to be included in each create operation or an empty list if
noneNullArgumentException
- objectiveBankRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to request forms with
given record typesmandatory
- This method must be implemented. CreateResponseList createObjectiveBanks(ObjectiveBankBatchFormList objectiveBankForms) throws OperationFailedException, PermissionDeniedException
ObjectiveBanks.
This method
returns an error if the entire operation fails. Otherwise, the status
of an individual create operation is indicated in the
BatchCreateResponse
.objectiveBankForms
- the objective bank formsNullArgumentException
- objectiveBankForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ObjectiveBankBatchFormList getObjectiveBankFormsForUpdate(IdList objectiveBankIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
objectiveBankIds
- the Ids
of the
ObjectiveBank
NotFoundException
- an objectiveBankId
is not foundNullArgumentException
- objectiveBankIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. UpdateResponseList updateObjectiveBanks(ObjectiveBankBatchFormList objectiveBankForms) throws OperationFailedException, PermissionDeniedException
BatchCreateResponse
.objectiveBankForms
- the form containing the elements to be
updatedNullArgumentException
- objectiveBankForms
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteAllObjectiveBanks() throws OperationFailedException, PermissionDeniedException
ObjectiveBanks.
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DeleteResponseList deleteObjectiveBanks(IdList objectiveBankIds) throws OperationFailedException, PermissionDeniedException
Ids.
objectiveBankIds
- the Ids
of the objective banks
to deleteNullArgumentException
- objectiveBankIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AliasResponseList aliasObjectiveBanks(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id
to an ObjectiveBank
for the
purpose of creating compatibility. The primary Id
of
the ObjectiveBank
is determined by the provider. The
new Id
is an alias to the primary Id.
If
the alias is a pointer to another objective bank, it is reassigned to
the given objective bank Id.
aliasRequests
- the alias requestsNullArgumentException
- aliasRequests
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.