Interface RegistrationRequestAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface RegistrationRequestAdminSession extends 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 Details

    • getCourseCatalogId

      Id getCourseCatalogId()
      Gets the CourseCatalog Id associated with this session.
      Returns:
      the CourseCatalog Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getCourseCatalog

      Gets the CourseCatalog associated with this session.
      Returns:
      the course catalog
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canCreateRegistrationRequests

      boolean canCreateRegistrationRequests()
      Tests if this user can create RegistrationReq uests. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a RegistrationR equest will result in a PERMISSION_DENIED. Th is is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.
      Returns:
      false if RegistrationRequest creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateRegistrationRequestWithRecordTypes

      boolean canCreateRegistrationRequestWithRecordTypes(Type[] registrationRequestRecordTypes)
      Tests if this user can create a single RegistrationRe quest using the desired record types. While RegistrationRequestManager.getRegistrationRequestRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific RegistrationRe quest. Providing an empty array tests if a RegistrationReq uest can be created with no records.
      Parameters:
      registrationRequestRecordTypes - array of registration request record types
      Returns:
      true if RegistrationRequest creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - registrationRequestRecordTypes is null
      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 term Id
      registrationRequestRecordTypes - array of registration request record types
      Returns:
      the registration request form
      Throws:
      NotFoundException - termId is not found
      NullArgumentException - termId or registrationRequestRecordTypes is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - 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 new RegistrationRequest .
      Parameters:
      registrationRequestForm - the form for this RegistrationRequest
      Returns:
      the new RegistrationRequest
      Throws:
      IllegalStateException - registrationRequestForm already used in a create transaction
      InvalidArgumentException - one or more of the form elements is invalid
      NullArgumentException - registrationRequestForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - registrationRequestForm did not originate from getRegistrationRequestFormForCreate()
      Compliance:
      mandatory - This method must be implemented.
    • canUpdateRegistrationRequests

      boolean canUpdateRegistrationRequests()
      Tests if this user can update RegistrationReq uests. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a RegistrationR equest will result in a PERMISSION_DENIED. Th is is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.
      Returns:
      false if RegistrationRequest modification is not authorized, true otherwise
      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 - the Id of the RegistrationRequest
      Returns:
      the registration request form
      Throws:
      NotFoundException - registrationRequestId is not found
      NullArgumentException - registrationRequestId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - registrationRequestForm already used in an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - registrationRequestForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - registrationRequestForm did not originate from getRegistrationRequestFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteRegistrationRequests

      boolean canDeleteRegistrationRequests()
      Tests if this user can delete RegistrationReq uests. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a RegistrationR equest will result in a PERMISSION_DENIED. Th is is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.
      Returns:
      false if RegistrationRequest deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteRegistrationRequest

      void deleteRegistrationRequest(Id registrationRequestId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Deletes a RegistrationRequest .
      Parameters:
      registrationRequestId - the Id of the RegistrationRequest to remove
      Throws:
      NotFoundException - registrationRequestId not found
      NullArgumentException - registrationRequestId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canManageRegistrationRequestAliases

      boolean canManageRegistrationRequestAliases()
      Tests if this user can manage Id aliases for RegistrationRe quests A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED .This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.
      Returns:
      false if RegistrationRequest aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasRegistrationRequest

      void aliasRegistrationRequest(Id registrationRequestId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an Id to a RegistrationR equest for the purpose of creating compatibility. The primary Id of the RegistrationR equest is determined by the provider. The new Id performs as an alias to the primary Id . If the alias is a pointer to another registration request, it is reassigned to the given registration request Id .
      Parameters:
      registrationRequestId - the Id of a RegistrationRequest
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - registrationRequestId not found
      NullArgumentException - registrationRequestId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • submitRegistrationRequest

      void submitRegistrationRequest(Id registrationRequestId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Submits a registration request for porcessing. A RegistrationRequest can only be submitted once.
      Parameters:
      registrationRequestId - the Id of a RegistrationRequest
      Throws:
      IllegalStateException - registrationRequestId already submitted
      NotFoundException - registrationRequestId not found
      NullArgumentException - registrationRequestId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.