Interface CanonicalUnitEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CanonicalUnitEnablerAdminSession extends OsidSession

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

  • 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.
    • canCreateCanonicalUnitEnabler

      boolean canCreateCanonicalUnitEnabler()
      Tests if this user can create canonical unit enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a CanonicalUnitEnabler 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 CanonicalUnitEnabler creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateCanonicalUnitEnablerWithRecordTypes

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

      CanonicalUnitEnablerForm getCanonicalUnitEnablerFormForCreate(Type[] canonicalUnitEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the canonical unit enabler form for creating new canonical unit enablers. A new form should be requested for each create transaction.
      Parameters:
      canonicalUnitEnablerRecordTypes - array of canonical unit enabler record types
      Returns:
      the canonical unit enabler form
      Throws:
      NullArgumentException - canonicalUnitEnablerRecordTypes 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.
    • createCanonicalUnitEnabler

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

      boolean canUpdateCanonicalUnitEnablers()
      Tests if this user can update canonical unit enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a CanonicalUnitEnabler 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 CanonicalUnitEnabler modification is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCanonicalUnitEnablerFormForUpdate

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

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

      boolean canDeleteCanonicalUnitEnablers()
      Tests if this user can delete canonical unit enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a CanonicalUnitEnabler 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 CanonicalUnitEnabler deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteCanonicalUnitEnabler

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

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

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