Interface RegistrationRequestAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates, updates, and deletes RegistrationReq
uests. 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 quest, a RegistrationReque stForm is requested
using getRegistrationRequestFormForCr eate() specifying the
desired term and record Types or none if no record Types
are needed. The returned RegistrationReque stForm 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 stForm is submiited to a create operation, it cannot be
reused with another create operation unless the first operation was
unsuccessful. Each RegistrationReque stForm corresponds to an
attempted transaction.
For updates, RegistrationReques tForms are requested to the
RegistrationR equest Id that is to be updated using
getRegistrationRequestFormForUpd ate(). Similarly, the
RegistrationReque stForm has metadata about the data that can be updated
and it can perform validation before submitting the update. The
RegistrationReque stForm can only be used once for a successful update
and cannot be reused.
The delete operations delete RegistrationReq uests. To unmap a
RegistrationR equest from the current CourseCatalog , the
RegistrationRequestCourseCatalogAssignmentS ession should be used.
These delete operations attempt to remove the RegistrationR equest
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 .
OsidRequests include a submit operation for processing.
submitRegistrationRequest() is used after the complete request has been
created and may only be submitted once.-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasRegistrationRequest(Id registrationRequestId, Id aliasId) Adds anIdto aRegistrationRequest for the purpose of creating compatibility.booleanTests if this user can createRegistrationRequests.booleancanCreateRegistrationRequestWithRecordTypes(Type[] registrationRequestRecordTypes) Tests if this user can create a singleRegistrationRequest using the desired record types.booleanTests if this user can deleteRegistrationRequests.booleanTests if this user can manageIdaliases forRegistrationRequests A return of true does not guarantee successful authorization.booleanTests if this user can updateRegistrationRequests.createRegistrationRequest(RegistrationRequestForm registrationRequestForm) Creates a newRegistrationRequest.voiddeleteRegistrationRequest(Id registrationRequestId) Deletes aRegistrationRequest.Gets theCourseCatalogassociated with this session.Gets theCourseCatalogIdassociated with this session.getRegistrationRequestFormForCreate(Id termId, Type[] registrationRequestRecordTypes) Gets the registration request form for creating new registration requests.getRegistrationRequestFormForUpdate(Id registrationRequestId) Gets the registration request form for updating an existing registration request.voidsubmitRegistrationRequest(Id registrationRequestId) Submits a registration request for porcessing.voidupdateRegistrationRequest(RegistrationRequestForm registrationRequestForm) Updates an existing registration request.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.
-
canCreateRegistrationRequests
boolean canCreateRegistrationRequests()Tests if this user can createRegistrationRequests. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aRegistrationRequest 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:
falseifRegistrationRequestcreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateRegistrationRequestWithRecordTypes
Tests if this user can create a singleRegistrationRequest using the desired record types. WhileRegistrationRequestManager.getRegistrationRequestRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificRegistrationRequest. Providing an empty array tests if aRegistrationRequest can be created with no records.- Parameters:
registrationRequestRecordTypes- array of registration request record types- Returns:
trueifRegistrationRequestcreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-registrationRequestRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getRegistrationRequestFormForCreate
RegistrationRequestForm getRegistrationRequestFormForCreate(Id termId, Type[] registrationRequestRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the registration request form for creating new registration requests. A new form should be requested for each create transaction.- Parameters:
termId- a termIdregistrationRequestRecordTypes- array of registration request record types- Returns:
- the registration request form
- Throws:
NotFoundException-termIdis not foundNullArgumentException-termIdorregistrationRequestRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createRegistrationRequest
RegistrationRequest createRegistrationRequest(RegistrationRequestForm registrationRequestForm) throws OperationFailedException, PermissionDeniedException Creates a newRegistrationRequest.- Parameters:
registrationRequestForm- the form for thisRegistrationRequest- Returns:
- the new
RegistrationRequest - Throws:
IllegalStateException-registrationRequestFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-registrationRequestFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-registrationRequestFormdid not originate fromgetRegistrationRequestFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateRegistrationRequests
boolean canUpdateRegistrationRequests()Tests if this user can updateRegistrationRequests. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aRegistrationRequest 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:
falseifRegistrationRequestmodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getRegistrationRequestFormForUpdate
RegistrationRequestForm getRegistrationRequestFormForUpdate(Id registrationRequestId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the registration request form for updating an existing registration request. A new registration request form should be requested for each update transaction.- Parameters:
registrationRequestId- theIdof theRegistrationRequest- Returns:
- the registration request form
- Throws:
NotFoundException-registrationRequestIdis not foundNullArgumentException-registrationRequestIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateRegistrationRequest
void updateRegistrationRequest(RegistrationRequestForm registrationRequestForm) throws OperationFailedException, PermissionDeniedException Updates an existing registration request.- Parameters:
registrationRequestForm- the form containing the elements to be updated- Throws:
IllegalStateException-registrationRequestFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-registrationRequestFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-registrationRequestFormdid not originate fromgetRegistrationRequestFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteRegistrationRequests
boolean canDeleteRegistrationRequests()Tests if this user can deleteRegistrationRequests. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aRegistrationRequest 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:
falseifRegistrationRequestdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteRegistrationRequest
void deleteRegistrationRequest(Id registrationRequestId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aRegistrationRequest.- Parameters:
registrationRequestId- theIdof theRegistrationRequestto remove- Throws:
NotFoundException-registrationRequestIdnot foundNullArgumentException-registrationRequestIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageRegistrationRequestAliases
boolean canManageRegistrationRequestAliases()Tests if this user can manageIdaliases forRegistrationRequests 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:
falseifRegistrationRequestaliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasRegistrationRequest
void aliasRegistrationRequest(Id registrationRequestId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aRegistrationRequest for the purpose of creating compatibility. The primaryIdof theRegistrationRequest is determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another registration request, it is reassigned to the given registration requestId.- Parameters:
registrationRequestId- theIdof aRegistrationRequestaliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-registrationRequestIdnot foundNullArgumentException-registrationRequestIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
submitRegistrationRequest
void submitRegistrationRequest(Id registrationRequestId) throws NotFoundException, OperationFailedException, PermissionDeniedException Submits a registration request for porcessing. ARegistrationRequestcan only be submitted once.- Parameters:
registrationRequestId- theIdof aRegistrationRequest- Throws:
IllegalStateException-registrationRequestIdalready submittedNotFoundException-registrationRequestIdnot foundNullArgumentException-registrationRequestIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-