com.ibm.commerce.catalog.beans

Class CategoryDataBean

  • All Implemented Interfaces:
    DataBean, InputDataBean, SmartDataBean, com.ibm.commerce.catalog.beans.CategoryInputDataBean, com.ibm.commerce.catalog.beans.CategorySmartDataBean, Protectable, java.io.Serializable
    Direct Known Subclasses:
    EMarketingSpot.Category


    public class CategoryDataBean
    extends CatalogGroupAccessBean
    implements com.ibm.commerce.catalog.beans.CategoryInputDataBean, com.ibm.commerce.catalog.beans.CategorySmartDataBean
    This data bean represents a Category, not like the CatalogGroupDataBean which is used to store the result of the catalog group queries provided by methods in com.ibm.commerce.tools.campaigns.CampaignInitiativeEvaluateCmd.

    You can find more information about data beans in the WebSphere Commerce data beans topic in the Information Center.

    Access Beans: CatalogGroup

    Mandatory Parameters (for single row retrieval):

    • category ID, catalog ID, Deep fetch ID

    Some hints and tips for using this data bean are:

    • It is important to set the category ID, catalog ID, and deep fetch ID values before activating the data bean
    • You can set parameters using the constructor, or the setters

    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

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

        public static final java.lang.String CLASSNAME
        The name of this implementation of the command.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CategoryDataBean

        public CategoryDataBean()
        Constructs an empty CategoryDataBean.
      • CategoryDataBean

        public CategoryDataBean(CatalogGroupAccessBean abCatGroup)
        Constructs a CategoryDataBean from a CatalogGroupAccessBean.
        Parameters:
        abCatGroup - The CatalogGroupAccessBean.
      • CategoryDataBean

        public CategoryDataBean(CatalogGroupAccessBean abCatGroup,
                                CommandContext aCommandContext)
        Constructs a CategoryDataBean from a CatalogGroupAccessBean and a command context.
        Parameters:
        abCatGroup - The CatalogGroupAccessBean.
        aCommandContext - The command context as CommandContext object.
    • Method Detail

      • getAllAttachments

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

        public AttachmentDataBean[] getAttachmentsByUsage()
        Get all the product attachments by the specified attachment relation usage.
        Returns:
        An array of AttachmentDataBean
      • getAttachmentUsages

        public AttachmentUsageDataBean[] getAttachmentUsages()
        Get all the attachment relation usage used in the catalog group attachments
        Returns:
        An array of AttachmentUsageDataBean
      • getBundles

        public BundleDataBean[] getBundles()
                                    throws ECException
        Gets a list of beans that represent bundles in this category.
        Specified by:
        getBundles in interface com.ibm.commerce.catalog.beans.CategorySmartDataBean
        Returns:
        The list of BundleDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getCatalogId

        public java.lang.String getCatalogId()
        Gets the catalog ID that represents the primary key for the catalog.
        Specified by:
        getCatalogId in interface com.ibm.commerce.catalog.beans.CategorySmartDataBean
        Returns:
        The catalog ID.
      • getCategoryAccessories

        public RelatedCategoryDataBean[] getCategoryAccessories()
                                                         throws ECException
        Gets a list of beans that represent categories that are accessories to this category.
        Specified by:
        getCategoryAccessories in interface com.ibm.commerce.catalog.beans.CategorySmartDataBean
        Returns:
        The list of RelatedCategoryDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getCategoryAttributes

        public CatalogGroupAttributeAccessBean[] getCategoryAttributes()
                                                                throws ECException
        Gets a list of beans that represent attributes of this category.
        Specified by:
        getCategoryAttributes in interface com.ibm.commerce.catalog.beans.CategorySmartDataBean
        Returns:
        The list of CatalogGroupAttributeAccessBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getCategoryCrossSells

        public RelatedCategoryDataBean[] getCategoryCrossSells()
                                                        throws ECException
        Gets a list of beans that represent categories that are cross-sells to this category.
        Specified by:
        getCategoryCrossSells in interface com.ibm.commerce.catalog.beans.CategorySmartDataBean
        Returns:
        The list of RelatedCategoryDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getCategoryId

        public java.lang.String getCategoryId()
        Gets the category ID that represents the primary key for this category.
        Specified by:
        getCategoryId in interface com.ibm.commerce.catalog.beans.CategorySmartDataBean
        Returns:
        The category ID.
      • getCategoryUpSells

        public RelatedCategoryDataBean[] getCategoryUpSells()
                                                     throws ECException
        Gets a list of beans that represent categories that are up-sells to this category.
        Specified by:
        getCategoryUpSells in interface com.ibm.commerce.catalog.beans.CategorySmartDataBean
        Returns:
        The list of RelatedCategoryDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getDeepFetch

        public boolean getDeepFetch()
        Gets the flag for deep fetch.
        Returns:
        true if using deep fetch ; false otherwise.
      • getDescription

        public CatalogGroupDescriptionAccessBean getDescription()
        Gets a bean representing descriptive information about this category.
        Specified by:
        getDescription in interface com.ibm.commerce.catalog.beans.CategorySmartDataBean
        Overrides:
        getDescription in class CatalogGroupAccessBean
        Returns:
        The CatalogGroupDescriptionAccessBean.
      • getDynamicKits

        public DynamicKitDataBean[] getDynamicKits()
                                            throws ECException
        Gets a list of beans that represent dynamic kits in this category
        Returns:
        The list of DynamicKitDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getExclusionPSIds

        public java.util.Vector getExclusionPSIds()
        Gets the exclusion product set IDs.
        Returns:
        The vector of excluded product set IDs.
      • getFilterEnabled

        public java.lang.String getFilterEnabled()
        Gets the enabled filter.
        Returns:
        The enabled filter.
      • getIdentifier

        public java.lang.String getIdentifier()
        Gets the external identifier of the category.
        Specified by:
        getIdentifier in interface com.ibm.commerce.catalog.beans.CategorySmartDataBean
        Overrides:
        getIdentifier in class CatalogGroupAccessBean
        Returns:
        The external identifier of the category.
      • getInclusionPSIds

        public java.util.Vector getInclusionPSIds()
        Gets the inclusion product set IDs.
        Returns:
        The vector of inclusion product set IDs.
      • getItems

        public ItemDataBean[] getItems()
                                throws ECException
        Gets a list of beans that represent items in this category.
        Specified by:
        getItems in interface com.ibm.commerce.catalog.beans.CategorySmartDataBean
        Returns:
        The list of ItemDataBean.
        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.
      • getPackages

        public PackageDataBean[] getPackages()
                                      throws ECException
        Gets a list of beans that represent packages in this category.
        Specified by:
        getPackages in interface com.ibm.commerce.catalog.beans.CategorySmartDataBean
        Returns:
        The list of PackageDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getParentCategories

        public CategoryDataBean[] getParentCategories()
                                               throws ECException
        Gets a list of beans that represent parent categories of this category.
        Returns:
        The list of CategoryDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getProducts

        public ProductDataBean[] getProducts()
                                      throws ECException
        Gets a list of beans that represent products in this category.
        Specified by:
        getProducts in interface com.ibm.commerce.catalog.beans.CategorySmartDataBean
        Returns:
        The list of ProductDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • getRequestProperties

        public TypedProperty getRequestProperties()
        Gets the request property passed in at run time.
        Specified by:
        getRequestProperties in interface InputDataBean
        Returns:
        The request property as TypedProperty object. Always returns null.
      • getSubCategories

        public CategoryDataBean[] getSubCategories()
                                            throws ECException
        Gets a list of beans that represent subcategories of this category.
        Specified by:
        getSubCategories in interface com.ibm.commerce.catalog.beans.CategorySmartDataBean
        Returns:
        The list of CategoryDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • hasSubCategories

        public boolean hasSubCategories()
                                 throws ECException
        Whether or not the category has subcategories.
        Returns:
        true if there are subcategories ; false otherwise.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • populate

        public void populate()
                      throws java.lang.Exception
        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.
      • 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
      • setCatalogId

        public void setCatalogId(java.lang.String astrCatalogId)
        Sets the catalog Id that represents the primary key for the catalog.
        Specified by:
        setCatalogId in interface com.ibm.commerce.catalog.beans.CategoryInputDataBean
        Parameters:
        astrCatalogId - The catalog id.
      • setCategoryId

        public void setCategoryId(java.lang.String astrCategoryId)
        Sets the category Id that represents the primary key for this category.
        Specified by:
        setCategoryId in interface com.ibm.commerce.catalog.beans.CategoryInputDataBean
        Parameters:
        astrCategoryId - The category Id.
      • 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.
      • setDeepFetch

        public void setDeepFetch(boolean aboolDeepFetch)
        Sets the boolean flag if deep fetch is in use.
        Parameters:
        aboolDeepFetch - true if deep fetch is in use; false otherwise.
      • setDescription

        public void setDescription(CatalogGroupDescriptionAccessBean aabDescription)
        Sets the description for the category.
        Parameters:
        aabDescription - The CatalogGroupDescriptionAccessBean.
      • setExclusionPSIds

        public void setExclusionPSIds(java.util.Vector newExclusionPSIds)
        Sets the exclusion product set IDs.
        Parameters:
        newExclusionPSIds - The vector of exclusion product set Ids.
      • setFilterEnabled

        public void setFilterEnabled(java.lang.String newFilterEnabled)
        Sets the filter enabled flag.
        Parameters:
        newFilterEnabled - The filter enabled flag.
      • setIdentifier

        public void setIdentifier(java.lang.String astrIdentifier)
        Sets the external identifier for this category.
        Specified by:
        setIdentifier in interface com.ibm.commerce.catalog.beans.CategoryInputDataBean
        Overrides:
        setIdentifier in class CatalogGroupAccessBean
        Parameters:
        astrIdentifier - The external identifier.
      • setInclusionPSIds

        public void setInclusionPSIds(java.util.Vector newInclusionPSIds)
        Sets the inclusion product set IDs.
        Parameters:
        newInclusionPSIds - The vector of inclusion product set Ids.
      • 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: category ID catalog ID deep fetch path
        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.
        Returns:
        true if in administrative mode; false otherwise.
      • setAdminMode

        public void setAdminMode(boolean aboolAdminMode)
        Sets the administrative mode.
        Parameters:
        aboolAdminMode - true for administrative mode; false otherwise.
      • isChildCategory

        public boolean isChildCategory()
        Returns true if the category has a parent category or parent categories, returns false otherwise
        Returns:
        boolean
      • isMerchandisingAssociated

        public boolean isMerchandisingAssociated()
        Returns true if the category has merchandising associated
        Returns:
        boolean
      • getCatalogEntryDataBeans

        public CatalogEntryDataBean[] getCatalogEntryDataBeans()
        Gets a list of beans that represent catalog entries in this category.
        Returns:
        The list of CatalogEntryDataBean.