com.ibm.commerce.supplychain.beans

Class SupplierHubUserEligibleBuyerContractRegistry

  • java.lang.Object
    • com.ibm.commerce.registry.AbstractManagedDynamicCacheRegistry
      • com.ibm.commerce.supplychain.beans.SupplierHubUserEligibleBuyerContractRegistry
  • All Implemented Interfaces:
    com.ibm.commerce.registry.ElementUpdate, com.ibm.commerce.registry.ManagedDynamicCache, com.ibm.commerce.registry.Registry


    public class SupplierHubUserEligibleBuyerContractRegistry
    extends com.ibm.commerce.registry.AbstractManagedDynamicCacheRegistry
    This registry caches the buyer contracts which a user is eligible for in supplier hosted stores which a supplier hub is associated with.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      The IBM copyright string.
      static java.lang.String REGISTRY_NAME
      The name of this registry.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object createKey(java.lang.String astrKey)
      No-op.
      java.lang.String createKeyString(com.ibm.commerce.datatype.TypedProperty aTypedProperty)
      No-op.
      java.lang.Long[] getEligibleBuyerContractIds(java.lang.Integer anSupplierHubStoreId, java.lang.Long anUserId)
      Returns the eligible buyer contract IDs, default contracts excluded.
      java.lang.Long[] getEligibleContractIds(java.lang.Integer anSupplierHubStoreId, java.lang.Long anUserId)
      Returns the eligible contract IDs, default contracts included.
      static SupplierHubUserEligibleBuyerContractRegistry getInstance()
      Returns the unique instance of this registry.
      void initialize()
      Initializes this registry.
      void populate(com.ibm.commerce.registry.LRUDynamicHashtable aCache)
      No-op.
      java.lang.Object retrieve(java.lang.Object aKey)
      Returns the buyer contracts which a user is eligible for in supplier hosted stores which a supplier hub is associated with.
      • Methods inherited from class com.ibm.commerce.registry.AbstractManagedDynamicCacheRegistry

        addElement, findObject, getCache, getCacheSize, getElement, getElementCount, getElements, getEvictions, getHits, getKeys, getMisses, getUsedCacheSize, refresh, removeAllElements, removeElement, setCache, setCacheSize, setInitialCapacity, setLoadFactor, update
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The IBM copyright string.
        See Also:
        Constant Field Values
      • REGISTRY_NAME

        public static final java.lang.String REGISTRY_NAME
        The name of this registry.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SupplierHubUserEligibleBuyerContractRegistry

        public SupplierHubUserEligibleBuyerContractRegistry()
        Constructor for SupplierHubUserEligibleBuyerContractRegistry.
    • Method Detail

      • createKey

        public java.lang.Object createKey(java.lang.String astrKey)
                                   throws java.lang.Exception
        No-op.
        Specified by:
        createKey in interface com.ibm.commerce.registry.ElementUpdate
        Specified by:
        createKey in class com.ibm.commerce.registry.AbstractManagedDynamicCacheRegistry
        Parameters:
        astrKey -
        Returns:
        null
        Throws:
        java.lang.Exception
        See Also:
        ElementUpdate#createKey(String)
      • createKeyString

        public java.lang.String createKeyString(com.ibm.commerce.datatype.TypedProperty aTypedProperty)
                                         throws java.lang.Exception
        No-op.
        Specified by:
        createKeyString in interface com.ibm.commerce.registry.ElementUpdate
        Specified by:
        createKeyString in class com.ibm.commerce.registry.AbstractManagedDynamicCacheRegistry
        Parameters:
        aTypedProperty -
        Returns:
        null
        Throws:
        java.lang.Exception
        See Also:
        ElementUpdate#createKeyString(TypedProperty)
      • getEligibleBuyerContractIds

        public java.lang.Long[] getEligibleBuyerContractIds(java.lang.Integer anSupplierHubStoreId,
                                                            java.lang.Long anUserId)
                                                     throws com.ibm.commerce.exception.ECException
        Returns the eligible buyer contract IDs, default contracts excluded.
        Parameters:
        anSupplierHubStoreId - the supplier hub store ID.
        anUserId - the user ID.
        Returns:
        the contract IDs.
        Throws:
        com.ibm.commerce.exception.ECException
      • getEligibleContractIds

        public java.lang.Long[] getEligibleContractIds(java.lang.Integer anSupplierHubStoreId,
                                                       java.lang.Long anUserId)
                                                throws com.ibm.commerce.exception.ECException
        Returns the eligible contract IDs, default contracts included.
        Parameters:
        anSupplierHubStoreId - the supplier hub store ID.
        anUserId - the user ID.
        Returns:
        the contract IDs.
        Throws:
        com.ibm.commerce.exception.ECException
      • initialize

        public void initialize()
                        throws java.lang.Exception
        Initializes this registry.
        Specified by:
        initialize in interface com.ibm.commerce.registry.Registry
        Overrides:
        initialize in class com.ibm.commerce.registry.AbstractManagedDynamicCacheRegistry
        Throws:
        java.lang.Exception
      • populate

        public void populate(com.ibm.commerce.registry.LRUDynamicHashtable aCache)
                      throws java.lang.Exception
        No-op.
        Specified by:
        populate in class com.ibm.commerce.registry.AbstractManagedDynamicCacheRegistry
        Parameters:
        aCache -
        Throws:
        java.lang.Exception
        See Also:
        AbstractManagedDynamicCacheRegistry.populate(LRUDynamicHashtable)
      • retrieve

        public java.lang.Object retrieve(java.lang.Object aKey)
                                  throws java.lang.Exception
        Returns the buyer contracts which a user is eligible for in supplier hosted stores which a supplier hub is associated with.
        Specified by:
        retrieve in class com.ibm.commerce.registry.AbstractManagedDynamicCacheRegistry
        Parameters:
        aKey - a list of key values (List):
        • 0 - the supplier hub store ID (Integer).
        • 1 - the user ID (Long).
        Returns:
        a list of return values (Object[]):
        • 0 - the contract IDs (Long[]).
        • 1 - the expiry time (Timestamp).
        Throws:
        java.lang.Exception
        See Also:
        SupplyChainHelper.getEligibleBuyerContractIdsWithExpiryTime(Long, Integer), AbstractManagedDynamicCacheRegistry.retrieve(Object)