Interface InputEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface InputEnablerAdminSession extends OsidSession

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

  • Method Details

    • getSystemId

      Id getSystemId()
      Gets the System Id associated with this session.
      Returns:
      the System Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getSystem

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

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

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

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

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

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

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

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

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

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

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

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