Interface PriceEnablerRuleLookupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface PriceEnablerRuleLookupSession extends OsidSession

This session provides methods to retrieve PriceEnabler to Price mappings. A Price with multiple PriceEnablers means any positive rule evaluation across the enablers result in an effective Price .

This lookup session defines several views:

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete result set or is an error condition
  • isolated store view: All methods in this session operate, retrieve and pertain price enablers defined explicitly in the current store
  • federated store view: All methods in this session operate, retrieve and pertain to all price enablers defined in this store and any other price enablers implicitly available in this store through store inheritence.
  • 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.
    • canLookupPriceEnablerPriceMappings

      boolean canLookupPriceEnablerPriceMappings()
      Tests if this user can perform lookups of price enabler/price mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known lookup 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 looking up mappings is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativePriceEnablerPriceView

      void useComparativePriceEnablerPriceView()
      The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
      Compliance:
      mandatory - This method is must be implemented.
    • usePlenaryPriceEnablerPriceView

      void usePlenaryPriceEnablerPriceView()
      A complete view of the PriceEnabler and Price returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
      Compliance:
      mandatory - This method is must be implemented.
    • useFederatedStoreView

      void useFederatedStoreView()
      Federates the view for methods in this session. A federated view will include price enablers in stores which are children of this store in the store hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedStoreView

      void useIsolatedStoreView()
      Isolates the view for methods in this session. An isolated view restricts lookups to this store only.
      Compliance:
      mandatory - This method is must be implemented.
    • getPriceEnablerIdsForPrice

      IdList getPriceEnablerIdsForPrice(Id priceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the PriceEnabler Id associated with a Price .
      Parameters:
      priceId - Id of the Price
      Returns:
      the price enabler Ids
      Throws:
      NotFoundException - priceId is not found
      NullArgumentException - priceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPriceEnablersForPrice

      Gets the PriceEnabler associated with a Price .
      Parameters:
      priceId - Id of the Price
      Returns:
      the price enablers
      Throws:
      NotFoundException - priceId is not found
      NullArgumentException - priceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPriceEnablersForPriceOnDate

      PriceEnablerList getPriceEnablersForPriceOnDate(Id priceId, DateTime date) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the PriceEnablers associated with a Price and the given date is within the effective dates inclusive.
      Parameters:
      priceId - Id of the Price
      date - a date
      Returns:
      the price enablers
      Throws:
      NotFoundException - priceId is not found
      NullArgumentException - priceId or date is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPriceIdsByPriceEnabler

      IdList getPriceIdsByPriceEnabler(Id priceEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the Price Ids mapped to a PriceEnabler .
      Parameters:
      priceEnablerId - Id of a PriceEnabler
      Returns:
      list of price Ids
      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.
    • getPricesByPriceEnabler

      PriceList getPricesByPriceEnabler(Id priceEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the Prices mapped to a PriceEnabler .
      Parameters:
      priceEnablerId - Id of a PriceEnabler
      Returns:
      list of prices
      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.