Interface ConferralBatchAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, ConferralAdminSession, OsidSession, OsidSession
This session creates, updates, and deletes Conferrals 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
Conferral , a ConferralForm is requested using
getConferralFormsForCreate() specifying the desired award, recipient, and
record Types or none if no record Types are needed. Each
of the returned ConferralForms 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 ConferralForm is submiited to a
create operation, it cannot be reused with another create operation unless
the first operation was unsuccessful. Each ConferralForm
corresponds to an attempted transaction.
The ConferralForms returned from
getConferralFormsForCreate() may be linked to the originating request
through the peer Ids of the ConferralForm . In the case
where there may be duplicates, any ConferralForm of the same peer
Ids may be used for a create operation.
Once a batch of ConferralForms are submitted for create, a
CreateResponse is returned for each ConferralForm ,
although the ordering is not defined. Only errors that pertain to the
entire create operation are returned from createConferrals() ,
errors specific to an individual ConferralForm are indicated in
the corresponding CreateResponse . CreateResponses may be
linked to the originating ConferralForm through the
ConferralForm Id .
For updates, ConferralForms are requested to the
Conferral Id that is to be updated using
getConferralFormsForUpdate() where the reference Id in the
ConferralForm may be used to link the request. Similarly, the
ConferralForm has metadata about the data that can be updated and it can
perform validation before submitting the update. The ConferralForm
can only be used once for a successful update and cannot be reused.
Once a batch of ConferralForms are submitted for update, an
UpdateResponse is returned for each ConferralForm ,
although the ordering is not defined. Only errors that pertain to the
entire update operation are returned from updateConferrals() ,
errors specific to an individual ConferralForm are indicated in
the corresponding UpdateResponse . UpdateResponses may be
linked to the originating ConferralForm through the
ConferralForm Id .
The delete operations delete Conferrals in bulk. To unmap a
Conferral from the current Academy , the
ConferralAcademyAssignmentSession should be used. These delete operations
attempt to remove the Conferral itself thus removing it from all
known Academy catalogs. Bulk delete operations return the results
in DeleteResponses .
-
Method Summary
Modifier and TypeMethodDescriptionaliasConferrals(AliasRequestList aliasRequests) Adds anIdto aConferralfor the purpose of creating compatibility.createConferrals(ConferralBatchFormList conferralForms) Creates a new set ofConferrals.Deletes allConferralsin thisAcademy.deleteConferrals(IdList conferralIds) Deletes conferrals for the givenIds.deleteConferralsForAward(Id awardId) Deletes conferrals for the given award.deleteConferralsForRecipient(Id resourceId) Deletes conferrals for the given recipient.Deletes conferrals expired before the given date.getConferralFormsForCreate(ConferralPeerList peers, Type[] conferralRecordTypes) Gets the conferral forms for creating a bunch of new conferrals.getConferralFormsForUpdate(IdList conferralIds) Gets the conferral forms for updating an existing set of conferrals.updateConferrals(ConferralBatchFormList conferralForms) Updates existing conferrals.Methods inherited from interface ConferralAdminSession
aliasConferral, canCreateConferrals, canCreateConferralWithRecordTypes, canDeleteConferrals, canManageConferralAliases, canUpdateConferrals, createConferral, deleteConferral, getAcademy, getAcademyId, getConferralFormForCreate, getConferralFormForUpdate, updateConferralModifier and TypeMethodDescriptionvoidaliasConferral(Id conferralId, Id aliasId) Adds anIdto aConferralfor the purpose of creating compatibility.booleanTests if this user can create conferrals.booleancanCreateConferralWithRecordTypes(Type[] conferralRecordTypes) Tests if this user can create a singleConferralusing the desired record types.booleanTests if this user can delete conferrals.booleanTests if this user can manageIdaliases forConferralsA return of true does not guarantee successful authorization.booleanTests if this user can update conferrals.createConferral(ConferralForm conferralForm) Creates a newConferral.voiddeleteConferral(Id conferralId) Deletes aConferral.Gets theAcademyassociated with this session.Gets theAcademyIdassociated with this session.getConferralFormForCreate(Id awardId, Id resourceId, Type[] conferralRecordTypes) Gets the conferral form for creating new conferrals.getConferralFormForUpdate(Id conferralId) Gets the conferral form for updating an existing conferral.voidupdateConferral(ConferralForm conferralForm) Updates an existing conferral.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
-
getConferralFormsForCreate
ConferralBatchFormList getConferralFormsForCreate(ConferralPeerList peers, Type[] conferralRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the conferral forms for creating a bunch of new conferrals. A new form is retuned for each supplied award and recipient.- Parameters:
peers- a list of conferral peersconferralRecordTypes- array of conferral record types to be included in each create operation or an empty list if none- Returns:
- the conferral forms
- Throws:
NotFoundException- anawardIdorresourceIdis not foundNullArgumentException-peersorconferralRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createConferrals
CreateResponseList createConferrals(ConferralBatchFormList conferralForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofConferrals. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
conferralForms- the conferral forms- Returns:
- the create responses
- Throws:
NullArgumentException-conferralFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getConferralFormsForUpdate
ConferralBatchFormList getConferralFormsForUpdate(IdList conferralIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the conferral forms for updating an existing set of conferrals. A new conferral form should be requested for each update transaction.- Parameters:
conferralIds- theIdsof theConferral- Returns:
- the conferral form
- Throws:
NotFoundException- aconferralIdis not foundNullArgumentException-conferralIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateConferrals
UpdateResponseList updateConferrals(ConferralBatchFormList conferralForms) throws OperationFailedException, PermissionDeniedException Updates existing conferrals. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
conferralForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-conferralFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllConferrals
Deletes allConferralsin thisAcademy.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteConferrals
DeleteResponseList deleteConferrals(IdList conferralIds) throws OperationFailedException, PermissionDeniedException Deletes conferrals for the givenIds.- Parameters:
conferralIds- theIdsof the conferrals to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-conferralIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteConferralsForAward
DeleteResponseList deleteConferralsForAward(Id awardId) throws OperationFailedException, PermissionDeniedException Deletes conferrals for the given award.- Parameters:
awardId- theIdof the award- Returns:
- the delete responses
- Throws:
NullArgumentException-awardIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteConferralsForRecipient
DeleteResponseList deleteConferralsForRecipient(Id resourceId) throws OperationFailedException, PermissionDeniedException Deletes conferrals for the given recipient.- Parameters:
resourceId- theIdof the resource- Returns:
- the delete responses
- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteIneffectiveConferralsByDate
DeleteResponseList deleteIneffectiveConferralsByDate(DateTime date) throws OperationFailedException, PermissionDeniedException Deletes conferrals expired before the given date.- Parameters:
date- a date- Returns:
- the delete responses
- Throws:
NullArgumentException-dateisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasConferrals
AliasResponseList aliasConferrals(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto aConferralfor the purpose of creating compatibility. The primaryIdof theConferralis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another conferral, it is reassigned to the given conferralId.- 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.
-