Interface PriceScheduleStoreAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface PriceScheduleStoreAssignmentSession extends OsidSession

This session provides methods to re-assign PriceSchedules to Stores . A Price may map to multiple Stores and removing the last reference to a PriceSchedule is the equivalent of deleting it. Each Store may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a PriceSchedule to another Store is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignPriceSchedules

      boolean canAssignPriceSchedules()
      Tests if this user can alter price schedule/store mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignPriceSchedulesToStore

      boolean canAssignPriceSchedulesToStore(Id storeId)
      Tests if this user can alter price schedule/store mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer lookup assignment to unauthorized users.
      Parameters:
      storeId - the Id of the Store
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - storeId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableStoreIds

      IdList getAssignableStoreIds(Id storeId) throws OperationFailedException
      Gets a list of stores including and under the given store node in which any price schedule can be assigned.
      Parameters:
      storeId - the Id of the Store
      Returns:
      list of assignable store Ids
      Throws:
      NullArgumentException - storeId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableStoreIdsForPriceSchedule

      IdList getAssignableStoreIdsForPriceSchedule(Id storeId, Id priceScheduleId) throws OperationFailedException
      Gets a list of stores including and under the given store node in which a specific price schedule can be assigned.
      Parameters:
      storeId - the Id of the Store
      priceScheduleId - the Id of the PriceSchedule
      Returns:
      list of assignable store Ids
      Throws:
      NullArgumentException - storeId or priceScheduleId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignPriceScheduleToStore

      void assignPriceScheduleToStore(Id pricScheduleeId, Id storeId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing PriceSchedule to a Store .
      Parameters:
      pricScheduleeId - the Id of the PriceSchedule
      storeId - the Id of the Store
      Throws:
      AlreadyExistsException - priceScheduleId is already assigned to storeId
      NotFoundException - priceScheduleId or storeId not found
      NullArgumentException - priceScheduleId or storeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignPriceScheduleFromStore

      void unassignPriceScheduleFromStore(Id priceScheduleId, Id storeId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a PriceSchedule from a Store .
      Parameters:
      priceScheduleId - the Id of the PriceSchedule
      storeId - the Id of the Store
      Throws:
      NotFoundException - priceScheduleId or storeId not found or priceScheduleId not assigned to storeId
      NullArgumentException - priceScheduleId or storeId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignPriceScheduleToStore

      void reassignPriceScheduleToStore(Id priceScheduleId, Id fromStoreId, Id toStoreId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a PriceSchedule from one Store to another. Mappings to other Stores are unaffected.
      Parameters:
      priceScheduleId - the Id of the PriceSchedule
      fromStoreId - the Id of the current Store
      toStoreId - the Id of the destination Store
      Throws:
      AlreadyExistsException - priceScheduleId already assigned to storeId
      NotFoundException - priceScheduleId, fromStoreId , or toStoreId not found or priceScheduleId not mapped to fromStoreId
      NullArgumentException - priceScheduleId, fromStoreId , or toStoreId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.