Interface CommissionEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CommissionEnablerAdminSession extends OsidSession

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

  • 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.
    • canCreateCommissionEnabler

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

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

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

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

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

      CommissionEnablerForm getCommissionEnablerFormForUpdate(Id commissionEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the commission enabler form for updating an existing commission enabler. A new commission enabler form should be requested for each update transaction.
      Parameters:
      commissionEnablerId - the Id of the CommissionEnabler
      Returns:
      the commission enabler form
      Throws:
      NotFoundException - commissionEnablerId is not found
      NullArgumentException - commissionEnablerd is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateCommissionEnabler

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

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

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

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

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