Interface CanonicalUnitProcessorAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CanonicalUnitProcessorAdminSession extends OsidSession

This session creates and removes canonical unit processors. The data for create and update is provided via the CanonicalUnitProcessorForm .

  • Method Details

    • getCatalogueId

      Id getCatalogueId()
      Gets the Catalogue Id associated with this session.
      Returns:
      the Catalogue Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getCatalogue

      Gets the Catalogue associated with this session.
      Returns:
      the catalogue
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canCreateCanonicalUnitProcessor

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

      boolean canCreateCanonicalUnitProcessorWithRecordTypes(Type[] canonicalUnitProcessorRecordTypes)
      Tests if this user can create a single CanonicalUnitProcessor using the desired record types. While OfferingRulesManager.getCanonicalUnitProcessorRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific CanonicalUnitProcessor . Providing an empty array tests if a CanonicalUnitProcessor can be created with no records.
      Parameters:
      canonicalUnitProcessorRecordTypes - array of canonical unit processor record types
      Returns:
      true if CanonicalUnitProcessor creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - canonicalUnitProcessorRecordTypes is null
      Compliance:
      mandatory - This method must be implemented.
    • getCanonicalUnitProcessorFormForCreate

      CanonicalUnitProcessorForm getCanonicalUnitProcessorFormForCreate(Type[] canonicalUnitProcessorRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the canonical unit processor form for creating new canonical unit processors. A new form should be requested for each create transaction.
      Parameters:
      canonicalUnitProcessorRecordTypes - array of canonical unit processor record types
      Returns:
      the canonical unit processor form
      Throws:
      NullArgumentException - canonicalUnitProcessorRecordTypes 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.
    • createCanonicalUnitProcessor

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

      boolean canUpdateCanonicalUnitProcessors()
      Tests if this user can update canonical unit processors. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a CanonicalUnitProcessor will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.
      Returns:
      false if CanonicalUnitProcessor modification is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCanonicalUnitProcessorFormForUpdate

      CanonicalUnitProcessorForm getCanonicalUnitProcessorFormForUpdate(Id canonicalUnitProcessorId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the canonical unit processor form for updating an existing canonical unit processor. A new canonical unit processor form should be requested for each update transaction.
      Parameters:
      canonicalUnitProcessorId - the Id of the CanonicalUnitProcessor
      Returns:
      the canonical unit processor form
      Throws:
      NotFoundException - canonicalUnitProcessorId is not found
      NullArgumentException - canonicalUnitProcessorId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateCanonicalUnitProcessor

      void updateCanonicalUnitProcessor(CanonicalUnitProcessorForm canonicalUnitProcessorForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing canonical unit processor.
      Parameters:
      canonicalUnitProcessorForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - canonicalUnitProcessorForm already used in an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - canonicalUnitProcessorForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - canonicalUnitProcessorForm did not originate from getCanonicalUnitProcessorFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteCanonicalUnitProcessors

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

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

      boolean canManageCanonicalUnitProcessorAliases()
      Tests if this user can manage Id aliases for canonical unit processors. 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 CanonicalUnitProcessor aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasCanonicalUnitProcessor

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