Interface CompositionEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CompositionEnablerAdminSession extends OsidSession

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

  • Method Details

    • getRepositoryId

      Id getRepositoryId()
      Gets the Repository Id associated with this session.
      Returns:
      the Repository Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getRepository

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

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

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

      CompositionEnablerForm getCompositionEnablerFormForCreate(Type[] compositionEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the composition enabler form for creating new composition enablers. A new form should be requested for each create transaction.
      Parameters:
      compositionEnablerRecordTypes - array of composition enabler types
      Returns:
      the composition enabler form
      Throws:
      NullArgumentException - compositionEnablerRecordTypes 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.
    • createCompositionEnabler

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

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

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

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

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

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

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

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