Interface AvailabilityEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface AvailabilityEnablerAdminSession extends OsidSession

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

  • Method Details

    • getFoundryId

      Id getFoundryId()
      Gets the Foundry Id associated with this session.
      Returns:
      the Foundry Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getFoundry

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

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

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

      AvailabilityEnablerForm getAvailabilityEnablerFormForCreate(Type[] availabilityEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the availability enabler form for creating new availability enablers. A new form should be requested for each create transaction.
      Parameters:
      availabilityEnablerRecordTypes - array of availability enabler record types
      Returns:
      the availability enabler form
      Throws:
      NullArgumentException - availabilityEnablerRecordTypes is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - unable to get form with requested record types
      Compliance:
      mandatory - This method must be implemented.
    • createAvailabilityEnabler

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

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

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

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

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

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

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

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