Interface RegistrationRequestItemAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface RegistrationRequestItemAdminSession extends 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 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.
    • canCreateRegistrationRequestItems

      boolean canCreateRegistrationRequestItems()
      Tests if this user can create RegistrationReq uestItems. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a RegistrationR equestItem 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 RegistrationRequestItem creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateRegistrationRequestItemWithRecordTypes

      boolean canCreateRegistrationRequestItemWithRecordTypes(Type[] registrationRequestItemRecordTypes)
      Tests if this user can create a single RegistrationRe questItem using the desired record types. While RegistrationRequestManager.getRegistrationRequestItemRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific RegistrationRe questItem. Providing an empty array tests if a RegistrationReq uestItem can be created with no records.
      Parameters:
      registrationRequestItemRecordTypes - array of registration request item record types
      Returns:
      true if RegistrationRequestItem creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - registrationRequestItemRecordTypes is null
      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 request Id
      registrationRequestItemRecordTypes - array of registration request item record types
      Returns:
      the registration request item form
      Throws:
      NotFoundException - registrationRequestId is not found
      NullArgumentException - registrationRequestId or registrationRequestItemRecordTypes 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.
    • 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 request Id
      registrationRequestItemRecordTypes - array of registration request item record types
      Returns:
      the registration request item form
      Throws:
      NotFoundException - registrationRequestId is not found
      NullArgumentException - registrationRequestId or registrationRequestItemRecordTypes 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.
    • 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 request Id
      registrationRequestItemRecordTypes - array of registration request item record types
      Returns:
      the registration request item form
      Throws:
      NotFoundException - registrationRequestId is not found
      NullArgumentException - registrationRequestId or registrationRequestItemRecordTypes 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.
    • createRegistrationRequestItem

      RegistrationRequestItem createRegistrationRequestItem(RegistrationRequestItemForm registrationRequestItemForm) throws OperationFailedException, PermissionDeniedException
      Creates a new RegistrationRequestItem .
      Parameters:
      registrationRequestItemForm - the form for this RegistrationRequestItem
      Returns:
      the new RegistrationRequestItem
      Throws:
      IllegalStateException - registrationRequestItemForm already used in a create transaction
      InvalidArgumentException - one or more of the form elements is invalid
      NullArgumentException - registrationRequestItemForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - registrationRequestItemForm did not originate from getRegistrationRequestItemFormForCreate()
      Compliance:
      mandatory - This method must be implemented.
    • canUpdateRegistrationRequestItems

      boolean canUpdateRegistrationRequestItems()
      Tests if this user can update RegistrationReq uestItems. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a RegistrationR equestItem 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 RegistrationRequestItem modification is not authorized, true otherwise
      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 - the Id of the RegistrationRequestItem
      Returns:
      the registration request item form
      Throws:
      NotFoundException - registrationRequestItemId is not found
      NullArgumentException - registrationRequestItemId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - registrationRequestItemForm already used in an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - registrationRequestItemForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - registrationRequestItemForm did not originate from getRegistrationRequestItemFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteRegistrationRequestItems

      boolean canDeleteRegistrationRequestItems()
      Tests if this user can delete RegistrationReq uestItems. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a RegistrationR equestItem 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 RegistrationRequestItem deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteRegistrationRequestItem

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

      boolean canManageRegistrationRequestItemAliases()
      Tests if this user can manage Id aliases for RegistrationRe questItems 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 RegistrationRequestItem aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasRegistrationRequestItem

      void aliasRegistrationRequestItem(Id registrationRequestItemId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an Id to a RegistrationR equestItem for the purpose of creating compatibility. The primary Id of the RegistrationR equestItem 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 item, it is reassigned to the given registration request item Id .
      Parameters:
      registrationRequestItemId - the Id of a RegistrationRequestItem
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - registrationRequestItemId not found
      NullArgumentException - registrationRequestItemId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.