com.ibm.commerce.catalogattachment.commands

Class CatalogAttachmentUpdateCmdImpl

  • All Implemented Interfaces:
    AttachmentRelationBaseUpdateCmd, CatalogAttachmentUpdateCmd, AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class CatalogAttachmentUpdateCmdImpl
    extends AttachmentRelationBaseUpdateCmdImpl
    implements CatalogAttachmentUpdateCmd
    The CatalogAttachmentUpdateCmd is a URL and controller command that:
    • Updates a new attachment relation for the specified catalog.
    • Updates the description for the attachment relation.
    To obtain the Catalog ID:
    • Catalog ID can be specified in the parameter.
    • If Catalog ID is not specified, then the external catalog identifier can be specified. Identifier is used together with the member ID to obtain the Catalog ID. The member ID is obtained as the owner of the store where this command is called.
    • If the catalog identifier is not specified, the attachment relation ID must be given to obtain the attachment relation. The attachment relation is checked to determine if it is a catalog attachment relation. The object ID found in the attachment relation is used as the catalog ID.

    If the attachment relation ID is specified, then the attachment relation will be updated. If the command is called as URL. Only one description can be created or updated. Otherwise, multiple descriptions can be updated by setting the vector of AttachmentRelationDescriptionDataBean.

    When updating the attachment relation, the command will change the parameters set by the command. However, the behaviour in updating the attachment relation description is different. Its behaviour will depend on whether the command was called as a URL or as a command.

    • When creating the vector of AttachmentRelationDescriptionDataBean, the attachment relation ID from the databean will not be used. The attachment relation ID will be obtained from the command itself. Either user specified the attachment relation ID or it is obtained from the attachment relation just created by the command. Make sure that all the name, short description, and long description are set in the databean even if they are not changed. The command will take these name and descriptions as they are and update the attachment relation description.
    • However, when the command is executed as URL, it will only update the parameters set by the caller. If the name is set but the long description is not set, then only the name will be updated. The long description will remain unchanged.

    By default, the option to create the missing attachment relation and its description is set to True. If the option is set to false but the attachment relation is not found, an exception will be thrown. An exception will also be thrown if any of the attachment relation descriptions are not found. Parameters:

    • Catalog ID or identifier of the Catalog
    • Attachment Relation ID
    • Attachment Target ID
    • Attachment Relation Usage ID
    • Sequence
    • Relation Name
    • Relation Description Language ID
    • Relation Short Description
    • Relation Long Description
    • Vector of AttachmentRelationDescriptionDataBean
    Access Beans and Data Beans:
    • CatalogAccessBean
    • AttachmentRelationAccessBean
    • AttachmentRelationDescriptionAccessBean
    • AttachmentRelationDescriptionDataBean
    Task Commands:
    • AddAttachmentRelationCmd
    • ,
    • UpdateAttachmentRelationCmd
    • ,
    Utilities and Helpers:
    • AttachmentRelationHelper
    See Also:
    Serialized Form