Interface HoldEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface HoldEnablerAdminSession extends OsidSession

This session creates and removes hold enablers. The data for create and update is provided via the HoldEnablerForm.

  • Method Details

    • getOublietteId

      Id getOublietteId()
      Gets the Oubliette Id associated with this session.
      Returns:
      the Oubliette Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getOubliette

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

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

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

      HoldEnablerForm getHoldEnablerFormForCreate(Type[] holdEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the hold enabler form for creating new hold enablers. A new form should be requested for each create transaction.
      Parameters:
      holdEnablerRecordTypes - array of hold enabler record types
      Returns:
      the hold enabler form
      Throws:
      NullArgumentException - holdEnablerRecordTypes 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.
    • createHoldEnabler

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

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

      HoldEnablerForm getHoldEnablerFormForUpdate(Id holdEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the hold enabler form for updating an existing hold enabler. A new hold enabler form should be requested for each update transaction.
      Parameters:
      holdEnablerId - the Id of the HoldEnabler
      Returns:
      the hold enabler form
      Throws:
      NotFoundException - holdEnablerId is not found
      NullArgumentException - holdEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateHoldEnabler

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

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

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

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

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