Interface AwardEntryBatchAdminSession
- All Superinterfaces:
AutoCloseable, AwardEntryAdminSession, Closeable, OsidSession, OsidSession
This session creates, updates, and deletes AwardEntries 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
AwardEntry , an AwardEntryForm is requested using
getAwardEntryFormsForCreate() specifying the desired award, student, and
record Types or none if no record Types are needed. Each
of the returned AwardEntryForms 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 AwardEntryForm is
submiited to a create operation, it cannot be reused with another create
operation unless the first operation was unsuccessful. Each
AwardEntryForm corresponds to an attempted transaction.
The AwardEntryForms returned from
getAwardEntryFormsForCreate() may be linked to the originating request
through the peer Ids of the AwardEntryForm . In the case
where there may be duplicates, any AwardEntryForm of the same peer
Ids may be used for a create operation.
Once a batch of AwardEntryForms are submitted for create, a
CreateResponse is returned for each AwardEntryForm ,
although the ordering is not defined. Only errors that pertain to the
entire create operation are returned from createAwardEntries() ,
errors specific to an individual AwardEntryForm are indicated in
the corresponding CreateResponse . CreateResponses may be
linked to the originating AwardEntryForm through the
AwardEntryForm Id .
For updates, AwardEntryForms are requested to the
AwardEntry Id that is to be updated using
getAwardEntryFormsForUpdate() where the reference Id in the
AwardEntryForm may be used to link the request. Similarly, the
AwardEntryForm has metadata about the data that can be updated and
it can perform validation before submitting the update. The
AwardEntryForm can only be used once for a successful update and cannot
be reused.
Once a batch of AwardEntryForms are submitted for update, an
UpdateResponse is returned for each AwardEntryForm ,
although the ordering is not defined. Only errors that pertain to the
entire update operation are returned from updateAwardEntries() ,
errors specific to an individual AwardEntryForm are indicated in
the corresponding UpdateResponse . UpdateResponses may be
linked to the originating AwardEntryForm through the
AwardEntryForm Id .
The delete operations delete AwardEntries in bulk. To unmap an
AwardEntry from the current CourseCatalog , the
AwardEntryCourseCatalogAssignmentSession should be used. These delete
operations attempt to remove the AwardEntry itself thus removing
it from all known CourseCatalog catalogs. Bulk delete operations
return the results in DeleteResponses .
-
Method Summary
Modifier and TypeMethodDescriptionaliasAwardEntries(AliasRequestList aliasRequests) Adds anIdto anAwardEntryfor the purpose of creating compatibility.createAwardEntries(AwardEntryBatchFormList awardEntryForms) Creates a new set ofAwardEntries.Deletes allAwardEntriesin thisCourseCatalog.deleteAwardEntries(IdList awardEntryIds) Deletes award entries for the givenIds.deleteAwardEntriesForAward(IdList awardId) Deletes award entries for the given award.deleteAwardEntriesForStudent(IdList resourceId) Deletes award entries for the given student.Deletes award entries expired before the given date.getAwardEntryFormsForCreate(AwardEntryPeerList peers, Type[] awardEntryRecordTypes) Gets the award entry forms for creating a bunch of new award entries.getAwardEntryFormsForUpdate(IdList awardEntryIds) Gets the award entry forms for updating an existing set of award entries.updateAwardEntries(AwardEntryBatchFormList awardEntryForms) Updates existing award entries.Methods inherited from interface AwardEntryAdminSession
aliasAwardEntry, canCreateAwardEntries, canCreateAwardEntryWithRecordTypes, canDeleteAwardEntries, canManageAwardEntryAliases, canUpdateAwardEntries, createAwardEntry, deleteAwardEntry, getAwardEntryFormForCreate, getAwardEntryFormForUpdate, getCourseCatalog, getCourseCatalogId, updateAwardEntryModifier and TypeMethodDescriptionvoidaliasAwardEntry(Id awardEntryId, Id aliasId) Adds anIdto anAwardEntryfor the purpose of creating compatibility.booleanTests if this user can createAwardEntries.booleancanCreateAwardEntryWithRecordTypes(Type[] awardEntryRecordTypes) Tests if this user can create a singlePorgramusing the desired record types.booleanTests if this user can deleteAwardEntries.booleanTests if this user can manageIdaliases forAwardEntries.booleanTests if this user can updateAwardEntries.createAwardEntry(AwardEntryForm awardEntryForm) Creates a newAwardEntry.voiddeleteAwardEntry(Id awardEntryId) Deletes anAwardEntry.getAwardEntryFormForCreate(Id awardId, Id resourceId, Type[] awardEntryRecordTypes) Gets the award entry form for creating new award entries.getAwardEntryFormForUpdate(Id awardEntryId) Gets the award entry form for updating an existing award entry.Gets theCourseCatalogassociated with this session.Gets theCourseCatalogIdassociated with this session.voidupdateAwardEntry(AwardEntryForm awardEntryForm) Updates an existing award entry.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
-
getAwardEntryFormsForCreate
AwardEntryBatchFormList getAwardEntryFormsForCreate(AwardEntryPeerList peers, Type[] awardEntryRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the award entry forms for creating a bunch of new award entries. A form is returned for each award and student pair.- Parameters:
peers- the relationship peersawardEntryRecordTypes- array of award entry record types to be included in each create operation or an empty list if none- Returns:
- the award entry forms
- Throws:
NotFoundException- anawardIdorstudentIdis not foundNullArgumentException-peersorawardEntryRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createAwardEntries
CreateResponseList createAwardEntries(AwardEntryBatchFormList awardEntryForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofAwardEntries. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
awardEntryForms- the award entry forms- Returns:
- the create responses
- Throws:
NullArgumentException-awardEntryFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAwardEntryFormsForUpdate
AwardEntryBatchFormList getAwardEntryFormsForUpdate(IdList awardEntryIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the award entry forms for updating an existing set of award entries. A new award entry form should be requested for each update transaction.- Parameters:
awardEntryIds- theIdsof theAwardEntry- Returns:
- the award entry form
- Throws:
NotFoundException- anawardEntryIdis not foundNullArgumentException-awardEntryIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateAwardEntries
UpdateResponseList updateAwardEntries(AwardEntryBatchFormList awardEntryForms) throws OperationFailedException, PermissionDeniedException Updates existing award entries. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
awardEntryForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-awardEntryFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllAwardEntries
DeleteResponseList deleteAllAwardEntries() throws OperationFailedException, PermissionDeniedExceptionDeletes allAwardEntriesin thisCourseCatalog.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAwardEntries
DeleteResponseList deleteAwardEntries(IdList awardEntryIds) throws OperationFailedException, PermissionDeniedException Deletes award entries for the givenIds.- Parameters:
awardEntryIds- theIdsof the award entries to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-awardEntryIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAwardEntriesForAward
DeleteResponseList deleteAwardEntriesForAward(IdList awardId) throws OperationFailedException, PermissionDeniedException Deletes award entries for the given award.- Parameters:
awardId- anIdof an award- Returns:
- the delete responses
- Throws:
NullArgumentException-awardIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAwardEntriesForStudent
DeleteResponseList deleteAwardEntriesForStudent(IdList resourceId) throws OperationFailedException, PermissionDeniedException Deletes award entries for the given student.- Parameters:
resourceId- anIdof a student- Returns:
- the delete responses
- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteIneffectiveAwardEntriesByDate
DeleteResponseList deleteIneffectiveAwardEntriesByDate(DateTime date) throws OperationFailedException, PermissionDeniedException Deletes award entries 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.
-
aliasAwardEntries
AliasResponseList aliasAwardEntries(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto anAwardEntryfor the purpose of creating compatibility. The primaryIdof theAwardEntryis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another award entry, it is reassigned to the given award entryId.- 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.
-