Interface PriceEnablerStoreAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface PriceEnablerStoreAssignmentSession extends OsidSession

This session provides methods to re-assign PriceEnabler to Store mappings. A PriceEnabler may appear in multiple Store objects and removing the last reference to a PriceEnabler 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 PriceEnabler to another Store is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignPriceEnablers

      boolean canAssignPriceEnablers()
      Tests if this user can alter price enabler/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 operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignPriceEnablersToStore

      boolean canAssignPriceEnablersToStore(Id storeId)
      Tests if this user can alter price enabler/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 operations 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 enabler 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.
    • getAssignableStoreIdsForPriceEnabler

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

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

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

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