Interface ObjectiveBankBatchAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, ObjectiveBankAdminSession, OsidSession, OsidSession
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 .
-
Method Summary
Modifier and TypeMethodDescriptionaliasObjectiveBanks(AliasRequestList aliasRequests) Adds anIdto anObjectiveBankfor the purpose of creating compatibility.createObjectiveBanks(ObjectiveBankBatchFormList objectiveBankForms) Creates a new set ofObjectiveBanks.Deletes allObjectiveBanks.deleteObjectiveBanks(IdList objectiveBankIds) Deletes objective banks for the givenIds.getObjectiveBankFormsForCreate(long number, Type[] objectiveBankRecordTypes) Gets the objective bank forms for creating a bunch of new objective banks.getObjectiveBankFormsForUpdate(IdList objectiveBankIds) Gets the objective bank forms for updating an existing set of objective banks.updateObjectiveBanks(ObjectiveBankBatchFormList objectiveBankForms) Updates existing objective banks.Methods inherited from interface ObjectiveBankAdminSession
aliasObjectiveBank, canCreateObjectiveBanks, canCreateObjectiveBankWithRecordTypes, canDeleteObjectiveBanks, canManageObjectiveBankAliases, canUpdateObjectiveBanks, createObjectiveBank, deleteObjectiveBank, getObjectiveBankFormForCreate, getObjectiveBankFormForUpdate, updateObjectiveBankModifier and TypeMethodDescriptionvoidaliasObjectiveBank(Id objectiveBankId, Id aliasId) Adds anIdto anObjectiveBankfor the purpose of creating compatibility.booleanTests if this user can createObjectiveBanks.booleancanCreateObjectiveBankWithRecordTypes(Type[] objectiveBankRecordTypes) Tests if this user can create a singleObjectiveBankusing the desired record types.booleanTests if this user can delete objective banks.booleanTests if this user can manageIdaliases forObjectiveBanks.booleanTests if this user can updateObjectiveBanks.createObjectiveBank(ObjectiveBankForm objectiveBankForm) Creates a newObjectiveBank.voiddeleteObjectiveBank(Id objectiveBankId) Deletes anObjectiveBank.getObjectiveBankFormForCreate(Type[] objectiveBankRecordTypes) Gets the objective bank form for creating new objective banks.getObjectiveBankFormForUpdate(Id objectiveBankId) Gets the objective bank form for updating an existing objective bank.voidupdateObjectiveBank(ObjectiveBankForm objectiveBankForm) Updates an existing objective bank.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getObjectiveBankFormsForCreate
ObjectiveBankBatchFormList getObjectiveBankFormsForCreate(long number, Type[] objectiveBankRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the objective bank forms for creating a bunch of new objective banks.- Parameters:
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 none- Returns:
- the objective bank forms
- Throws:
NullArgumentException-objectiveBankRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createObjectiveBanks
CreateResponseList createObjectiveBanks(ObjectiveBankBatchFormList objectiveBankForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofObjectiveBanks. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
objectiveBankForms- the objective bank forms- Returns:
- the create responses
- Throws:
NullArgumentException-objectiveBankFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getObjectiveBankFormsForUpdate
ObjectiveBankBatchFormList getObjectiveBankFormsForUpdate(IdList objectiveBankIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the objective bank forms for updating an existing set of objective banks. A new objective bank form should be requested for each update transaction.- Parameters:
objectiveBankIds- theIdsof theObjectiveBank- Returns:
- the objective bank form
- Throws:
NotFoundException- anobjectiveBankIdis not foundNullArgumentException-objectiveBankIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateObjectiveBanks
UpdateResponseList updateObjectiveBanks(ObjectiveBankBatchFormList objectiveBankForms) throws OperationFailedException, PermissionDeniedException Updates existing objective banks. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
objectiveBankForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-objectiveBankFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllObjectiveBanks
DeleteResponseList deleteAllObjectiveBanks() throws OperationFailedException, PermissionDeniedExceptionDeletes allObjectiveBanks.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteObjectiveBanks
DeleteResponseList deleteObjectiveBanks(IdList objectiveBankIds) throws OperationFailedException, PermissionDeniedException Deletes objective banks for the givenIds.- Parameters:
objectiveBankIds- theIdsof the objective banks to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-objectiveBankIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasObjectiveBanks
AliasResponseList aliasObjectiveBanks(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto anObjectiveBankfor the purpose of creating compatibility. The primaryIdof theObjectiveBankis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another objective bank, it is reassigned to the given objective bankId.- Parameters:
aliasRequests- the alias requests- Returns:
- the alias responses
- Throws:
NullArgumentException-aliasRequestsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-