com.ibm.commerce.catalog.beans

Class CatalogDataBean

  • All Implemented Interfaces:
    DataBean, InputDataBean, SmartDataBean, com.ibm.commerce.catalog.beans.CatalogInputDataBean, com.ibm.commerce.catalog.beans.CatalogSmartDataBean, Protectable, java.io.Serializable


    public class CatalogDataBean
    extends CatalogAccessBean
    implements com.ibm.commerce.catalog.beans.CatalogInputDataBean, com.ibm.commerce.catalog.beans.CatalogSmartDataBean
    This data bean represents a Catalog.

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

    Access Beans: Catalog

    Mandatory Parameters (for single row retrieval):

    • catalog ID

    Some hints and tips for using this data bean are:

    • It is important to set the catalog ID value before activating the data bean
    • You can set parameters using the constructor, or setters

    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

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

      • CatalogDataBean

        public CatalogDataBean()
        Constructs an empty CatalogDataBean.
      • CatalogDataBean

        public CatalogDataBean(CatalogAccessBean abCatalog)
        Constructs a CatalogDataBean from a CatalogAccessBean.
        Parameters:
        abCatalog - The CatalogAccessBean.
        Throws:
        RemoteException - In the execution of the method, a remote exception occurs.
        FinderException - In the execution of the method, a finder exception occurs.
        NamingException - In the execution of the method, a naming exception occurs.
        CreateException - In the execution of the method, a create exception occurs.
      • CatalogDataBean

        public CatalogDataBean(CatalogAccessBean abCatalog,
                               CommandContext aCommandContext)
        Constructs a CatalogDataBean from a CatalogAccessBean and the command context.
        Parameters:
        abCatalog - The CatalogAccessBean.
        aCommandContext - The command context as CommmnadContext object.
        Throws:
        RemoteException - In the execution of the method, a remote exception occurs.
        FinderException - In the execution of the method, a finder exception occurs.
        NamingException - In the execution of the method, a naming exception occurs.
        CreateException - In the execution of the method, a create exception occurs.
    • Method Detail

      • getCatalogId

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

        public AttachmentDataBean[] getAllAttachments()
        Gets all the attachments in the catalog. If there are no attachments to return this method will return a zero length array.
        Returns:
        An array of AttachmentDataBean
      • getAttachmentsByUsage

        public AttachmentDataBean[] getAttachmentsByUsage()
        Gets all the catalog attachments by the specified attachment relation usage. The attachment relation usage can be specified by calling the setAttachmentUsage method. 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 catalog attachments If there are no attachment usages to return then this method will return a zero length array.
        Returns:
        An array of AttachmentUsageDataBean
      • getDescription

        public CatalogDescriptionAccessBean getDescription()
        Gets a bean representing descriptive information about this catalog.
        Specified by:
        getDescription in interface com.ibm.commerce.catalog.beans.CatalogSmartDataBean
        Overrides:
        getDescription in class CatalogAccessBean
        Returns:
        The CatalogDescriptionAccessBean.
        Throws:
        RemoteException - In the execution of the method, a remote exception occurs.
        FinderException - In the execution of the method, a finder exception occurs.
        NamingException - In the execution of the method, a naming exception occurs.
        CreateException - In the execution of the method, a create exception occurs.
      • getIdentifier

        public java.lang.String getIdentifier()
        Gets the external identifier of the catalog.
        Specified by:
        getIdentifier in interface com.ibm.commerce.catalog.beans.CatalogSmartDataBean
        Overrides:
        getIdentifier in class CatalogAccessBean
        Returns:
        The external identifier of the catalog.
      • 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.
      • getTopCategories

        public CategoryDataBean[] getTopCategories()
                                            throws ECException
        Gets a list of data beans that represent the top categories of this catalog.
        • If the list of top categories is already present in the transaction cache, the same is returned.
        • Else, if the isAdminMode returns true then, no entitlement checking is performed to return the top categories.
        • If isAdminMode returns false, then a check is made to see if Search Feature is enabled.
        • If Search is enabled, CheckCatalogGroupEntitlementCmd command is used to check for entitlement and get the list of CatalogGroupAccessBean.
        • If isAdminMode returns false, search is not enabled and entitlement check is required, the method getEntitledCatalogGroupsByStore(java.lang.Integer, java.util.Vector[], java.util.Vector[]) will be called to return the list of catalog group access beans.
        • If isAdminMode returns false, search is not enabled and entitlement check is not required, the method getCatalogGroupsByStore(Integer) will be called to return the list of catalog group access beans.
        The access beans returned above are then used to create the list of data beans corresponding to the top categories.
        Specified by:
        getTopCategories in interface com.ibm.commerce.catalog.beans.CatalogSmartDataBean
        Returns:
        The list of CategoryDataBean.
        Throws:
        ECException - An exception occurs during the execution of the method.
      • populate

        public void populate()
        Fetches and populates information needed by the bean.
        Specified by:
        populate in interface SmartDataBean
        Throws:
        RemoteException - In the execution of the method, a remote exception occurs.
        FinderException - In the execution of the method, a finder exception occurs.
        NamingException - In the execution of the method, a naming exception occurs.
        CreateException - In the execution of the method, a create exception occurs.
      • setCatalogId

        public void setCatalogId(java.lang.String astrCatalogId)
        Sets the catalog ID that represents the primary key for this catalog.
        Specified by:
        setCatalogId in interface com.ibm.commerce.catalog.beans.CatalogInputDataBean
        Parameters:
        astrCatalogId - The catalog ID.
      • setCommandContext

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

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

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

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

        public boolean isAdminMode()
        Is the bean used in administrative mode. The administrative flag is used when the databean is used in an administrative console. By setting this flag to true, we do not need to check for entitlements for getTopCategories().
        Returns:
        false is the default value. Returns true if the bean is used in administrative mode.
      • setAdminMode

        public void setAdminMode(boolean aboolAdminMode)
        Sets the administrative mode of the bean.
        Parameters:
        iboolAdminMode - true to used the bean in administrative mode; otherwise false.
      • setDescription

        public void setDescription(CatalogDescriptionAccessBean aabDescription)
        Sets the description for the catalog.
        Parameters:
        aabDescription - The CatalogDescriptionAccessBean.