com.ibm.commerce.catalog.facade.server.helpers

Class CatalogComponentHelper

  • java.lang.Object
    • com.ibm.commerce.catalog.facade.server.helpers.CatalogComponentHelper


  • public class CatalogComponentHelper
    extends java.lang.Object
    This class has some the common methods that are used by the catalog component.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.util.Map<java.lang.String,java.lang.Integer> CALCODE_CODEID_TO_USAGEID_MAP
      A map of calculation code usage ID strings to the usage identifier: DiscountCalculationCodeUniqueId:-1 ShippingCalculationCodeUniqueId:-2 SalesTaxCalculationCodeUniqueId:-3 ShippingTaxCalculationCodeUniqueId:-4 CouponCalculationCodeUniqueId:-5 SurchargeCalculationCodeUniqueId:-6 ShippingAdjustmentCalculationCodeUniqueId:-7
      static java.util.List CALCODE_ID_LIST
      Array of supported calculation code usage unique ID strings: DiscountCalculationCodeUniqueId ShippingCalculationCodeUniqueId SalesTaxCalculationCodeUniqueId ShippingTaxCalculationCodeUniqueId CouponCalculationCodeUniqueId SurchargeCalculationCodeUniqueId ShippingAdjustmentCalculationCodeUniqueId
      static java.util.List CALCODE_NAME_LIST
      Array of supported calculation code usage names: DiscountCalculationCode ShippingCalculationCode SalesTaxCalculationCode ShippingTaxCalculationCode CouponCalculationCode SurchargeCalculationCode ShippingAdjustmentCalculationCode
      static java.util.Map<java.lang.Integer,java.lang.String> CALCODE_USAGEID_TO_NAME_MAP
      A map of calculation code usage identifiers (in CALUSAGE table) to the usage name: -1:DiscountCalculationCode -2:ShippingCalculationCode -3:SalesTaxCalculationCode -4:ShippingTaxCalculationCode -5:CouponCalculationCode -6:SurchargeCalculationCode -7:ShippingAdjustmentCalculationCode
      static java.lang.String DEFAULT_DEVICE_TYPE_ID
      Default Device Type ID used to retrieve display template for Catalog Entry and Catalog Group details access profile from tables DISPENTREL and DISPCGPREL respectively.
      static java.lang.Long DEFAULT_MEMBER_ID
      Default Member ID used to retrieve display template for Catalog Entry and Catalog Group details access profile from tables DISPENTREL and DISPCGPREL respectively.
      static java.lang.String STORE_TYPE_SCP
      Store type for the Supplier Marketplace Hub store.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String appendStringWithTimeStamp(java.lang.String astrString, int anMaxLengthOfString)
      Append a timestamp to a string and return the new string.
      static StoreIdentifierType buildStoreIdentifier(StoreCatalogEntryRelation storeCatentryRel)
      Builds the store identifier given the store catalog entry relation.
      static StoreIdentifierType buildStoreIdentifier(StoreCatalogGroupRelation storeCatgroupRel)
      Builds the store identifier given the store catalog group relation.
      static boolean canResolveNoun(SelectionCriteria query)
      Resolves a noun according to the selection criteria passed as SelectionCriteria object.
      static java.lang.Long[] checkCatalogGroupEntitlement(java.lang.Long[] catalogGroupIds, java.lang.Boolean isAdminMode)
      This method whether the passed in array of catalog group internal identifiers is explicity included or excluded in regards to entitlement.
      static boolean checkCatalogGroupEntitlement(java.lang.String cmdName, java.lang.Long anCatalogGroupId)
      Determines whether the passed in catalog group ID is explicity included or excluded in regards to entitlement.
      static boolean checkEntitlementForCatentry(java.lang.String cmdName, java.lang.Long catentryId)
      This method checks if a catentry is entitled to the user or not.
      static boolean checkSEOEnabled()
      Checks if SEO feature is enabled or not.
      static CatalogEntryType createCatalogEntryDataObject(CatalogEntryIdentifierType catEntryId)
      This method creates an instance of CatalogEntryType object using the given catalog entry identifier.
      static com.ibm.commerce.catalog.facade.server.entity.datatypes.Attr findAttributeByAttrDictIDAndIdentifier(java.lang.String attrDictID, java.lang.String identifier)
      This method is used to find and return a physical Attr object based on the passed attribute dictionary ID attrDictID and the attribute identifier identifier.
      static com.ibm.commerce.catalog.facade.server.entity.datatypes.Attr getAttributeDictionaryAttribute(java.lang.String attrId)
      This method gets the physical attribute dictionary attribute record , given the attribute id
      static PhysicalDataContainer getAttributeDictionaryAttributeAllValueDescriptions(java.lang.String attrValId)
      This method is used get the physical attribute value description objects in all languages AttributeValueDescription based on the passed parameters of attribute value id.
      static PhysicalDataContainer getAttributeDictionaryAttributeValueDescriptions(java.lang.String attrValId, java.lang.String languageId)
      This method is used get the physical attribute value description objects AttributeValueDescription based on the passed parameters of attribute value id and language id.
      static PhysicalDataContainer getAttributeDictionaryAttributeValues(java.lang.String attributeID, java.util.List attributeValueIDs)
      This method is used get the physical attribute value objects AttrVal based on the passed parameters of attribute ID and attributeValueIDs.
      static java.lang.String getAttributeDictionaryIdInCurrentStore()
      This method gets attribute dictoinary id for current store
      static java.util.List getAttributeValues(java.lang.String aatrUniqueID)
      Get the list of atribute values.
      static CatalogContext getCatalogContext()
      This method gets the catalog context from the service context.
      static PhysicalDataContainer getCatalogEntryAttributeRelations(java.util.List catalogEntryIDs, java.util.List attributeIDs)
      This method is used get the physical catalog entry attribute relation records CatalogEntryAttributeRelation based on the passed parameters of list of catalog entry IDs and attribute IDs.
      static PhysicalDataContainer getCatalogEntryAttributeRelations(java.lang.String catalogEntryID, java.lang.String attributeID)
      This method is used get the physical catalog entry attribute relation.
      static PhysicalDataContainer getCatalogEntryAttributeRelationsForDifferentAttributeUsage(java.lang.String catalogEntryID, java.lang.String attributeID, java.lang.String usage)
      This method is used get the physical catalog entry attribute relation of differet usage than the usage type provided.
      static java.util.Map<java.lang.String,java.util.List<java.lang.String>> getCatalogEntryAttributesByNames(java.lang.String catentryId, java.lang.String languageId, java.lang.String[] attributeNames)
      Gets the attributes of a catalog entry according to sepcified attribute names.
      static java.util.Map getCatalogEntryUniqueIdsByPartNumbers(java.util.List partNumbers)
      Find the catalog entry ids by given a list of part number and store path.
      static java.lang.Long getCatalogGroupId(CatalogGroupIdentifierType identifierType)
      This method resolves the catalog group ID of the catalog group.
      static java.lang.String getCatalogGroupIdByIdentifierAndOwnerID(java.lang.String identifier, java.lang.String ownerID)
      Gets the catalog group unique ID given the external identifier and owner ID.
      static java.lang.String getCatalogGroupIdentifier(java.lang.String uniqueId)
      Get the external identifier of a catalog group according to its unique id.
      static java.lang.Long getCatalogId()
      Gets the catalog ID from the catalog context.
      static java.util.List getCatalogIDsOfCatalogGroup(java.lang.String catalogGroupID)
      This method returns the list of Catalog IDs which contains the catalog group whose UniqueId is passed in request.
      static com.ibm.commerce.datatype.TransactionCachedMap getCatalogNavigationTransactionCacheMap()
      Get TransactionCacheMap for catalog navigation usage.
      static java.lang.String getCatalogOwnerId()
      Gets the catalog owner ID.
      static java.lang.Integer[] getCatalogStorePath()
      This method returns the store path ids which the current store has the 'com.ibm.commerce.catalog' store relationship type with.
      static ChangeControlBusinessObjectMediator getChangeControlMediator(java.lang.Object noun)
      Returns the ChangeControlMediator after initializing it with the noun being passed.
      static java.util.List<CatalogEntry> getChildIDAndTypeOfCatalogEntry(java.lang.String catalogEntryID)
      This method is used to return a list of CatalogEntry objects which only contains Catalog Entry ID and Type of the child SKUs catalog entry identified by the passed parameter of catalog entry ID.
      static java.util.List getChildSKUsOfCatalogEntry(java.lang.String catalogEntryID)
      This method is used to return a list of CatalogEntry objects which are child SKUs of the catalog entry identified by the passed parameter of catalog entry ID.
      static boolean getCurrentCmcVersionIsFEP8orHigher()
      This method returns if the CMC feature is currently at FEP8 or higher.
      static java.lang.String getDefaultCatalogId(java.lang.String storeId)
      Returns the default catalogId for the store
      static java.lang.String getDefaultCurrency()
      This method returns the default currency of the current store in context.
      static java.lang.String getDefaultLanguageId()
      This method returns the default language id of the current store in context.
      static java.util.Map<java.lang.Long,java.util.Map<java.lang.Long,java.util.List<java.lang.Long>>> getEntitledCatalogEntryRelationMap(CatalogNavigationViewType catalogNavigationView)
      Get entitled catalog entry ralations for CatalogNavigationViewType object.
      static java.util.Vector[] getExclusionPS(java.lang.String cmdName)
      Gets the exclusion product set of contracts.
      static java.lang.String getIdentifierForStore(java.lang.Integer storeId)
      Gets the identifier for the given store.
      static java.util.Vector[] getInclusionPS(java.lang.String cmdName)
      Gets the inclusion product sets in the contracts applicable to the user.
      static java.lang.Integer getLanguageId()
      This method gets the language ID from the service context.
      static java.lang.String getMasterCatalogId()
      Gets the master catalog ID of the store in context.
      static java.lang.String getOwnerId(CatalogEntryIdentifierType aCatalogEntryIdentifier)
      Gets the owner id for the given Catalog Entry Identifier.
      static java.lang.String getOwnerId(CatalogEntryType aCatalogEntry)
      Gets the owner id for the given Catalog Entry.
      static java.lang.String getOwnerId(CatalogGroupIdentifierType aCatalogGroupIdentifier)
      Gets the owner id for the given Catalog Group Identifier.
      static java.lang.String getOwnerId(CatalogGroupType aCatalogGroup)
      Gets the owner id for the given Catalog Group.
      static java.lang.String getOwnerId(CatalogIdentifierType aCatalogIdentifier)
      Gets the owner id for the given Catalog Identifier.
      static java.lang.String getOwnerId(CatalogType aCatalog)
      Gets the owner id for the given Catalog.
      static java.lang.Long getOwnerIdForAttribute(java.lang.String attrId)
      Returns the owner id of the given attribute Id.
      static java.lang.Long getOwnerIdForAttributeDictionary(java.lang.String attrDictId)
      Returns the owner id of the given attribute dictionary Id.
      static java.lang.Long getOwnerIdForAttributeGroup(java.lang.String attrGrpId)
      Returns the owner id of the given attribute group Id.
      static java.lang.String getOwnerIdForCatalogId(java.lang.String catalogId)
      Returns the owner id of the given catalog Id.
      static java.lang.String getOwnerIdForCatentryId(java.lang.String catalogEntryId)
      Returns the owner id of the given catalog entry Id.
      static java.lang.String getOwnerIdForCatgroupId(java.lang.String catalogGroupId)
      Returns the owner id of the given catalog group Id.
      static java.lang.String getOwnerIdForStore(java.lang.Integer storeId)
      Gets the owner Id for the given store.
      static java.lang.Integer getOwnerStoreId(CatalogEntryIdentifierType catentryIdentifier)
      Returns the store id for the given catalog entry identifier.
      static java.lang.Integer getOwnerStoreId(CatalogGroupIdentifierType catgroupIdentifier)
      Returns the store id for the given catalog group identifier.
      static long getParentCatalogEntryID(CatalogEntryIdentifierType catIdentifier)
      This method gets the parent catalog entry id , given the unique or catentry identifier is present in the input CatalogEntryIdentifierType.
      static long getParentCatalogGroupID(CatalogEntryIdentifierType catIdentifier)
      This method gets the parent catalog group id , given the unique or catentry identifier is present in the input CatalogEntryIdentifierType.
      static long getParentCatalogGroupID(CatalogGroupIdentifierType catIdentifier)
      This method gets the parent catalog group id , given the unique or catentry identifier is present in the input CatalogGroupIdentifierType.
      static java.lang.String getPartNumber(CatalogEntryType aCatEntry)
      This method returns the part number of the given catalog entry.
      static java.lang.String getPartNumber(java.lang.String uniqueId)
      Get the part number of a catalog entry according to its unique id.
      static com.ibm.commerce.catalog.facade.server.entity.datatypes.Attr getPhysicalAttributeDictionaryAttribute(PhysicalDataContainer aPhysicalDataContainer, com.ibm.commerce.catalog.facade.datatypes.AttributeDictionaryAttributeType aAttributeDictionaryAttribute)
      Find the ATTR physical object in the given physical data container for the given logical attribute dictionary attribute noun.
      static CatalogEntry getPhysicalCatentryBasicProfile(CatalogEntryIdentifierType catIdentifier)
      This method gets the physical catalog entry row , given the unique or catentry identifier is present in the input CatalogEntryIdentifierType.
      static CatalogEntry getPhysicalCatentryBasicProfile(java.lang.String catalogEntryID)
      This method is used to find and return a physical CatalogEntry object based on the passed catalogEntryID parameter using the IBM_Admin_CatalogEntry_Basic_Id access profile.
      static CatalogEntry getPhysicalCatentrySummaryProfile(CatalogEntryIdentifierType catIdentifier)
      This method gets the physical catalog entry type , given the unique or catentry identifier is present in the input CatalogEntryIdentifierType.
      static CatalogGroup getPhysicalCatgroup(CatalogGroupIdentifierType catgrpIdentifier)
      This method gets the physical catalog group type , given the unique or catgroup identifier is present in the input CatalogGroupIdentifierType.
      static java.util.List getSelectIDs(java.lang.String queryName, java.util.Map paramMap, java.lang.String columnName)
      Return a list of IDs from the select query.
      static java.lang.String getStoreDirectory(java.lang.Integer storeId)
      Returns the store directory name of the given store.
      static java.lang.Integer getStoreId()
      This method gets the store ID from the service context.
      static java.lang.String getStoreInventory()
      This method returns inventory system of the current store in context.
      static java.lang.String getTruncatedString(java.lang.String astrValue, int anColumnSize)
      Gets the truncated string based on the UTF-8 encoding and database column size.
      static boolean isAllowed(java.lang.String cmdName, java.lang.String action)
      This method is used for access control for the command.
      static boolean isAttrDictAllowedValueForCatentryExist(java.lang.String attrId, java.lang.String attrValId)
      Checks whether the Attribute Dictionary attribute allowed value is associated with a catalog entry.
      static boolean isAttributeDictionaryAttributeAllowedValueIdentifierExist(java.lang.String attrId, java.lang.String identifier)
      Checks whether the AttributeDictionary attribute allowed value identifier exists.
      static boolean isAttributeDictionaryAttributeAllowedValueValid(java.lang.String attrId, java.lang.String attrValId)
      Checks whether the AttributeDictionary attribute allowed value is valid
      static boolean isAttributeDictionaryAttributeDescriptionExist(java.lang.String attrId, java.lang.String languageId)
      Checks whether the Attribute Dictionary attribute description exists for the combination of attrID and languageID.
      static boolean isAttributeDictionaryAttributeValueDescriptionExist(java.lang.String attrValId, java.lang.String languageId)
      Checks whether the Attribute Dictionary attribute value description exists for the combination of atrValID and languageID.
      static boolean isAttributeDictionaryAttributeValueValid(java.lang.String attrValId)
      Checks whether the AttributeDictionary attribute value is valid
      static boolean isAttributeValueUsedByOtherCatalogEntries(java.lang.String attrId, java.lang.String attrValId, java.lang.String catentryId)
      Checks whether the attribute value is used by any catalog entries other than the specified catalog entry.
      static boolean isCatalogEntryIdValid(java.lang.String catentryId)
      Checks whether the given catentry id is valid.
      static boolean isCatalogGroupEmpty(java.lang.String catalogGroupID)
      Checks if the given catalog group id has any child catalog entries or child catalog groups.
      static boolean isCatalogGroupIdentifierAndOwnerValid(java.lang.String identifier, java.lang.String ownerID)
      This method checks if the Catalog Group, whose Identifier and OwnerID is passed, is a valid Catalog Group i.e.
      static boolean isCatalogGroupRelationshipExist(java.lang.Long catalogId, java.lang.Long catalogGroupParentId, java.lang.Long catalogGroupChildId)
      Checks if the specified catalog group relationship exists.
      static boolean isCatalogGroupToCatalogEntryRelationInCatalogValid(java.lang.String catgroupId, java.lang.String catentryId, java.lang.String catalogId)
      Checks if the given catalog group is a parent of the given catalog entry in the given catalog.
      static boolean isCatalogGroupToCatalogRelValid(java.lang.String catGroupID, java.lang.String catalogID)
      This method checks if the Catalog Group, whose UniqueID is passed, is a valid Catalog Group i.e.
      static boolean isCatalogGroupUniqueIdValid(java.lang.String uniqueID)
      This method checks if the Catalog Group, whose UniqueID is passed, is a valid Catalog Group i.e.
      static boolean isCategoryTopCatalogGroup(java.lang.String catalogGroupID)
      This method checks if a Catalog Group passed to this method is a Top Catalog Group.
      static boolean isCatentryPublished(java.lang.String cmdName, CatalogEntryDataBean catentryDataBean)
      Checks if the catentry is published.
      static boolean isCatGroupPublished(java.lang.String cmdName, CategoryDataBean categoryDataBean)
      Checks if a given catalog group is published or not.
      static boolean isEsiteStore(java.lang.Integer storeId, java.lang.Integer[] storePath)
      Checks if the given store id is an esite store according to the given store path.
      static boolean isLanguageValid(java.lang.String language)
      This method validates the language ID passed against the list of supported language ids in the currenct store.
      static boolean isMasterCatalog(java.lang.Long anCatalogReferenceNumber)
      Checks if the catalog passed is the master catalog of the store in the context.
      static boolean isMasterCatalog(java.lang.String astrCatalogReferenceNumber, java.lang.String astrStoreId)
      Checks if the catalog passed is the master catalog of the store.
      static boolean isRelatedStore(java.lang.Integer storeId, java.lang.Integer[] storePath)
      Checks if the given store id is a related (asset) store according to the given store path.
      static boolean isSalesCatalog(java.lang.String strCatalogId)
      Checks if the catalog is a sales catalog in current store path.
      static boolean isSalesCatalog(java.lang.String strCatalogId, java.lang.String strStoreId)
      Checks if the catalog is a sales catalog.
      static boolean isValidCatalog(java.lang.String strCatalogId)
      Checks if the catalog id is a valid catalog in current store.
      static java.lang.Boolean parseString(java.lang.String inputString)
      Parses the input string.
      static void populatePhysicalAttributeValueExtendedValue(java.util.Map aExtendedValue, com.ibm.commerce.catalog.facade.server.entity.datatypes.AttrVal aPATTRVAL, com.ibm.commerce.catalog.facade.server.entity.datatypes.AttributeValueDescription aPATTRVALDESC)
      Add the extended values in extended value map logical object to the AttributeValueDescription and AttrVal physical objects.
      static boolean resolveCatalogEntry(CatalogEntryType catalogEntryNoun)
      Resolve the catalog entry by using the catalog entry identifier provided in the noun.
      static java.lang.String resolveCatalogGroupByExternalIdentifier(java.lang.String identifier, java.lang.String ownerId)
      Resolves the catalog group by external identifier.
      static boolean useClassicAttribute()
      Checks if classic attributes are used by all stores.
      static boolean validateAndResolveCatalogGroupExternalIdentifier(CatalogGroupIdentifierType cgIdentifier, java.util.List validationErrors)
      Validates that the catalog group identified by the catalog group external identifier is a valid catalog group.
      static void validateAttributeValue(java.util.List validateErrors, java.lang.String attrDataType, java.lang.String attrValue)
      Validates if the attribue value is valid for the given attibute type.
      static boolean validateCatalogGroupIdentifierInCatalog(CatalogGroupIdentifierType cgIdentifier, java.lang.String catalogId, java.util.List validationErrors)
      Validate that the catalog group identified by the catalog group catalog group identifier exists in the given catalog.
      static void validateIfChannelHubStore(java.util.List validationErrors)
      Validates if the store id in the context is a Hub Store.
      static boolean validateIfMasterCatalog(java.util.List aValidationErrors)
      Validates whether the catalog in catalog context is a master catalog.
      static boolean validateIfSalesCatalog(java.util.List aValidationErrors)
      Validates whether the catalog in catalog context is a sales catalog.
      static void validateInputForIntegerFields(java.lang.Object aNounPart)
      Validate that the input specified is a valid number for the custom Integer fields.
      static boolean validateOwner(CatalogEntryType aCatEntry, java.util.List aValidateErrorsList)
      This method validate the owner ID provided in the given catalog entry.
      static boolean validateOwner(CatalogGroupIdentifierType aCatGroupIdentifier, java.util.List aValidateErrorsList)
      This method validate the owner ID provided in the given catalog group identifier.
      static boolean validateOwner(CatalogGroupType aCatGroup, java.util.List aValidateErrorsList)
      This method validate the owner ID provided in the given catalog group.
      static boolean validateOwner(CatalogType aCatalog, java.util.List aValidateErrorsList)
      This method validate the owner ID provided in the given catalog .
      static boolean validateParentCatalogGroup(CatalogGroupIdentifierType parentCatGroupIdentifier, java.lang.String childCatGroupID, java.lang.String catalogID, java.util.List validationErrors)
      Validate the parent catalog group.
      static boolean validateParentCatalogGroupIdentifier(CatalogGroupIdentifierType parentCatGroupIdentifier, java.lang.String catalogID, java.util.List validationErrors)
      Validate the parent catalog group identifier.
      • Methods inherited from class java.lang.Object

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

      • CALCODE_USAGEID_TO_NAME_MAP

        public static final java.util.Map<java.lang.Integer,java.lang.String> CALCODE_USAGEID_TO_NAME_MAP
        A map of calculation code usage identifiers (in CALUSAGE table) to the usage name:
        1. -1:DiscountCalculationCode
        2. -2:ShippingCalculationCode
        3. -3:SalesTaxCalculationCode
        4. -4:ShippingTaxCalculationCode
        5. -5:CouponCalculationCode
        6. -6:SurchargeCalculationCode
        7. -7:ShippingAdjustmentCalculationCode
      • CALCODE_CODEID_TO_USAGEID_MAP

        public static final java.util.Map<java.lang.String,java.lang.Integer> CALCODE_CODEID_TO_USAGEID_MAP
        A map of calculation code usage ID strings to the usage identifier:
        1. DiscountCalculationCodeUniqueId:-1
        2. ShippingCalculationCodeUniqueId:-2
        3. SalesTaxCalculationCodeUniqueId:-3
        4. ShippingTaxCalculationCodeUniqueId:-4
        5. CouponCalculationCodeUniqueId:-5
        6. SurchargeCalculationCodeUniqueId:-6
        7. ShippingAdjustmentCalculationCodeUniqueId:-7
      • CALCODE_ID_LIST

        public static final java.util.List CALCODE_ID_LIST
        Array of supported calculation code usage unique ID strings:
        1. DiscountCalculationCodeUniqueId
        2. ShippingCalculationCodeUniqueId
        3. SalesTaxCalculationCodeUniqueId
        4. ShippingTaxCalculationCodeUniqueId
        5. CouponCalculationCodeUniqueId
        6. SurchargeCalculationCodeUniqueId
        7. ShippingAdjustmentCalculationCodeUniqueId
      • CALCODE_NAME_LIST

        public static final java.util.List CALCODE_NAME_LIST
        Array of supported calculation code usage names:
        1. DiscountCalculationCode
        2. ShippingCalculationCode
        3. SalesTaxCalculationCode
        4. ShippingTaxCalculationCode
        5. CouponCalculationCode
        6. SurchargeCalculationCode
        7. ShippingAdjustmentCalculationCode
      • DEFAULT_MEMBER_ID

        public static final java.lang.Long DEFAULT_MEMBER_ID
        Default Member ID used to retrieve display template for Catalog Entry and Catalog Group details access profile from tables DISPENTREL and DISPCGPREL respectively. Default value is used as the columns DISPENTREL.MBRGRP_ID and DISPCGPREL.MBRGRP_ID will be marked as deprecated.
      • STORE_TYPE_SCP

        public static final java.lang.String STORE_TYPE_SCP
        Store type for the Supplier Marketplace Hub store.
        See Also:
        Constant Field Values
      • DEFAULT_DEVICE_TYPE_ID

        public static final java.lang.String DEFAULT_DEVICE_TYPE_ID
        Default Device Type ID used to retrieve display template for Catalog Entry and Catalog Group details access profile from tables DISPENTREL and DISPCGPREL respectively. Default value is used as the columns DISPENTREL.DEVICEFMT_ID and DISPCGPREL.DEVICEFMT_ID will be marked as deprecated.
        See Also:
        Constant Field Values
    • Method Detail

      • isAllowed

        public static boolean isAllowed(java.lang.String cmdName,
                                        java.lang.String action)
                                 throws CatalogSystemException
        This method is used for access control for the command. The access control is based on the access control for, command name.
        Parameters:
        cmdName - the command name to used for access control.
        action - the action to be performed on the command, eg "-READ", "EXECUTE" etc.
        Returns:
        true if the command has the right access permissions, false otherwise.
        Throws:
        CatalogSystemException
      • getStoreId

        public static java.lang.Integer getStoreId()
                                            throws CatalogApplicationException
        This method gets the store ID from the service context.
        Returns:
        The Integer storeId.
        Throws:
        CatalogApplicationException, - if the storeId could not be retrieved or returned null.
        CatalogApplicationException
      • getLanguageId

        public static java.lang.Integer getLanguageId()
                                               throws CatalogSystemException
        This method gets the language ID from the service context.
        Returns:
        The language ID.
        Throws:
        CatalogSystemException - , if the language ID could not be retrieved or returned null.
      • getMasterCatalogId

        public static java.lang.String getMasterCatalogId()
                                                   throws java.lang.Exception
        Gets the master catalog ID of the store in context.
        Returns:
        the master catalog ID.
        Throws:
        java.lang.Exception
      • isMasterCatalog

        public static boolean isMasterCatalog(java.lang.String astrCatalogReferenceNumber,
                                              java.lang.String astrStoreId)
                                       throws java.lang.Exception
        Checks if the catalog passed is the master catalog of the store.
        Parameters:
        astrCatalogReferenceNumber - the catalog ID.
        astrStoreId - the store ID.
        Returns:
        true if master catalog false otherwise.
        Throws:
        java.lang.Exception
      • isMasterCatalog

        public static boolean isMasterCatalog(java.lang.Long anCatalogReferenceNumber)
                                       throws CatalogApplicationException
        Checks if the catalog passed is the master catalog of the store in the context.
        Parameters:
        anCatalogReferenceNumber - the catalog ID.
        Returns:
        true if master catalog false otherwise.
        Throws:
        CatalogApplicationException
      • checkEntitlementForCatentry

        public static boolean checkEntitlementForCatentry(java.lang.String cmdName,
                                                          java.lang.Long catentryId)
        This method checks if a catentry is entitled to the user or not.
        Parameters:
        cmdName - The command name used to get the command context.
        catentryId - the catentry ID whose entitlement needs to be checked.
        Returns:
        true if the user is entitled to the catentry false otherwise.
      • isCatentryPublished

        public static boolean isCatentryPublished(java.lang.String cmdName,
                                                  CatalogEntryDataBean catentryDataBean)
        Checks if the catentry is published.
        Parameters:
        cmdName - The command name used to get the command context.
        catentryDataBean - The catentry data bean whose published state needs to be checked.
        Returns:
        true if catentry is published, false otherwise.
      • isCatGroupPublished

        public static boolean isCatGroupPublished(java.lang.String cmdName,
                                                  CategoryDataBean categoryDataBean)
        Checks if a given catalog group is published or not.
        Parameters:
        cmdName - The command name used to get the command context.
        categoryDataBean - The category whose published state neeeds to be checked.
        Returns:
        True if the category is published, false otherwise.
      • getInclusionPS

        public static java.util.Vector[] getInclusionPS(java.lang.String cmdName)
        Gets the inclusion product sets in the contracts applicable to the user.
        Parameters:
        cmdName - The command name used to get the command context.
        Returns:
        The inclusion product sets.
      • getExclusionPS

        public static java.util.Vector[] getExclusionPS(java.lang.String cmdName)
        Gets the exclusion product set of contracts.
        Parameters:
        cmdName - The command name used to get the command context.
        Returns:
        The exclusion product set.
      • checkCatalogGroupEntitlement

        public static boolean checkCatalogGroupEntitlement(java.lang.String cmdName,
                                                           java.lang.Long anCatalogGroupId)
        Determines whether the passed in catalog group ID is explicity included or excluded in regards to entitlement.
        Parameters:
        cmdName - The command name.
        anCatalogGroupId - The ID of the catalog group.
        Returns:
        true if it is included, false otherwise.
      • checkCatalogGroupEntitlement

        public static java.lang.Long[] checkCatalogGroupEntitlement(java.lang.Long[] catalogGroupIds,
                                                                    java.lang.Boolean isAdminMode)

        This method whether the passed in array of catalog group internal identifiers is explicity included or excluded in regards to entitlement.

        The command CheckCatalogGroupEntitlementCmd will be used to determine the catalog group entitlement in a batch.
        Parameters:
        catalogGroupIds - The list of catalog groups to be checked for entitlement.
        isAdminMode - A flag indicating if this is in admin mode. If not provided, a default value of false will be used.
        Returns:
        Long[] An array of the entitled catalog group IDs. If there are no entitled catalog groups, an empty array will be returned. If the user is entitled to all catalog groups, NULL will be returned.
        See Also:
        CheckCatalogGroupEntitlementCmd, CatalogDataBean.isAdminMode()
      • createCatalogEntryDataObject

        public static CatalogEntryType createCatalogEntryDataObject(CatalogEntryIdentifierType catEntryId)
        This method creates an instance of CatalogEntryType object using the given catalog entry identifier.
        Parameters:
        catEntryId - The catalog entry identifier assoicated with the data object.
        Returns:
        A new instance of the CatalogEntryType object.
      • getPartNumber

        public static java.lang.String getPartNumber(CatalogEntryType aCatEntry)
        This method returns the part number of the given catalog entry.
        Parameters:
        aCatEntry - The catalog entry whose part number needs to be return.
        Returns:
        The part number.
      • validateOwner

        public static boolean validateOwner(CatalogEntryType aCatEntry,
                                            java.util.List aValidateErrorsList)
                                     throws CatalogApplicationException
        This method validate the owner ID provided in the given catalog entry. If the owner ID is provided and the owner ID is different from the owner of the store, it will add a ApplicationError with message type CatalogApplicationMessageKeys._ERR_INVALID_OWNER_ID_IN_CATENTRY_NOUN to the input parameter aValidateErrorsList.
        Parameters:
        aCatEntry - The catalog entry noun whose owner needs to be validated.
        aValidateErrorsList - The list which contains the list of validation errors.
        Returns:
        True, if owner in the catalog entry is correct. False, otherwise.
        Throws:
        CatalogApplicationException
      • validateOwner

        public static boolean validateOwner(CatalogGroupType aCatGroup,
                                            java.util.List aValidateErrorsList)
                                     throws CatalogApplicationException
        This method validate the owner ID provided in the given catalog group. If the owner ID in noun is different from the owner of the store, it will add a ApplicationError with message type CatalogApplicationMessageKeys._ERR_INVALID_OWNER_ID_IN_CATENTRY_NOUN to the input parameter aValidateErrorsList.
        Parameters:
        aCatGroup - The catalog group noun whose owner needs to be validated.
        aValidateErrorsList - The list which contains the list of validation errors.
        Returns:
        True, if owner in the catalog group is correct. False, otherwise.
        Throws:
        CatalogApplicationException
      • validateOwner

        public static boolean validateOwner(CatalogGroupIdentifierType aCatGroupIdentifier,
                                            java.util.List aValidateErrorsList)
                                     throws CatalogApplicationException
        This method validate the owner ID provided in the given catalog group identifier. If the owner ID in noun is different from the owner of the store, it will add a ApplicationError with message type CatalogApplicationMessageKeys._ERR_INVALID_OWNER_ID_IN_CATENTRY_NOUN to the input parameter aValidateErrorsList.
        Parameters:
        aCatGroupIdentifier - The catalog group identifier whose owner needs to be validated.
        aValidateErrorsList - The list which contains the list of validation errors.
        Returns:
        True, if owner in the catalog group is correct. False, otherwise.
        Throws:
        CatalogApplicationException
      • validateOwner

        public static boolean validateOwner(CatalogType aCatalog,
                                            java.util.List aValidateErrorsList)
                                     throws CatalogApplicationException
        This method validate the owner ID provided in the given catalog . If the owner ID in noun is different from the owner of the store, it will add a ApplicationError with message type CatalogApplicationMessageKeys.__ERR_INVALID_OWNER_ID to the input parameter aValidateErrorsList.
        Parameters:
        aCatalog - The catalog noun whose owner needs to be validated.
        aValidateErrorsList - The list which contains the list of validation errors.
        Returns:
        True, if owner in the catalog is correct. False, otherwise.
        Throws:
        CatalogApplicationException
      • validateIfMasterCatalog

        public static boolean validateIfMasterCatalog(java.util.List aValidationErrors)
        Validates whether the catalog in catalog context is a master catalog. It will add a ApplicationError with message type CatalogApplicationMessageKeys._ERR_INCORRECT_CATALOG_TYPE_MASTER_CATALOG to the input parameter aValidationErrors when the catalog is not a master catalog.
        Parameters:
        aValidationErrors - This contains the list of erros which fail the validations.
        Returns:
        True, if the catalog is a master catalog. False, otherwise.
      • validateIfSalesCatalog

        public static boolean validateIfSalesCatalog(java.util.List aValidationErrors)
        Validates whether the catalog in catalog context is a sales catalog. It will add a ApplicationError with message type CatalogApplicationMessageKeys._ERR_INCORRECT_CATALOG_TYPE_SALES_CATALOG to the input parameter aValidationErrors when the catalog is not a sales catalog.
        Parameters:
        aValidationErrors - This contains the list of erros which fail the validations.
        Returns:
        True, if the catalog is a sales catalog. False, otherwise.
      • isSalesCatalog

        public static boolean isSalesCatalog(java.lang.String strCatalogId,
                                             java.lang.String strStoreId)
                                      throws DataMediatorException
        Checks if the catalog is a sales catalog.
        Parameters:
        strCatalogId -
        strStoreId -
        Returns:
        true if the catalog is a sales catalog, false otherwise.
        Throws:
        DataMediatorException
      • isSalesCatalog

        public static boolean isSalesCatalog(java.lang.String strCatalogId)
                                      throws DataMediatorException
        Checks if the catalog is a sales catalog in current store path.
        Parameters:
        strCatalogId - the catalog id to be checked.
        Returns:
        true if the catalog is a sales catalog, false otherwise.
        Throws:
        DataMediatorException
      • isValidCatalog

        public static boolean isValidCatalog(java.lang.String strCatalogId)
                                      throws DataMediatorException
        Checks if the catalog id is a valid catalog in current store.
        Parameters:
        strCatalogId - the catalog id to be checked.
        Returns:
        true if the catalog is a valid catalog of this store, false otherwise.
        Throws:
        DataMediatorException - Exception is thrown when there is error to retrieve the catalog from database.
      • getPhysicalCatentryBasicProfile

        public static CatalogEntry getPhysicalCatentryBasicProfile(java.lang.String catalogEntryID)
                                                            throws DataMediatorException
        This method is used to find and return a physical CatalogEntry object based on the passed catalogEntryID parameter using the IBM_Admin_CatalogEntry_Basic_Id access profile.
        Parameters:
        catalogEntryID - The catalog entry ID to use for the search.
        Returns:
        The found physical CatalogEntry object.
        Throws:
        DataMediatorException - if an error is encountered on invoking the query.
      • getCatalogGroupId

        public static java.lang.Long getCatalogGroupId(CatalogGroupIdentifierType identifierType)
                                                throws DataMediatorException
        This method resolves the catalog group ID of the catalog group. whose identifier is passed.
        Parameters:
        identifierType -
        Returns:
        The Long value of the catalog group ID if it exists, null otherwise.
        Throws:
        DataMediatorException
      • isCatalogGroupIdentifierAndOwnerValid

        public static boolean isCatalogGroupIdentifierAndOwnerValid(java.lang.String identifier,
                                                                    java.lang.String ownerID)
                                                             throws CatalogApplicationException
        This method checks if the Catalog Group, whose Identifier and OwnerID is passed, is a valid Catalog Group i.e. if its not marked for delete and exists in current store in context.
        Parameters:
        identifier - A string containing catalog group identifier.
        ownerID - Owner ID of Catalog Group.
        Returns:
        true if catalog group is valid, false otherwise.
        Throws:
        CatalogApplicationException
      • isCatalogGroupUniqueIdValid

        public static boolean isCatalogGroupUniqueIdValid(java.lang.String uniqueID)
                                                   throws CatalogApplicationException
        This method checks if the Catalog Group, whose UniqueID is passed, is a valid Catalog Group i.e. if its not marked for delete and exists in current store in context.
        Parameters:
        uniqueID - A string containing catalog group unique identifier.
        Returns:
        true if catalog group is valid, false otherwise.
        Throws:
        CatalogApplicationException
      • getCatalogGroupIdByIdentifierAndOwnerID

        public static java.lang.String getCatalogGroupIdByIdentifierAndOwnerID(java.lang.String identifier,
                                                                               java.lang.String ownerID)
                                                                        throws DataMediatorException
        Gets the catalog group unique ID given the external identifier and owner ID.

        Parameters:
        identifier - Externaldentifier of catalog group.
        ownerID - Owner ID of catalog group.
        Returns:
        Returns the unique ID of the catalog group.
        Throws:
        DataMediatorException
      • isCategoryTopCatalogGroup

        public static boolean isCategoryTopCatalogGroup(java.lang.String catalogGroupID)
        This method checks if a Catalog Group passed to this method is a Top Catalog Group.
        Parameters:
        catalogGroupID - Unique ID of a catalog group to be checked.
        Returns:
        true if Catalog group passed is a Top Catalog Group, false otherwise.
      • isLanguageValid

        public static boolean isLanguageValid(java.lang.String language)
        This method validates the language ID passed against the list of supported language ids in the currenct store.
        Parameters:
        language - The language ID to be validated.
        Returns:
        true if language ID is valid, false otherwise.
      • isCatalogGroupToCatalogRelValid

        public static boolean isCatalogGroupToCatalogRelValid(java.lang.String catGroupID,
                                                              java.lang.String catalogID)
                                                       throws CatalogApplicationException
        This method checks if the Catalog Group, whose UniqueID is passed, is a valid Catalog Group i.e. if its not marked for delete and exists in current store in context.
        Parameters:
        catGroupID - A string containing the catalog group unique identifier.
        catalogID - A string containing the catalog unique identifier.
        Returns:
        true if catalog group is valid, false otherwise.
        Throws:
        CatalogApplicationException
      • resolveCatalogGroupByExternalIdentifier

        public static java.lang.String resolveCatalogGroupByExternalIdentifier(java.lang.String identifier,
                                                                               java.lang.String ownerId)
                                                                        throws DataMediatorException
        Resolves the catalog group by external identifier.

        Parameters:
        identifier - Catalog group external group identifier.
        ownerId - Owner ID.
        Returns:
        Returns the resolve catalog group IDs.
        Throws:
        DataMediatorException
      • validateAndResolveCatalogGroupExternalIdentifier

        public static boolean validateAndResolveCatalogGroupExternalIdentifier(CatalogGroupIdentifierType cgIdentifier,
                                                                               java.util.List validationErrors)
                                                                        throws DataMediatorException,
                                                                               CatalogApplicationException
        Validates that the catalog group identified by the catalog group external identifier is a valid catalog group. On return the uniqueID will be set if the catalog group can be resolved.

        Parameters:
        cgIdentifier - A catalog group identifier.
        validationErrors - A list of validation errors.
        Returns:
        Returns true if the external identifier is valid.
        Throws:
        DataMediatorException
        CatalogApplicationException
      • validateCatalogGroupIdentifierInCatalog

        public static boolean validateCatalogGroupIdentifierInCatalog(CatalogGroupIdentifierType cgIdentifier,
                                                                      java.lang.String catalogId,
                                                                      java.util.List validationErrors)
                                                               throws DataMediatorException,
                                                                      CatalogApplicationException
        Validate that the catalog group identified by the catalog group catalog group identifier exists in the given catalog.
        Parameters:
        cgIdentifier - A catalog group identifier.
        catalogId - A catalog ID.
        validationErrors - A list of validation errors.
        Returns:
        Returns true is the catalog group exists in the catalog, false otherwise.
        Throws:
        DataMediatorException
        CatalogApplicationException
      • validateParentCatalogGroupIdentifier

        public static boolean validateParentCatalogGroupIdentifier(CatalogGroupIdentifierType parentCatGroupIdentifier,
                                                                   java.lang.String catalogID,
                                                                   java.util.List validationErrors)
                                                            throws DataMediatorException,
                                                                   CatalogApplicationException
        Validate the parent catalog group identifier. On return, the parentCatGroupId will be set if the catalog group is resolved and is found in the catalog.
        Parameters:
        parentCatGroupIdentifier - Parent catalog group identifier.
        catalogID - Catalog ID.
        validationErrors - List of validation error.
        Returns:
        Returns true of the catalog group identifier is valid, false otherwise.
        Throws:
        DataMediatorException
        CatalogApplicationException
      • validateParentCatalogGroup

        public static boolean validateParentCatalogGroup(CatalogGroupIdentifierType parentCatGroupIdentifier,
                                                         java.lang.String childCatGroupID,
                                                         java.lang.String catalogID,
                                                         java.util.List validationErrors)
                                                  throws DataMediatorException,
                                                         CatalogApplicationException
        Validate the parent catalog group. Checks that the catalog group identified by the parent catalog group identifier is a valid catalog group in the catalog and that it is not the same as the child catalog group. On return, the uniqueID of the identifier will be set if the catalog group can be resolved.

        Parameters:
        parentCatGroupIdentifier - Parent catalog group identifier.
        childCatGroupID - Child catalog group unique ID.
        catalogID - Catalog ID for parent catalog.
        validationErrors - List of validation error.
        Returns:
        Returns true of the catalog group identifier is valid, false otherwise.
        Throws:
        DataMediatorException
        CatalogApplicationException
      • getDefaultCurrency

        public static java.lang.String getDefaultCurrency()
        This method returns the default currency of the current store in context.
        Returns:
        Returns the currency code for default currency of store.
      • getDefaultLanguageId

        public static java.lang.String getDefaultLanguageId()
        This method returns the default language id of the current store in context.
        Returns:
        Returns the default language id for current store.
      • getStoreInventory

        public static java.lang.String getStoreInventory()
        This method returns inventory system of the current store in context.
        Returns:
        Returns inventory system.
      • getCatalogIDsOfCatalogGroup

        public static java.util.List getCatalogIDsOfCatalogGroup(java.lang.String catalogGroupID)
                                                          throws CatalogApplicationException
        This method returns the list of Catalog IDs which contains the catalog group whose UniqueId is passed in request.
        Parameters:
        catalogGroupID - UniqueID of Catalog Group whose catalog has to be retrieved.
        Returns:
        Returns a List of Catalog IDs.
        Throws:
        CatalogApplicationException
      • getAttributeValues

        public static java.util.List getAttributeValues(java.lang.String aatrUniqueID)
                                                 throws DataMediatorException
        Get the list of atribute values.
        Parameters:
        aatrUniqueID -
        Returns:
        a List of attribute value records, null if none are found.
        Throws:
        DataMediatorException
      • getAttributeDictionaryIdInCurrentStore

        public static java.lang.String getAttributeDictionaryIdInCurrentStore()
                                                                       throws DataMediatorException
        This method gets attribute dictoinary id for current store
        Returns:
        the attribute dictionary id of the current store; null if current store does not have attribute dictionary.
        Throws:
        DataMediatorException
      • getAttributeDictionaryAttributeValues

        public static PhysicalDataContainer getAttributeDictionaryAttributeValues(java.lang.String attributeID,
                                                                                  java.util.List attributeValueIDs)
                                                                           throws DataMediatorException
        This method is used get the physical attribute value objects AttrVal based on the passed parameters of attribute ID and attributeValueIDs. It returns a PhysicalDataContainer containing the physical objects.
        Parameters:
        attributeID - The ID of the attribute to get the values for.
        attributeValueIDs - A list of attribute value IDs to get the values for.
        Returns:
        The PhysicalDataContainer containing the physical AttrVal objects.
        Throws:
        DataMediatorException - If an error is encountered on running the query.
      • getAttributeDictionaryAttributeValueDescriptions

        public static PhysicalDataContainer getAttributeDictionaryAttributeValueDescriptions(java.lang.String attrValId,
                                                                                             java.lang.String languageId)
                                                                                      throws DataMediatorException
        This method is used get the physical attribute value description objects AttributeValueDescription based on the passed parameters of attribute value id and language id. It returns a PhysicalDataContainer containing the physical objects.
        Parameters:
        attrValId - The attribute value ID to get the values for.
        languageId - The language id.
        Returns:
        The PhysicalDataContainer containing the physical AttrVal objects.
        Throws:
        DataMediatorException - If an error is encountered on running the query.
      • getChildSKUsOfCatalogEntry

        public static java.util.List getChildSKUsOfCatalogEntry(java.lang.String catalogEntryID)
                                                         throws DataMediatorException
        This method is used to return a list of CatalogEntry objects which are child SKUs of the catalog entry identified by the passed parameter of catalog entry ID.
        Parameters:
        catalogEntryID - The catalog entry ID of the parent to find the child SKUs for.
        Returns:
        A list of CatalogEntry objects which are child SKUs of the catalog entry object identified by the passed catalog entry ID.
        Throws:
        DataMediatorException - If an error is encountered on running the query.
      • getChildIDAndTypeOfCatalogEntry

        public static java.util.List<CatalogEntry> getChildIDAndTypeOfCatalogEntry(java.lang.String catalogEntryID)
                                                                            throws DataMediatorException
        This method is used to return a list of CatalogEntry objects which only contains Catalog Entry ID and Type of the child SKUs catalog entry identified by the passed parameter of catalog entry ID.
        Parameters:
        catalogEntryID - The catalog entry ID of the parent to find the child SKUs for.
        Returns:
        A list of CatalogEntry objects which only contains Catalog Entry ID and Type of the child SKUs catalog entry identified by the passed catalog entry ID.
        Throws:
        DataMediatorException - If an error is encountered on running the query.
      • getCatalogEntryAttributeRelations

        public static PhysicalDataContainer getCatalogEntryAttributeRelations(java.util.List catalogEntryIDs,
                                                                              java.util.List attributeIDs)
                                                                       throws DataMediatorException
        This method is used get the physical catalog entry attribute relation records CatalogEntryAttributeRelation based on the passed parameters of list of catalog entry IDs and attribute IDs. It returns a PhysicalDataContainer containing the physical objects.
        Parameters:
        catalogEntryIDs - A list of catalog entry IDs to find the relation records for.
        attributeIDs - A list of attribute IDs to find the relation records for.
        Returns:
        The PhysicalDataContainer containing the physical CatalogEntryAttributeRelation objects.
        Throws:
        DataMediatorException - If an error is encountered on running the query.
      • getCatalogEntryAttributeRelationsForDifferentAttributeUsage

        public static PhysicalDataContainer getCatalogEntryAttributeRelationsForDifferentAttributeUsage(java.lang.String catalogEntryID,
                                                                                                        java.lang.String attributeID,
                                                                                                        java.lang.String usage)
                                                                                                 throws DataMediatorException
        This method is used get the physical catalog entry attribute relation of differet usage than the usage type provided. It returns a PhysicalDataContainer containing the physical objects.
        Parameters:
        catalogEntryID - The catalog entry ID to find the relation records for.
        attributeID - The attribute ID to find the relation records for.
        usage - The physical usage type of the catalog entry to attribute dictionary attribute relationship. e.g. '1' for defining attribute (sku resolution), '2' for descriptive attribute.
        Returns:
        The PhysicalDataContainer containing the physical CatalogEntryAttributeRelation objects.
        Throws:
        DataMediatorException - If an error is encountered on running the query.
      • getCatalogEntryAttributeRelations

        public static PhysicalDataContainer getCatalogEntryAttributeRelations(java.lang.String catalogEntryID,
                                                                              java.lang.String attributeID)
                                                                       throws DataMediatorException
        This method is used get the physical catalog entry attribute relation. It returns aPhysicalDataContainer containing the physical objects.
        Parameters:
        catalogEntryID - The catalog entry ID to find the relation records for.
        attributeID - The attribute ID to find the relation records for.
        Returns:
        The PhysicalDataContainer containing the physical CatalogEntryAttributeRelation objects.
        Throws:
        DataMediatorException - If an error is encountered on running the query.
      • isCatalogGroupToCatalogEntryRelationInCatalogValid

        public static boolean isCatalogGroupToCatalogEntryRelationInCatalogValid(java.lang.String catgroupId,
                                                                                 java.lang.String catentryId,
                                                                                 java.lang.String catalogId)
                                                                          throws DataMediatorException
        Checks if the given catalog group is a parent of the given catalog entry in the given catalog.
        Parameters:
        catgroupId - The parent catalog group to be checked.
        catentryId - The child catalog entry to be checked.
        catalogId - The catalog in which the relation is to be verified.
        Returns:
        True if the relation exists, False otherwise.
        Throws:
        DataMediatorException - If an exception occurs while fetching data through DSL.
      • getOwnerIdForStore

        public static java.lang.String getOwnerIdForStore(java.lang.Integer storeId)
                                                   throws CatalogApplicationException
        Gets the owner Id for the given store.
        Parameters:
        storeId - The store Id for which the owner needs to be returned.
        Returns:
        Owner Id for the given store.
        Throws:
        CatalogApplicationException
      • getIdentifierForStore

        public static java.lang.String getIdentifierForStore(java.lang.Integer storeId)
                                                      throws CatalogApplicationException
        Gets the identifier for the given store.
        Parameters:
        storeId - The store Id for which the identifier needs to be returned.
        Returns:
        Identifier for the given store.
        Throws:
        CatalogApplicationException
      • getOwnerId

        public static java.lang.String getOwnerId(CatalogType aCatalog)
                                           throws CatalogApplicationException
        Gets the owner id for the given Catalog. Does the following: 1) If Store Id is found in the noun, returns the owner id of that store. 2) Otherwise, returns the owner id for the store in the context.
        Parameters:
        aCatalog - The Catalog for which to retrieve the owner Id.
        Returns:
        Retrieved Owner Id.
        Throws:
        CatalogApplicationException
      • getOwnerId

        public static java.lang.String getOwnerId(CatalogIdentifierType aCatalogIdentifier)
                                           throws CatalogApplicationException
        Gets the owner id for the given Catalog Identifier. Does the following: 1) If Store Id is found in the identifier, returns the owner id of that store. 2) Otherwise, returns the owner id for the store in the context.
        Parameters:
        aCatalogIdentifier - The Catalog Identifier for which to retrieve the owner Id.
        Returns:
        Retrieved Owner Id.
        Throws:
        CatalogApplicationException
      • getOwnerId

        public static java.lang.String getOwnerId(CatalogGroupType aCatalogGroup)
                                           throws CatalogApplicationException
        Gets the owner id for the given Catalog Group. Does the following: 1) If Store Id is found in the noun, returns the owner id of that store. 2) Otherwise, returns the owner id for the store in the context.
        Parameters:
        aCatalogGroup - The Catalog Group for which to retrieve the owner Id.
        Returns:
        Retrieved Owner Id.
        Throws:
        CatalogApplicationException
      • getOwnerId

        public static java.lang.String getOwnerId(CatalogGroupIdentifierType aCatalogGroupIdentifier)
                                           throws CatalogApplicationException
        Gets the owner id for the given Catalog Group Identifier. Does the following: 1) If Store Id is found in the identifier, returns the owner id of that store. 2) Otherwise, returns the owner id for the store in the context.
        Parameters:
        aCatalogGroupIdentifier - The Catalog Group Identifier for which to retrieve the owner Id.
        Returns:
        Retrieved Owner Id.
        Throws:
        CatalogApplicationException
      • getOwnerId

        public static java.lang.String getOwnerId(CatalogEntryType aCatalogEntry)
                                           throws CatalogApplicationException
        Gets the owner id for the given Catalog Entry. Does the following: 1) If Store Id is found in the noun, returns the owner id of that store. 2) Otherwise, returns the owner id for the store in the context.
        Parameters:
        aCatalogEntry - The Catalog Entry for which to retrieve the owner Id.
        Returns:
        Retrieved Owner Id.
        Throws:
        CatalogApplicationException
      • getOwnerId

        public static java.lang.String getOwnerId(CatalogEntryIdentifierType aCatalogEntryIdentifier)
                                           throws CatalogApplicationException
        Gets the owner id for the given Catalog Entry Identifier. Does the following: 1) If Store Id is found in the identifier, returns the owner id of that store. 2) Otherwise, returns the owner id for the store in the context.
        Parameters:
        aCatalogEntryIdentifier - The Catalog Entry Identifier for which to retrieve the owner Id.
        Returns:
        Retrieved Owner Id.
        Throws:
        CatalogApplicationException
      • getCatalogStorePath

        public static java.lang.Integer[] getCatalogStorePath()
                                                       throws CatalogApplicationException
        This method returns the store path ids which the current store has the 'com.ibm.commerce.catalog' store relationship type with.
        Returns:
        an Integer array which contains the store path ids.
        Throws:
        CatalogApplicationException - If an error occurs while retrieving storepath.
      • isEsiteStore

        public static boolean isEsiteStore(java.lang.Integer storeId,
                                           java.lang.Integer[] storePath)
        Checks if the given store id is an esite store according to the given store path.
        Parameters:
        storeId - The store id to check.
        storePath - The storepath from which to check.
        Returns:
        True if the given store id is an esite store according to the given storepath, False otherwise.
      • isRelatedStore

        public static boolean isRelatedStore(java.lang.Integer storeId,
                                             java.lang.Integer[] storePath)
        Checks if the given store id is a related (asset) store according to the given store path.
        Parameters:
        storeId - The store id to check.
        storePath - The storepath from which to check.
        Returns:
        True if the given store id is a related store according to the given storepath, False otherwise.
      • getOwnerStoreId

        public static java.lang.Integer getOwnerStoreId(CatalogEntryIdentifierType catentryIdentifier)
                                                 throws DataMediatorException
        Returns the store id for the given catalog entry identifier.
        Parameters:
        catentryIdentifier - The identifier for which to find.
        Returns:
        The owner store id of the given catalog entry (identifier).
        Throws:
        DataMediatorException - If an exception occurs while retrieving data.
      • getOwnerStoreId

        public static java.lang.Integer getOwnerStoreId(CatalogGroupIdentifierType catgroupIdentifier)
                                                 throws DataMediatorException
        Returns the store id for the given catalog group identifier.
        Parameters:
        catgroupIdentifier - The identifier for which to find.
        Returns:
        The owner store id of the given catalog group (identifier).
        Throws:
        DataMediatorException - If an exception occurs while retrieving data.
      • buildStoreIdentifier

        public static StoreIdentifierType buildStoreIdentifier(StoreCatalogEntryRelation storeCatentryRel)
        Builds the store identifier given the store catalog entry relation.
        Parameters:
        storeCatentryRel - The store catalog entry relation for which to build.
        Returns:
        The StoreIdentifier
      • buildStoreIdentifier

        public static StoreIdentifierType buildStoreIdentifier(StoreCatalogGroupRelation storeCatgroupRel)
        Builds the store identifier given the store catalog group relation.
        Parameters:
        storeCatgroupRel - The store catalog group relation for which to build.
        Returns:
        The StoreIdentifier
      • getChangeControlMediator

        public static ChangeControlBusinessObjectMediator getChangeControlMediator(java.lang.Object noun)
                                                                            throws java.lang.Exception
        Returns the ChangeControlMediator after initializing it with the noun being passed.
        Parameters:
        noun - The noun for which to retrieve the change control mediator.
        Returns:
        The ChangeControlMediator for the given noun..
        Throws:
        java.lang.Exception
      • validateIfChannelHubStore

        public static void validateIfChannelHubStore(java.util.List validationErrors)
                                              throws CatalogApplicationException
        Validates if the store id in the context is a Hub Store. If yes, a validation error is added to the given list. This is used by the ProcessCreateActionCommands to validate that the 'create' operation is not being performed on a Hub Store, as catalog assets cannot be created under a hub store. Following storetypes are checked, where catalog assetes cannot be created:
        • CHS - CommercePlaza Hub
        • SCP - SupplierMarketplace Hub
        Parameters:
        validationErrors - The list where to add the validation error.
        Throws:
        CatalogApplicationException
      • isCatalogGroupEmpty

        public static boolean isCatalogGroupEmpty(java.lang.String catalogGroupID)
                                           throws DataMediatorException
        Checks if the given catalog group id has any child catalog entries or child catalog groups.
        Parameters:
        catalogGroupID - The catalog group id for which to check.
        Returns:
        True is the given catalog group id has either child catalog entries or child catallog groups. False otherwise.
        Throws:
        DataMediatorException
      • getOwnerIdForCatentryId

        public static java.lang.String getOwnerIdForCatentryId(java.lang.String catalogEntryId)
                                                        throws DataMediatorException
        Returns the owner id of the given catalog entry Id.
        Parameters:
        catalogEntryId - The catalog entry Id for which to fine.
        Returns:
        The owner id.
        Throws:
        DataMediatorException
      • getOwnerIdForAttributeDictionary

        public static java.lang.Long getOwnerIdForAttributeDictionary(java.lang.String attrDictId)
                                                               throws CatalogApplicationException,
                                                                      DataMediatorException
        Returns the owner id of the given attribute dictionary Id.
        Parameters:
        attrDictId - The attribute dictionary Id.
        Returns:
        The owner id of the attribute dictionary.
        Throws:
        CatalogApplicationException - Exception is thown when there is problem retrieving attribute dictionary
        DataMediatorException - Exception is thown when there is problem retrieving member id of store
      • getOwnerIdForAttribute

        public static java.lang.Long getOwnerIdForAttribute(java.lang.String attrId)
                                                     throws CatalogApplicationException,
                                                            DataMediatorException
        Returns the owner id of the given attribute Id.
        Parameters:
        attrId - The attribute Id.
        Returns:
        The owner id of the attribute.
        Throws:
        CatalogApplicationException - Exception is thown when there is problem retrieving attribute
        DataMediatorException - Exception is thown when there is problem retrieving member id of store
      • getOwnerIdForAttributeGroup

        public static java.lang.Long getOwnerIdForAttributeGroup(java.lang.String attrGrpId)
                                                          throws CatalogApplicationException,
                                                                 DataMediatorException
        Returns the owner id of the given attribute group Id.
        Parameters:
        attrGrpId - The attribute group Id.
        Returns:
        The owner id of the attribute.
        Throws:
        CatalogApplicationException - Exception is thown when there is problem retrieving attribute group
        DataMediatorException - Exception is thown when there is problem retrieving member id of store
      • getOwnerIdForCatgroupId

        public static java.lang.String getOwnerIdForCatgroupId(java.lang.String catalogGroupId)
                                                        throws DataMediatorException
        Returns the owner id of the given catalog group Id.
        Parameters:
        catalogGroupId - The catalog group Id for which to fine.
        Returns:
        The owner id.
        Throws:
        DataMediatorException
      • getOwnerIdForCatalogId

        public static java.lang.String getOwnerIdForCatalogId(java.lang.String catalogId)
                                                       throws DataMediatorException
        Returns the owner id of the given catalog Id.
        Parameters:
        catalogId - The catalog Id for which to fine.
        Returns:
        The owner id.
        Throws:
        DataMediatorException
      • getAttributeDictionaryAttribute

        public static com.ibm.commerce.catalog.facade.server.entity.datatypes.Attr getAttributeDictionaryAttribute(java.lang.String attrId)
                                                                                                            throws DataMediatorException
        This method gets the physical attribute dictionary attribute record , given the attribute id
        Parameters:
        attrId - The attribute ID.
        Returns:
        the physical attribute dictionary attribute record if it exists , null otherwise.
        Throws:
        DataMediatorException
      • findAttributeByAttrDictIDAndIdentifier

        public static com.ibm.commerce.catalog.facade.server.entity.datatypes.Attr findAttributeByAttrDictIDAndIdentifier(java.lang.String attrDictID,
                                                                                                                          java.lang.String identifier)
                                                                                                                   throws DataMediatorException
        This method is used to find and return a physical Attr object based on the passed attribute dictionary ID attrDictID and the attribute identifier identifier. The query uses the IBM_Admin_IdResolve access profile.
        Parameters:
        attrDictID - The unique attribute dictionary ID.
        identifier - The attribute dictionary attribute's identifier.
        Returns:
        The found physical Attr object.
        Throws:
        DataMediatorException - if an error is encountered on invoking the query.
      • isAttributeDictionaryAttributeValueValid

        public static boolean isAttributeDictionaryAttributeValueValid(java.lang.String attrValId)
                                                                throws DataMediatorException
        Checks whether the AttributeDictionary attribute value is valid
        Parameters:
        attrValId - The attribute value ID.
        Returns:
        boolean True - if the AttributeDictionary attribute value is valid. False, otherwise.
        Throws:
        DataMediatorException
      • isAttributeDictionaryAttributeAllowedValueValid

        public static boolean isAttributeDictionaryAttributeAllowedValueValid(java.lang.String attrId,
                                                                              java.lang.String attrValId)
                                                                       throws DataMediatorException
        Checks whether the AttributeDictionary attribute allowed value is valid
        Parameters:
        attrId - The attribute ID.
        attrValId - The attribute value ID.
        Returns:
        boolean True - if the AttributeDictionary attribute allowed value is valid. False, otherwise.
        Throws:
        DataMediatorException
      • isAttributeDictionaryAttributeValueDescriptionExist

        public static boolean isAttributeDictionaryAttributeValueDescriptionExist(java.lang.String attrValId,
                                                                                  java.lang.String languageId)
                                                                           throws DataMediatorException
        Checks whether the Attribute Dictionary attribute value description exists for the combination of atrValID and languageID.
        Parameters:
        attrValId - The attribute value ID.
        languageId - The language ID.
        Returns:
        boolean True - if the AttributeDictionary attribute value description exists. False, otherwise.
        Throws:
        DataMediatorException
      • isAttributeDictionaryAttributeAllowedValueIdentifierExist

        public static boolean isAttributeDictionaryAttributeAllowedValueIdentifierExist(java.lang.String attrId,
                                                                                        java.lang.String identifier)
                                                                                 throws DataMediatorException
        Checks whether the AttributeDictionary attribute allowed value identifier exists.
        Parameters:
        attrId - The attribute ID.
        identifier - The attribute value identifier.
        Returns:
        boolean True - if the AttributeDictionary attribute allowed value identifier exists. False, otherwise.
        Throws:
        DataMediatorException
      • populatePhysicalAttributeValueExtendedValue

        public static void populatePhysicalAttributeValueExtendedValue(java.util.Map aExtendedValue,
                                                                       com.ibm.commerce.catalog.facade.server.entity.datatypes.AttrVal aPATTRVAL,
                                                                       com.ibm.commerce.catalog.facade.server.entity.datatypes.AttributeValueDescription aPATTRVALDESC)
        Add the extended values in extended value map logical object to the AttributeValueDescription and AttrVal physical objects.
        Parameters:
        aExtendedValue - The extended value map logical object
        aPATTRVAL - The AttrVal physical object
        aPATTRVALDESC - The AttributeValueDescription physical object
      • validateInputForIntegerFields

        public static void validateInputForIntegerFields(java.lang.Object aNounPart)
                                                  throws DataMediatorException
        Validate that the input specified is a valid number for the custom Integer fields.
        Parameters:
        aNounPart - The logical noun part whose extended values need to be validated.
        Throws:
        DataMediatorException
      • parseString

        public static java.lang.Boolean parseString(java.lang.String inputString)
                                             throws DataMediatorException
        Parses the input string.
        Parameters:
        inputString - The input string to be parsed.
        Returns:
        Boolean True - if the input string is a valid number.
        Throws:
        DataMediatorException
      • getSelectIDs

        public static java.util.List getSelectIDs(java.lang.String queryName,
                                                  java.util.Map paramMap,
                                                  java.lang.String columnName)
        Return a list of IDs from the select query.
        Parameters:
        queryName - query name defined in the template
        paramMap - parameters to be passed in the query
        columnName - column name of the ID to be returned
        Returns:
        a list containing the IDs
      • appendStringWithTimeStamp

        public static java.lang.String appendStringWithTimeStamp(java.lang.String astrString,
                                                                 int anMaxLengthOfString)
        Append a timestamp to a string and return the new string. If the result string is longer than the length specified, a substring of the first number of characters of the original string plus a "-" and the timestamp will be returned.
        Parameters:
        astrString - The string that will be appended by a timestamp.
        anMaxLengthOfString - java.lang.Integer
        Returns:
        java.lang.String
      • isCatalogGroupRelationshipExist

        public static boolean isCatalogGroupRelationshipExist(java.lang.Long catalogId,
                                                              java.lang.Long catalogGroupParentId,
                                                              java.lang.Long catalogGroupChildId)
        Checks if the specified catalog group relationship exists.
        Parameters:
        catalogId - the catalog id in the relationship
        catalogGroupParentId - the parent catalog group id in the relationship
        catalogGroupChildId - the child catalog group id in the relationship
        Returns:
        true if the specified catalog group relationship already exists; false otherwise.
      • canResolveNoun

        public static boolean canResolveNoun(SelectionCriteria query)
                                      throws DataMediatorException
        Resolves a noun according to the selection criteria passed as SelectionCriteria object.
        Parameters:
        query - The SelectionCriteria object which contains the xpath key, access profile and required parameters to be passed to DSL to resolve the physical entity.
        Returns:
        Returns true if physical entity can be resolved, false otherwise.
        Throws:
        DataMediatorException
      • resolveCatalogEntry

        public static boolean resolveCatalogEntry(CatalogEntryType catalogEntryNoun)
                                           throws java.lang.Exception
        Resolve the catalog entry by using the catalog entry identifier provided in the noun.
        Parameters:
        catalogEntryNoun - The catalog entry to be resolved.
        Returns:
        True, if the catalog entry can be resolved. False, otherwise.
        Throws:
        java.lang.Exception - When there is problem with resolving the catalog entry.
      • getCatalogEntryUniqueIdsByPartNumbers

        public static java.util.Map getCatalogEntryUniqueIdsByPartNumbers(java.util.List partNumbers)
        Find the catalog entry ids by given a list of part number and store path. If there are multiple catalog entries found for the same part number in the store path and there is one catalog entry belong to the current store, the catalog entry belong to the current store in the context will be returned.
        Parameters:
        partNumbers - The list of part numbers whose catalog entries need to be found.
        Returns:
        The map which has the part number as the key and the catalog entry as the value.
      • getPartNumber

        public static java.lang.String getPartNumber(java.lang.String uniqueId)
        Get the part number of a catalog entry according to its unique id. If there is problem retrieving the part number, empty string will be returned as part number.
        Parameters:
        uniqueId - the unique id of the catalog entry
        Returns:
        the part number of the catalog entry
      • getCatalogGroupIdentifier

        public static java.lang.String getCatalogGroupIdentifier(java.lang.String uniqueId)
        Get the external identifier of a catalog group according to its unique id. If there is problem retrieving the external identifier, empty string will be returned as identifier.
        Parameters:
        uniqueId - the unique id of the catalog group
        Returns:
        the identifier of the catalog group
      • getPhysicalAttributeDictionaryAttribute

        public static com.ibm.commerce.catalog.facade.server.entity.datatypes.Attr getPhysicalAttributeDictionaryAttribute(PhysicalDataContainer aPhysicalDataContainer,
                                                                                                                           com.ibm.commerce.catalog.facade.datatypes.AttributeDictionaryAttributeType aAttributeDictionaryAttribute)
        Find the ATTR physical object in the given physical data container for the given logical attribute dictionary attribute noun.
        Parameters:
        aPhysicalDataContainer - The physical data container.
        aAttributeDictionaryAttribute - The attribute dictionary attribute logical noun.
        Returns:
        The ATTR physical object.
      • isAttrDictAllowedValueForCatentryExist

        public static boolean isAttrDictAllowedValueForCatentryExist(java.lang.String attrId,
                                                                     java.lang.String attrValId)
                                                              throws DataMediatorException
        Checks whether the Attribute Dictionary attribute allowed value is associated with a catalog entry.
        Parameters:
        attrId - The attribute ID.
        attrValId - The attribute value ID.
        Returns:
        boolean True - if the AttributeDictionary attribute allowed value exists. False, otherwise.
        Throws:
        DataMediatorException
      • isAttributeDictionaryAttributeDescriptionExist

        public static boolean isAttributeDictionaryAttributeDescriptionExist(java.lang.String attrId,
                                                                             java.lang.String languageId)
                                                                      throws DataMediatorException
        Checks whether the Attribute Dictionary attribute description exists for the combination of attrID and languageID.
        Parameters:
        attrId - The attribute ID.
        languageId - The language ID.
        Returns:
        boolean True - if the AttributeDictionary attribute description exists. False, otherwise.
        Throws:
        DataMediatorException
      • getTruncatedString

        public static java.lang.String getTruncatedString(java.lang.String astrValue,
                                                          int anColumnSize)
        Gets the truncated string based on the UTF-8 encoding and database column size. If the string length is not over the database column size limit, the original string will be returned. Otherwise, the truncated string will be returned based on the encoding and the column size specified.
        Parameters:
        astrValue - The string to be truncated.
        anColumnSize - The length limit of the database column.
        Returns:
        The truncated string or the original string.
      • validateAttributeValue

        public static void validateAttributeValue(java.util.List validateErrors,
                                                  java.lang.String attrDataType,
                                                  java.lang.String attrValue)
        Validates if the attribue value is valid for the given attibute type. This method check if the attibute value is integer or double.
        Parameters:
        validateErrors - if the value is not vlaid, an validator error will be added to this list
        attrDataType - The data type of the attirbute (STRING, INTEGER or FLOAT)
        attrValue - The attribute value to be vallidate.
      • getEntitledCatalogEntryRelationMap

        public static java.util.Map<java.lang.Long,java.util.Map<java.lang.Long,java.util.List<java.lang.Long>>> getEntitledCatalogEntryRelationMap(CatalogNavigationViewType catalogNavigationView)
                                                                                                                                             throws DataMediatorException,
                                                                                                                                                    ECException
        Get entitled catalog entry ralations for CatalogNavigationViewType object.

        The structure of the relations map should be one of the followings.

        1. For Product, key => Product ID, value => Map<SKU ID, List(empty)>
        2. For Bundle, key => Bundle ID, value => Map<key => Component ID, value => List(SKU IDs)>
        Parameters:
        catalogNavigationView -
        Returns:
        entitled catalog entry ralations map.
        Throws:
        DataMediatorException - DataMediatorException could be thrown if any DB operation failed.
        ECException - ECException could be thrown if get trading agreements failed.
      • getCatalogNavigationTransactionCacheMap

        public static com.ibm.commerce.datatype.TransactionCachedMap getCatalogNavigationTransactionCacheMap()
        Get TransactionCacheMap for catalog navigation usage.
        Returns:
        TransactionCachedMap the catalog navigation transaction cache map.
      • checkSEOEnabled

        public static boolean checkSEOEnabled()
        Checks if SEO feature is enabled or not. This method checks wc-server.xml to see if SEO feature is enabled.
        Returns:
        boolean value to indicate if SEO feature is enabled.
      • getDefaultCatalogId

        public static java.lang.String getDefaultCatalogId(java.lang.String storeId)
                                                    throws java.lang.Exception
        Returns the default catalogId for the store
        Parameters:
        storeId - The storeId of the store for which the default catalogId need to be returned
        Returns:
        The default catalogId
        Throws:
        java.lang.Exception
      • isAttributeValueUsedByOtherCatalogEntries

        public static boolean isAttributeValueUsedByOtherCatalogEntries(java.lang.String attrId,
                                                                        java.lang.String attrValId,
                                                                        java.lang.String catentryId)
                                                                 throws QueryServiceApplicationException
        Checks whether the attribute value is used by any catalog entries other than the specified catalog entry.
        Parameters:
        attrId - The attribute ID.
        attrValId - The attribute value ID.
        catentryId - The catalog entry unique ID.
        Returns:
        boolean True - if the AttributeDictionary attribute value is used by other catalog entries. False, otherwise.
        Throws:
        QueryServiceApplicationException - Exception occurs when querying database for catalog entry attribute relationships.
      • getAttributeDictionaryAttributeAllValueDescriptions

        public static PhysicalDataContainer getAttributeDictionaryAttributeAllValueDescriptions(java.lang.String attrValId)
                                                                                         throws DataMediatorException
        This method is used get the physical attribute value description objects in all languages AttributeValueDescription based on the passed parameters of attribute value id. It returns a PhysicalDataContainer containing the physical objects.
        Parameters:
        attrValId - The attribute value ID to get the values for.
        Returns:
        The PhysicalDataContainer containing the physical AttrVal objects.
        Throws:
        DataMediatorException - If an error is encountered on running the query.
      • getCurrentCmcVersionIsFEP8orHigher

        public static boolean getCurrentCmcVersionIsFEP8orHigher()
        This method returns if the CMC feature is currently at FEP8 or higher.
        Returns:
        If the CMC feature is currently at FEP8 or higher.
      • getStoreDirectory

        public static java.lang.String getStoreDirectory(java.lang.Integer storeId)
        Returns the store directory name of the given store.
        Parameters:
        storeId - Store identifier
        Returns:
        Store directory name
      • useClassicAttribute

        public static boolean useClassicAttribute()
        Checks if classic attributes are used by all stores. This method check the ATTRIBUTE table. If this table is empty, return false; otherwise return true.
        Returns:
        true if ATTRIBUTE table is not empty; false otherwise.
      • getCatalogEntryAttributesByNames

        public static java.util.Map<java.lang.String,java.util.List<java.lang.String>> getCatalogEntryAttributesByNames(java.lang.String catentryId,
                                                                                                                        java.lang.String languageId,
                                                                                                                        java.lang.String[] attributeNames)
        Gets the attributes of a catalog entry according to sepcified attribute names. The returned attributes includes properties (like "manufacturer"), attribute dictionary attributes and classic attributes. If this catalog entry is a SKU, the attributes of its parent product are also returned. If both SKU and its parent products has the same attribute name, the attribute of the SKU will override the one of the product.
        Parameters:
        catentryId - The unique id of the catalog entry to get the attributes.
        languageId - The id of the language to get the attributes. If languageId is null, the language id in the business context is used.
        attributeNames - The name of the attributes to be returned. If attributeNames is null or empty, all attributes will be returned. The name of the attributes are case-insensitive.
        Returns:
        A Map with the key as attribute name and value as a list of attribute values. If the attribute only has one value, the value list will only contain one value.