Interface PriceEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface PriceEnablerAdminSession extends OsidSession

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

  • Method Details

    • getStoreId

      Id getStoreId()
      Gets the Store Id associated with this session.
      Returns:
      the Store Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getStore

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

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

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

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

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

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

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

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

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

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

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

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