Interface ValueEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ValueEnablerAdminSession extends OsidSession

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

  • Method Details

    • getConfigurationId

      Id getConfigurationId()
      Gets the Configuration Id associated with this session.
      Returns:
      the Configuration Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getConfiguration

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

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

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

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

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

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

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

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

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

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

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

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