com.ibm.commerce.catalog.beans

Class ProductDataBean

    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The internal copyright field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ProductDataBean

        public ProductDataBean()
        Constructs an empty ProductDataBean object.
      • ProductDataBean

        public ProductDataBean(CatalogEntryAccessBean abCatentry)
        Constructs a ProductDataBean from a CatalogEntryAccessBean.
        Parameters:
        abCatentry - The CatalogEntryAccessBean.
      • ProductDataBean

        public ProductDataBean(CatalogEntryAccessBean abCatEntry,
                               CommandContext aCommandContext)
        Constructs a ProductDataBean from a CatalogEntryAccessBean and a command context.
        Parameters:
        abCatEntry - The CatalogEntryAccessBean.
        aCommandContext - The command context as CommandContext object.
      • ProductDataBean

        public ProductDataBean(ProductAccessBean abProduct,
                               CommandContext aCommandContext)
        Constructs a ProductDataBean from a CatalogEntryAccessBean and a command context.
        Parameters:
        abProduct - The ProductAccessBean.
        aCommandContext - The command context as CommandContext object.
    • Method Detail

      • getApplicableContractIds

        public java.lang.Long[] getApplicableContractIds()
                                                  throws ECException
        Gets a list of applicable contract IDs for calculating the prices.
        Specified by:
        getApplicableContractIds in interface ProductSmartDataBean
        Returns:
        The list of contract IDs.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getAllAttachments

        public AttachmentDataBean[] getAllAttachments()
        Gets all the attachments in the product.
        Returns:
        An array of AttachmentDataBean
      • getAttachmentsByUsage

        public AttachmentDataBean[] getAttachmentsByUsage()
        Get all the product attachments by the specified attachment relation usage. If there are no attachments to return this method will return a zero length array.
        Returns:
        An array of AttachmentDataBean
      • getAttachmentUsages

        public AttachmentUsageDataBean[] getAttachmentUsages()
        Gets all the attachment relation usage used in the product attachments If there are no attachment usages to return, this method will return a zero length array.
        Returns:
        An array of AttachmentUsageDataBean
      • getDefiningAttributes

        public AttributeAccessBean[] getDefiningAttributes()
        Gets a list of beans that represent defining attributes of the product.
        Returns:
        The list of AttributeAccessBean.
      • getDescriptiveAttributes

        public AttributeAccessBean[] getDescriptiveAttributes()
        Gets a list of beans that represent descriptive attributes of the product.
        Returns:
        The list of AttributeAccessBean.
      • getBundleAssociations

        public RelatedBundleDataBean[] getBundleAssociations()
                                                      throws ECException
        Gets a list of beans that represent bundles that are merchandising associations for this product. You can fetch specific types of merchandising associations based on the value of the variable istrAssociationType. Set the variable istrAssociationType through the setAssociationType() method before calling getBundleAssociations. If istrAssociationType is null, all types of merchandising associations will return. For example, the following code returns a list of beans that are bundle up-sells for this product:

        setAssociationType("UPSELL");
        RelatedBundleDataBean[] rb = getBundleAssociations();

        Returns:
        The list of RelatedBundleDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getCommandContext

        public CommandContext getCommandContext()
        Gets the current command's context passed in at run time.
        Specified by:
        getCommandContext in interface SmartDataBean
        Returns:
        The command context as CommandContext object.
      • getDisplayTaxes

        public CategorizedMonetaryAmountsDataBean getDisplayTaxes()
                                                           throws ECException
        Invokes the getTaxes method in PriceDataBean to calculate the taxes for those tax categories that are displayable at product display time.
        Specified by:
        getDisplayTaxes in interface ProductSmartDataBean
        Returns:
        The CategorizedMonetaryAmountsDataBean containing the taxing monetary amounts, names and descriptions.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getEntitledItems

        public ItemDataBean[] getEntitledItems()
                                        throws ECException
        Gets a list of beans that represent items that are entitled to be seen by the user who is browsing this product.
        Returns:
        The list of ItemDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getErrorMode

        public boolean getErrorMode()
        Gets the error mode.
        Returns:
        true if the error mode is set; false otherwise.
      • getDynamicKitAccessories

        public RelatedDynamicKitDataBean[] getDynamicKitAccessories()
                                                             throws ECException
        Gets a list of beans that represent dynamic kits that are accessories.
        Returns:
        The list of RelatedDynamicKitDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getDynamicKitAssociations

        public RelatedDynamicKitDataBean[] getDynamicKitAssociations()
                                                              throws ECException
        Gets a list of beans that represent dynamic kits that are merchandising associations for this product. You can fetch specific types of merchandising associations based on the value of the variable istrAssociationType. Set the variable istrAssociationType through the setAssociationType() method before calling getDynamicKitAssociations. If istrAssociationType is null, all types of merchandising associations will return. For example, the following code returns a list of beans that are dynamic kit up-sells for this product:

        setAssociationType("UPSELL");
        RelatedDynamicKitDataBean[] rb = getDynamicKitAssociations();

        Returns:
        The list of RelatedDynamicKitDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getDynamicKitCrossSells

        public RelatedDynamicKitDataBean[] getDynamicKitCrossSells()
                                                            throws ECException
        Gets a list of beans that represent dynamic kits that are cross-sells.
        Returns:
        The list of RelatedDynamicKitDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getDynamicKitUpSells

        public RelatedDynamicKitDataBean[] getDynamicKitUpSells()
                                                         throws ECException
        Gets a list of beans that represent dynamic kits that are up-sells.
        Returns:
        The list of RelatedDynamicKitDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getItemAssociations

        public RelatedItemDataBean[] getItemAssociations()
                                                  throws ECException
        Gets a list of beans that represent items that are merchandising associations for this product. You can fetch specific types of merchandising associations based on the value of the variable istrAssociationType. Set the variable istrAssociationType through the setAssociationType() method before calling getItemAssociations. If istrAssociationType is null, all types of merchandising associations will return. For example, the following code returns a list of beans that are item up-sells for this product:

        setAssociationType("UPSELL");
        RelatedItemDataBean[] ri = getItemAssociations();

        Returns:
        The list of RelatedItemDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getObjectPath

        public java.lang.String getObjectPath()
                                       throws ECException
        Gets the path to objects such as images in the context of the current store.
        Returns:
        The path to objects in the current store
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getPackageAssociations

        public RelatedPackageDataBean[] getPackageAssociations()
                                                        throws ECException
        Gets a list of beans that represent packages that are merchandising associations for this product. You can fetch specific types of merchandising associations based on the value of the variable istrAssociationType. Set the variable istrAssociationType through the setAssociationType() method before calling getPackageAssociations. If istrAssociationType is null, all types of merchandising associations will return. For example, the following code returns a list of beans that are package up-sells for this product:

        setAssociationType("UPSELL");
        RelatedPackageDataBean[] rp = getPackageAssociations();

        Returns:
        The list of RelatedPackageDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getPackageCrossSells

        public RelatedPackageDataBean[] getPackageCrossSells()
                                                      throws ECException
        Gets a list of beans that represent packages that are cross-sells to this product. If there are no package cross sells to return this method will return a zero length array.
        Specified by:
        getPackageCrossSells in interface ProductSmartDataBean
        Returns:
        The list of RelatedPackageDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getProductAssociations

        public RelatedProductDataBean[] getProductAssociations()
                                                        throws ECException
        Gets a list of beans that represent products that are merchandising associations for this product. You can fetch specific types of merchandising associations based on the value of the variable istrAssociationType. Set the variable istrAssociationType through the setAssociationType() method before calling getProductAssociations. If istrAssociationType is null, all types of merchandising associations will return. For example, the following code returns a list of beans that are product up-sells for this product:

        setAssociationType("UPSELL");
        RelatedProductDataBean[] rp = getProductAssociations();

        Returns:
        The list of RelatedProductDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getProductID

        public java.lang.String getProductID()
        Gets the product ID that represents the primary key for this product.
        Specified by:
        getProductID in interface ProductSmartDataBean
        Returns:
        The product ID.
      • getProductUpSells

        public RelatedProductDataBean[] getProductUpSells()
                                                   throws ECException
        Gets a list of beans that represent products that are up-sells to this product. If there are no product up-sells to return this method will return a zero length array.
        Specified by:
        getProductUpSells in interface ProductSmartDataBean
        Returns:
        The list of RelatedProductDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getPublishedItems

        public ItemDataBean[] getPublishedItems()
                                         throws ECException
        Gets a list of beans that represent the items for this product.
        Returns:
        The list of ItemDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • populate

        public void populate()
        Loads data into the data bean when the DataBeanManager.activate() runs.
        Specified by:
        populate in interface SmartDataBean
        Throws:
        java.lang.Exception - An exception occurs during the execution of the method.
      • getProductReplacements

        public RelatedProductDataBean[] getProductReplacements()
                                                        throws ECException
        Gets a list of beans that represent products that are replacements to this product. If there are no product replacements to return this method will return a zero length array.
        Returns:
        The list of RelatedProductDatabean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • setCommandContext

        public void setCommandContext(CommandContext aCommandContext)
        Sets the command context passed in at run time.
        Specified by:
        setCommandContext in interface SmartDataBean
        Parameters:
        aCommandContext - The command context as CommandContext object.
      • setDescription

        public void setDescription(CatalogEntryDescriptionAccessBean aabDescription)
        Sets the descriptive information object about this product.
        Parameters:
        aabDescription - The CatalogEntryDescriptionAccessBean.
      • setErrorMode

        public void setErrorMode(boolean aErrorMode)
        Sets the error mode.
        Specified by:
        setErrorMode in interface ProductInputDataBean
        Parameters:
        aErrorMode - true to have the error mode sets; false otherwise.
      • setProductID

        public void setProductID(java.lang.String astrProductId)
        Sets the product ID that represents the primary key for this product.
        Specified by:
        setProductID in interface ProductInputDataBean
        Parameters:
        astrProductId - The product ID.
      • isEnableAttributeLanguageFallback

        public boolean isEnableAttributeLanguageFallback()
        Returns true if language fallback on attribute name is enabled, false otherwise.
        Returns:
        Returns the iEnableAttributeLanguageFallback.
      • setEnableAttributeLanguageFallback

        public void setEnableAttributeLanguageFallback(boolean enableAttributeLanguageFallback)
        Enables the language fallback for retrieving the attribute names. If no attribute names are found for the language in context, the StoreId is used to determine the language fallback, the fallback language is then used to retrieve the attribute names. By default the fallback function is disabled. To enable, set the value to true
        Parameters:
        enableAttributeLanguageFallback - The iEnableAttributeLanguageFallback to set. true to enable the language fallback, false to disable it.
      • setRequestProperties

        public void setRequestProperties(TypedProperty aParam)
        Sets the request properties and populates the parameters that are needed by the bean. The following values are set in this method: product ID
        Specified by:
        setRequestProperties in interface InputDataBean
        Parameters:
        aParam - The request property as TypedProperty object.
      • isAdminMode

        public boolean isAdminMode()
        Gets the administrative mode of the bean. false is the default.
        Returns:
        true if the administrative mode is set; false otherwise.
      • setAdminMode

        public void setAdminMode(boolean aboolAdminMode)
        Sets the administrative mode of the bean. false is the default.
        Parameters:
        aboolAdminMode - true to have the administrative mode sets; false otherwise.
      • setAssociationType

        public void setAssociationType(java.lang.String type)
        Sets the variable istrAssociationType, which represents the target association type to be processed by an internal method called processCatalogEntryAssociation(). Call this method before the following methods to retrieve a list of specific merchandising association types: getBundleAssociations, getDynamicKitAssociations, getItemAssociations, getPackageAssociations, getProductAssociations. If type is null, all types of merchandising associations will return.
        Avoid calling this method multiple times. If this method is called multiple times, even with the same parameters, the same internal method will also be called multiple times, and may result in performance degradation.
        Parameters:
        type - The merchandising association type. Valid values are stored in the MASSOCTYPE.MASSOCTYPE_ID column, for example, "X-SELL".
      • getStandardPrice

        public PriceDataBean getStandardPrice()
        Gets a PriceDataBean that represents the standard contract price for the product.
        Returns:
        The PriceDataBean.
      • setAttachmentUsage

        public void setAttachmentUsage(java.lang.String astrAttachmentUsage)
        Sets the attachment relation usage identifier to get all the attachments of the product with the same usage.
        Parameters:
        astrAttachmentUsage - The attachment relation usage identifier
      • getDefiningAttributeDataBeans

        public AttributeDataBean[] getDefiningAttributeDataBeans()
        Gets a list of data beans that represent defining attributes of the product.
        Returns:
        The list of AttributeDataBean.
      • getAttributeDataBeans

        public AttributeDataBean[] getAttributeDataBeans()
        Gets a list of data beans that represent attributes of the product.
        Returns:
        The list of AttributeDataBean.
      • getDescriptiveAttributeDataBeans

        public AttributeDataBean[] getDescriptiveAttributeDataBeans()
        Gets a list of data beans that represent descriptive attributes of the product.
        Returns:
        The list of AttributeDataBean.
      • getItemDataBeans

        public ItemDataBean[] getItemDataBeans()
        Gets a list of item data beans that represent the items of the product.
        Returns:
        The list of ItemDataBean.
      • isMerchandisingAssociated

        public boolean isMerchandisingAssociated()
        Determines whether there are any merchandising associations associated with this product
        Returns:
        true if there are merchandising associations associated with this product, false otherwise.
      • isAnyMerchandisingAssociated

        public boolean isAnyMerchandisingAssociated()
        Determines whether there are any OOB or custom merchandising associations associated with this catalog entry
        Returns:
        true if there are merchandising associations associated with this catalog entry, false otherwise.
      • getMinimumItemPrice

        public PriceDataBean getMinimumItemPrice()
        Gets the minimum item price amongst all items for the product.
        Returns:
        the com.ibm.commerce.price.beans.PriceDataBean with the lowest item price.
      • getMaximumItemPrice

        public PriceDataBean getMaximumItemPrice()
        Gets the maximum item price amongst all items for the product.
        Returns:
        the com.ibm.commerce.price.beans.PriceDataBean with the maximum item price.
      • isCalculatedContractPriced

        public boolean isCalculatedContractPriced()
        Determines whether the product has a calculated contract price.
        Returns:
        true if there is a calculated contract price, false otherwise
      • isListPriced

        public boolean isListPriced()
        Determines whether the product has a list price.
        Returns:
        true if there is a list price, false otherwise
      • getNumberOfApplicableContractIds

        public int getNumberOfApplicableContractIds()
                                             throws ECException
        Gets the number of applicable contract IDs for calculating the prices.
        Returns:
        The number of contract IDs.
        Throws:
        ECException - An exception occurs during the execution of the method. An exception occurs during the execution of the method.
      • isCheckNumberOfApplicableContractIds

        public boolean isCheckNumberOfApplicableContractIds()
        Determines whether the item has any applicable contract IDs
        Returns:
        true if there is one or more applicable contract id
      • getApplicableContractPriceRanges

        public com.ibm.commerce.catalog.util.RangePricingData[] getApplicableContractPriceRanges()
                                                                                          throws ECException
        Retrieve the tiered pricing information for the current product in all the applicable contracts.
        Returns:
        The array of RangePricingData that contains the tiered pricing data for each of the contracts applicable to this product.
        Throws:
        ECException - An exception occurs during the execution of the method.