Interface OfferingConstrainerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface OfferingConstrainerAdminSession extends OsidSession

This session creates and removes offering constrainers. The data for create and update is provided via the OfferingConstrainerForm .

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

      boolean canCreateOfferingConstrainer()
      Tests if this user can create offering constrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an OfferingConstrainer 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 OfferingConstrainer creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateOfferingConstrainerWithRecordTypes

      boolean canCreateOfferingConstrainerWithRecordTypes(Type[] offeringConstrainerRecordTypes)
      OfferingRulesManager.getOfferingConstrainerRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific OfferingConstrainer . Providing an empty array tests if an OfferingConstrainer can be created with no records.
      Parameters:
      offeringConstrainerRecordTypes - array of offering constrainer record types
      Returns:
      true if OfferingConstrainer creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - offeringConstrainerRecordTypes is null
      Compliance:
      mandatory - This method must be implemented.
    • getOfferingConstrainerFormForCreate

      OfferingConstrainerForm getOfferingConstrainerFormForCreate(Type[] offeringConstrainerRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the offering constrainer form for creating new offering constrainers. A new form should be requested for each create transaction.
      Parameters:
      offeringConstrainerRecordTypes - array of offering constrainer record types
      Returns:
      the offering constrainer form
      Throws:
      NullArgumentException - offeringConstrainerRecordTypes 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.
    • createOfferingConstrainer

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

      boolean canUpdateOfferingConstrainers()
      Tests if this user can update offering constrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an OfferingConstrainer 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 OfferingConstrainer modification is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getOfferingConstrainerFormForUpdate

      OfferingConstrainerForm getOfferingConstrainerFormForUpdate(Id offeringConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the offering constrainer form for updating an existing offering constrainer. A new offering constrainer form should be requested for each update transaction.
      Parameters:
      offeringConstrainerId - the Id of the OfferingConstrainer
      Returns:
      the offering constrainer form
      Throws:
      NotFoundException - offeringConstrainerId is not found
      NullArgumentException - offeringConstrainerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateOfferingConstrainer

      void updateOfferingConstrainer(OfferingConstrainerForm offeringConstrainerForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing offering constrainer.
      Parameters:
      offeringConstrainerForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - offeringConstrainerForm already used in an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - offeringConstrainerForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - offeringConstrainerForm did not originate from getOfferingConstrainerFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteOfferingConstrainers

      boolean canDeleteOfferingConstrainers()
      Tests if this user can delete offering constrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an OfferingConstrainer 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 OfferingConstrainer deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteOfferingConstrainer

      void deleteOfferingConstrainer(Id offeringConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Deletes an OfferingConstrainer .
      Parameters:
      offeringConstrainerId - the Id of the OfferingConstrainer to remove
      Throws:
      NotFoundException - offeringConstrainerId not found
      NullArgumentException - offeringConstrainerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canManageOfferingConstrainerAliases

      boolean canManageOfferingConstrainerAliases()
      Tests if this user can manage Id aliases for offering constrainers. 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 OfferingConstrainer aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasOfferingConstrainer

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