Interface RegistrationRequestItemAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates, updates, and deletes RegistrationReq
uestItems. 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
RegistrationRe questItem, a RegistrationReque stItemForm is
requested using getRegistrationRequestItemFormForm() specifying
the desired registration request and record Types or none if no
record Types are needed. Each form request method corresponds to
an operation of the RegistrationRequestItem .
The returned RegistrationReque stItemForm 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 the
RegistrationReque stItemForm is submiited to a create operation, it
cannot be reused with another create operation unless the first operation
was unsuccessful. Each RegistrationReque stItemForm corresponds to
an attempted transaction.
For updates, RegistrationReques tItemForms are requested to
the RegistrationR equestItem Id that is to be updated
using getRegistrationRequestItemFormFo rUpdate(). Similarly, the
RegistrationReque stItemForm has metadata about the data that can
be updated and it can perform validation before submitting the update. The
RegistrationReque stItemForm can only be used once for a
successful update and cannot be reused.
The delete operations delete RegistrationReq uestItems. To
unmap a RegistrationR equestItem from the current
CourseCatalog , the RegistrationRequestItemCourseCatalogAssignm
entSession should be used. These delete operations attempt to remove the
RegistrationR equestItem itself thus removing it from all known
CourseCatalog catalogs.
This session includes an Id aliasing mechanism to assign an
external Id to an internally assigned Id .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasRegistrationRequestItem(Id registrationRequestItemId, Id aliasId) Adds anIdto aRegistrationRequestItem for the purpose of creating compatibility.booleanTests if this user can createRegistrationRequestItems.booleancanCreateRegistrationRequestItemWithRecordTypes(Type[] registrationRequestItemRecordTypes) Tests if this user can create a singleRegistrationRequestItem using the desired record types.booleanTests if this user can deleteRegistrationRequestItems.booleanTests if this user can manageIdaliases forRegistrationRequestItems A return of true does not guarantee successful authorization.booleanTests if this user can updateRegistrationRequestItems.createRegistrationRequestItem(RegistrationRequestItemForm registrationRequestItemForm) Creates a newRegistrationRequestItem.voiddeleteRegistrationRequestItem(Id registrationRequestItemId) Deletes aRegistrationRequestItem.Gets theCourseCatalogassociated with this session.Gets theCourseCatalogIdassociated with this session.getRegistrationRequestItemFormForCreateForAdd(Id registrationRequestId, Type[] registrationRequestItemRecordTypes) Gets the registration request item form for creating new ADD registration request items.getRegistrationRequestItemFormForCreateForDrop(Id registrationRequestId, Type[] registrationRequestItemRecordTypes) Gets the registration request item form for creating new DROP registration request items.getRegistrationRequestItemFormForCreateForUpdate(Id registrationRequestId, Type[] registrationRequestItemRecordTypes) Gets the registration request item form for creating new UPDATE registration request items.getRegistrationRequestItemFormForUpdate(Id registrationRequestItemId) Gets the registration request item form for updating an existing registration request item.voidupdateRegistrationRequestItem(RegistrationRequestItemForm registrationRequestItemForm) Updates an existing registration request item.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
-
getCourseCatalogId
Id getCourseCatalogId()Gets theCourseCatalogIdassociated with this session.- Returns:
- the
CourseCatalog Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getCourseCatalog
Gets theCourseCatalogassociated with this session.- Returns:
- the course catalog
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateRegistrationRequestItems
boolean canCreateRegistrationRequestItems()Tests if this user can createRegistrationRequestItems. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aRegistrationRequestItem will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.- Returns:
falseifRegistrationRequestItemcreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateRegistrationRequestItemWithRecordTypes
Tests if this user can create a singleRegistrationRequestItem using the desired record types. WhileRegistrationRequestManager.getRegistrationRequestItemRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificRegistrationRequestItem. Providing an empty array tests if aRegistrationRequestItem can be created with no records.- Parameters:
registrationRequestItemRecordTypes- array of registration request item record types- Returns:
trueifRegistrationRequestItemcreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-registrationRequestItemRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getRegistrationRequestItemFormForCreateForAdd
RegistrationRequestItemForm getRegistrationRequestItemFormForCreateForAdd(Id registrationRequestId, Type[] registrationRequestItemRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the registration request item form for creating new ADD registration request items. A new form should be requested for each create transaction.- Parameters:
registrationRequestId- a registration requestIdregistrationRequestItemRecordTypes- array of registration request item record types- Returns:
- the registration request item form
- Throws:
NotFoundException-registrationRequestIdis not foundNullArgumentException-registrationRequestIdorregistrationRequestItemRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
getRegistrationRequestItemFormForCreateForUpdate
RegistrationRequestItemForm getRegistrationRequestItemFormForCreateForUpdate(Id registrationRequestId, Type[] registrationRequestItemRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the registration request item form for creating new UPDATE registration request items. A new form should be requested for each create transaction.- Parameters:
registrationRequestId- a registration requestIdregistrationRequestItemRecordTypes- array of registration request item record types- Returns:
- the registration request item form
- Throws:
NotFoundException-registrationRequestIdis not foundNullArgumentException-registrationRequestIdorregistrationRequestItemRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
getRegistrationRequestItemFormForCreateForDrop
RegistrationRequestItemForm getRegistrationRequestItemFormForCreateForDrop(Id registrationRequestId, Type[] registrationRequestItemRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the registration request item form for creating new DROP registration request items. A new form should be requested for each create transaction.- Parameters:
registrationRequestId- a registration requestIdregistrationRequestItemRecordTypes- array of registration request item record types- Returns:
- the registration request item form
- Throws:
NotFoundException-registrationRequestIdis not foundNullArgumentException-registrationRequestIdorregistrationRequestItemRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createRegistrationRequestItem
RegistrationRequestItem createRegistrationRequestItem(RegistrationRequestItemForm registrationRequestItemForm) throws OperationFailedException, PermissionDeniedException Creates a newRegistrationRequestItem.- Parameters:
registrationRequestItemForm- the form for thisRegistrationRequestItem- Returns:
- the new
RegistrationRequestItem - Throws:
IllegalStateException-registrationRequestItemFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-registrationRequestItemFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-registrationRequestItemFormdid not originate fromgetRegistrationRequestItemFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateRegistrationRequestItems
boolean canUpdateRegistrationRequestItems()Tests if this user can updateRegistrationRequestItems. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aRegistrationRequestItem will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.- Returns:
falseifRegistrationRequestItemmodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getRegistrationRequestItemFormForUpdate
RegistrationRequestItemForm getRegistrationRequestItemFormForUpdate(Id registrationRequestItemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the registration request item form for updating an existing registration request item. A new registration request item form should be requested for each update transaction.- Parameters:
registrationRequestItemId- theIdof theRegistrationRequestItem- Returns:
- the registration request item form
- Throws:
NotFoundException-registrationRequestItemIdis not foundNullArgumentException-registrationRequestItemIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateRegistrationRequestItem
void updateRegistrationRequestItem(RegistrationRequestItemForm registrationRequestItemForm) throws OperationFailedException, PermissionDeniedException Updates an existing registration request item.- Parameters:
registrationRequestItemForm- the form containing the elements to be updated- Throws:
IllegalStateException-registrationRequestItemFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-registrationRequestItemFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-registrationRequestItemFormdid not originate fromgetRegistrationRequestItemFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteRegistrationRequestItems
boolean canDeleteRegistrationRequestItems()Tests if this user can deleteRegistrationRequestItems. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aRegistrationRequestItem will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.- Returns:
falseifRegistrationRequestItemdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteRegistrationRequestItem
void deleteRegistrationRequestItem(Id registrationRequestItemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aRegistrationRequestItem.- Parameters:
registrationRequestItemId- theIdof theRegistrationRequestItemto remove- Throws:
NotFoundException-registrationRequestItemIdnot foundNullArgumentException-registrationRequestItemIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageRegistrationRequestItemAliases
boolean canManageRegistrationRequestItemAliases()Tests if this user can manageIdaliases forRegistrationRequestItems A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in aPERMISSION_DENIED.This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.- Returns:
falseifRegistrationRequestItemaliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasRegistrationRequestItem
void aliasRegistrationRequestItem(Id registrationRequestItemId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aRegistrationRequestItem for the purpose of creating compatibility. The primaryIdof theRegistrationRequestItem is determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another registration request item, it is reassigned to the given registration request itemId.- Parameters:
registrationRequestItemId- theIdof aRegistrationRequestItemaliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-registrationRequestItemIdnot foundNullArgumentException-registrationRequestItemIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-