com.ibm.commerce.supplychain.beans

Class SupplyChainHelper

  • java.lang.Object
    • com.ibm.commerce.supplychain.beans.SupplyChainHelper


  • public class SupplyChainHelper
    extends java.lang.Object
    Helper class for the supply chain business model.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      The IBM copyright string.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Integer getCatalogEntryRelatedStoreId(java.lang.Long anCatalogEntryId)
      Returns the store which a catalog entry is related to through the STORECENT table.
      java.lang.Integer getCategoryRelatedStoreId(java.lang.Long anCategoryId)
      Returns the store which a category is related to through the STORECGRP table.
      java.lang.Object[] getEligibleBuyerContractIdsWithExpiryTime(java.lang.Long anUserId, java.lang.Integer anSupplierHubStoreId)
      Returns the buyer contracts which a user is eligible for in supplier hosted stores which a supplier hub is associated with.
      com.ibm.commerce.contract.objects.TradingAgreementAccessBean[] getEligibleContracts(java.lang.Integer anStoreId, java.lang.Long anUserId)
      Returns the contracts which a user is eligible to in a (supplier hosted) store.
      com.ibm.commerce.contract.objects.TradingAgreementAccessBean[] getEligibleContracts(java.lang.Integer anStoreId, java.lang.Long anUserId, com.ibm.commerce.command.CommandContext cc)
      Returns the contracts which a user is eligible to in a (supplier hosted) store.
      static SupplyChainHelper getInstance()
      Returns the unique instance of this class.
      java.lang.Integer[] getSupplierHostedStoreIds(java.lang.Integer anSupplierHubStoreId)
      Returns the supplier hosted stores which a supplier hub is associated with.
      boolean isCatalogEntryEntitled(java.lang.Long anCatalogEntryId, java.lang.Long anUserId)
      Returns whether a user is entitled to a catalog entry.
      boolean isCatalogEntryEntitled(java.lang.Long anCatalogEntryId, java.lang.Long anUserId, com.ibm.commerce.command.CommandContext cc)
      Returns whether a user is entitled to a catalog entry.
      boolean isSupplierHostedStore(java.lang.Integer anStoreId)
      Returns whether a store is a supplier hosted store.
      boolean isSupplierHub(java.lang.Integer anStoreId)
      Returns whether a store is a supplier hub.
      • 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
    • Method Detail

      • getCatalogEntryRelatedStoreId

        public java.lang.Integer getCatalogEntryRelatedStoreId(java.lang.Long anCatalogEntryId)
                                                        throws com.ibm.commerce.exception.ECException
        Returns the store which a catalog entry is related to through the STORECENT table.
        Parameters:
        anCatalogEntryId - the catalog entry ID.
        Returns:
        the store ID.
        Throws:
        com.ibm.commerce.exception.ECException
      • getCategoryRelatedStoreId

        public java.lang.Integer getCategoryRelatedStoreId(java.lang.Long anCategoryId)
                                                    throws com.ibm.commerce.exception.ECException
        Returns the store which a category is related to through the STORECGRP table.
        Parameters:
        anCategoryId - the category ID.
        Returns:
        the store ID.
        Throws:
        com.ibm.commerce.exception.ECException
      • getEligibleContracts

        public com.ibm.commerce.contract.objects.TradingAgreementAccessBean[] getEligibleContracts(java.lang.Integer anStoreId,
                                                                                                   java.lang.Long anUserId)
                                                                                            throws com.ibm.commerce.exception.ECException
        Returns the contracts which a user is eligible to in a (supplier hosted) store.
        Parameters:
        anStoreId - the (supplier hosted) store ID.
        anUserId - the user ID.
        Returns:
        the contract IDs.
        Throws:
        com.ibm.commerce.exception.ECException
      • getEligibleContracts

        public com.ibm.commerce.contract.objects.TradingAgreementAccessBean[] getEligibleContracts(java.lang.Integer anStoreId,
                                                                                                   java.lang.Long anUserId,
                                                                                                   com.ibm.commerce.command.CommandContext cc)
                                                                                            throws com.ibm.commerce.exception.ECException
        Returns the contracts which a user is eligible to in a (supplier hosted) store.
        Parameters:
        anStoreId - the (supplier hosted) store ID.
        anUserId - the user ID.
        cc - the command context
        Returns:
        the contract IDs.
        Throws:
        com.ibm.commerce.exception.ECException
      • getInstance

        public static SupplyChainHelper getInstance()
        Returns the unique instance of this class.
        Returns:
        the instance.
      • getSupplierHostedStoreIds

        public java.lang.Integer[] getSupplierHostedStoreIds(java.lang.Integer anSupplierHubStoreId)
                                                      throws com.ibm.commerce.exception.ECException
        Returns the supplier hosted stores which a supplier hub is associated with.
        Parameters:
        anSupplierHubStoreId - the supplier hub store ID.
        Returns:
        the supplier hosted store IDs.
        Throws:
        com.ibm.commerce.exception.ECException
      • isCatalogEntryEntitled

        public boolean isCatalogEntryEntitled(java.lang.Long anCatalogEntryId,
                                              java.lang.Long anUserId)
                                       throws com.ibm.commerce.exception.ECException
        Returns whether a user is entitled to a catalog entry.
        Parameters:
        anCatalogEntryId - the catalog entry ID.
        anUserId - the user ID.
        Returns:
        true if the user is entitled to the catalog entry.
        Throws:
        com.ibm.commerce.exception.ECException
      • isCatalogEntryEntitled

        public boolean isCatalogEntryEntitled(java.lang.Long anCatalogEntryId,
                                              java.lang.Long anUserId,
                                              com.ibm.commerce.command.CommandContext cc)
                                       throws com.ibm.commerce.exception.ECException
        Returns whether a user is entitled to a catalog entry.
        Parameters:
        anCatalogEntryId - the catalog entry ID.
        anUserId - the user ID.
        Returns:
        true if the user is entitled to the catalog entry.
        Throws:
        com.ibm.commerce.exception.ECException
      • isSupplierHostedStore

        public boolean isSupplierHostedStore(java.lang.Integer anStoreId)
                                      throws com.ibm.commerce.exception.ECException
        Returns whether a store is a supplier hosted store.
        Parameters:
        anStoreId - the store ID.
        Returns:
        true if the store is a supplier hosted store.
        Throws:
        com.ibm.commerce.exception.ECException
      • isSupplierHub

        public boolean isSupplierHub(java.lang.Integer anStoreId)
                              throws com.ibm.commerce.exception.ECException
        Returns whether a store is a supplier hub.
        Parameters:
        anStoreId - the store ID.
        Returns:
        true if the store is a supplier hub.
        Throws:
        com.ibm.commerce.exception.ECException