com.ibm.commerce.inventory.facade.server.helper

Class ResolveIdHelper

  • java.lang.Object
    • com.ibm.commerce.inventory.facade.server.helper.ResolveIdHelper


  • public class ResolveIdHelper
    extends java.lang.Object
    This class is a helper to resolve object ID by object identifier. For example, it can get the catalog entry ID by the part number.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM Copyright notice field.
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
    • Method Detail

      • getCatentryIdsByPartNumbersForStore

        public static java.util.List getCatentryIdsByPartNumbersForStore(java.util.List aPartNumbers)
                                                                  throws AbstractApplicationException
        Get catalog entry IDs by part numbers. This method by default uses IBM_Store_CatalogEntryAttributes access profile to query catalog entry, which checks entitlement and buyable property. Request initiated from store should call this method. The access profile can be configured in component configuration in configuration group "CheckInventoryAvailability" with property name "accessprofile_getCatentryByPartNumber".
        Parameters:
        aPartNumbers - A list of part numbers.
        Returns:
        A list of catalog entry Ids.
        Throws:
        AbstractApplicationException - If problem occurs.
      • getCatentryIdsByPartNumbers

        public static java.util.List getCatentryIdsByPartNumbers(java.util.List aPartNumbers)
                                                          throws AbstractApplicationException
        Get catalog entry Ids by part numbers. This method uses IBM_Admin_Summary access profile to query catalog entry by default, which bypass entitlement and buyable check. Request initiated from backend should call this method, such as SyncInventoryAvailability. The access profile can be configured in component configuration in configuration group "SyncInventoryAvailability" with property name "accessprofile_getCatentryByPartNumber".
        Parameters:
        aPartNumbers - A list of part numbers.
        Returns:
        A list of catalog entry IDs.
        Throws:
        AbstractApplicationException - If problem occurs.
      • getOnlineStoreIdsByNameIdentifiers

        public static java.util.List getOnlineStoreIdsByNameIdentifiers(java.util.List aOnlineStoreNameIdentifiers)
                                                                 throws AbstractApplicationException
        This method gets the online store ID list by the store's name identifiers.
        Parameters:
        aOnlineStoreNameIdentifiers - a list of online store's name identifiers in String type.
        Returns:
        a list of online store IDs in String type.
        Throws:
        AbstractApplicationException
      • getPhysicalStoreIdByExternalIdentifierAndStoreId

        public static java.lang.String getPhysicalStoreIdByExternalIdentifierAndStoreId(java.lang.String physicalStoreExternalIdentifier,
                                                                                        java.lang.String storeId)
                                                                                 throws AbstractApplicationException
        Find the web store level physical store Id by the identifier and web store Id.
        Parameters:
        physicalStoreExternalIdentifier - The identifier of the physical store.
        storeId - The unique Id of the web store which the physical store belongs to.
        Returns:
        The unique Id of the physical store. Returns null when either physicalStoreExternalIdentifier or storeId is null or empty. Returns null when no matching physical store is found.
        Throws:
        AbstractApplicationException
      • resolvePhysicalStoreIdFromExternalIdentifer

        public static java.lang.String resolvePhysicalStoreIdFromExternalIdentifer(java.lang.String identifier)
                                                                            throws AbstractApplicationException
        Resolve physical store Id from the external identifier. It checks the store Id in business context, and tries to resolve the physical store with identifier and store Id combination. If that finds nothing, it tries to find site level physical store by the identifier.
        Parameters:
        identifier - The external identifier of the physical store.
        Returns:
        The physical store unique Id. Returns null when a matching physical store is not found.
        Throws:
        AbstractApplicationException
      • getPhysicalStoreIdsByExternalIdentifiers

        public static java.util.List getPhysicalStoreIdsByExternalIdentifiers(java.util.List aPhysicalStoreExternalIdentifiers)
                                                                       throws AbstractApplicationException
        This method gets the physical store IDs list by the physical store's external identifiers.
        Parameters:
        aPhysicalStoreExternalIdentifiers - a list of physical store's external identifiers in String type.
        Returns:
        a list of physical store IDs in String type.
        Throws:
        AbstractApplicationException
      • getCatentryPartNumbersByIds

        public static java.util.List getCatentryPartNumbersByIds(java.util.List aCatalogEntryIds)
                                                          throws AbstractApplicationException
        This method gets the catalog entry part numbers list by the catalog entry Ids.
        Parameters:
        aCatalogEntryIds - a list of catalog entry ids in String type.
        Returns:
        a list of catalog entry part numbers in String type.
        Throws:
        AbstractApplicationException
      • getOnlineStoreNameIdentifiersByIds

        public static java.util.List getOnlineStoreNameIdentifiersByIds(java.util.List aOnlineStoreNameIds)
                                                                 throws AbstractApplicationException
        This method gets the online store name identifiers list by the store's IDs.
        Parameters:
        aOnlineStoreNameIds - a list of online store's IDs in String type.
        Returns:
        a list of online store name identifiers in String type.
        Throws:
        AbstractApplicationException
      • getPhysicalStoreExternalIdentifiersByIds

        public static java.util.List getPhysicalStoreExternalIdentifiersByIds(java.util.List aPhysicalStoreIds)
                                                                       throws AbstractApplicationException
        This method gets the physical store external identifiers list by the physical store's IDs.
        Parameters:
        aPhysicalStoreIds - a list of physical store's IDs in String type.
        Returns:
        a list of physical store external identifiers in String type.
        Throws:
        AbstractApplicationException