com.ibm.commerce.attachment.commands

Class AttachmentRelationBaseAddCmdImpl

  • All Implemented Interfaces:
    AttachmentRelationBaseAddCmd, 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
    Direct Known Subclasses:
    CatalogAttachmentAddCmdImpl, CatalogEntryAttachmentAddCmdImpl, CatalogGroupAttachmentAddCmdImpl


    public abstract class AttachmentRelationBaseAddCmdImpl
    extends ControllerCommandImpl
    implements AttachmentRelationBaseAddCmd
    The AttachmentRelationBaseAddCmd is a base URL and controller command for the business object attachment relationship that:
    • Adds a new attachment relation for the specified object.
    • Add the descriptions for the attachment relation.

    If the attachment relation ID is specified, then only attachment relation description will be created. Multiple descriptions can be created by setting the vector of AttachmentRelationDescriptionDataBean.

    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. Parameters:

    • Object ID
    • 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:
    • AttachmentRelationAccessBean
    • AttachmentRelationDescriptionAccessBean
    • AttachmentRelationDescriptionDataBean
    Task Commands:
    • AddAttachmentRelationCmd
    • ,
    Utilities and Helpers:
    • AttachmentRelationHelper
    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
        Define the CLASSNAME.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AttachmentRelationBaseAddCmdImpl

        public AttachmentRelationBaseAddCmdImpl()
    • Method Detail

      • getAttachmentObjectTypeId

        public java.lang.Integer getAttachmentObjectTypeId()
        Gets the Attachment Object Type ID.
        Returns:
        The Attachment Object Type ID
      • getAttachmentRelationUsageId

        public java.lang.Integer getAttachmentRelationUsageId()
        Gets the attachment relation usage ID in the attachment relation.
        Specified by:
        getAttachmentRelationUsageId in interface AttachmentRelationBaseAddCmd
        Returns:
        The attachment relation usage ID
      • getSequence

        public java.lang.Double getSequence()
        Gets the sequence used in the attachment relation.
        Specified by:
        getSequence in interface AttachmentRelationBaseAddCmd
        Returns:
        The sequence
      • getAttachmentRelationDescriptions

        public java.util.Vector getAttachmentRelationDescriptions()
        Gets the vector of AttachmentRelationDescriptionDataBean
        Specified by:
        getAttachmentRelationDescriptions in interface AttachmentRelationBaseAddCmd
        Returns:
        The vector of AttachmentRelationDescriptionDataBean
      • performExecute

        public void performExecute()
                            throws ECException
        If the attachment relation ID is not given, calls addAttachmentRelation to create the attachment relation. Calls addAttachmentRelationDescriptions to create the attachment relation descriptions.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException
      • reset

        public void reset()
        Resets the variables used.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • setAttachmentRelationId

        public void setAttachmentRelationId(java.lang.Long anAttachmentRelationId)
        Sets the attachment relation ID.
        Specified by:
        setAttachmentRelationId in interface AttachmentRelationBaseAddCmd
        Parameters:
        anAttachmentRelationId - The attachment relation ID
      • setAttachmentTargetId

        public void setAttachmentTargetId(java.lang.Long anAttachmentTargetId)
        Sets the attachment target ID.
        Specified by:
        setAttachmentTargetId in interface AttachmentRelationBaseAddCmd
        Parameters:
        anAttachmentTargetId - The attachment target ID
      • setAttachmentRelationUsageId

        public void setAttachmentRelationUsageId(java.lang.Integer anAttachmentRelationUsageId)
        Sets the attachment relation usage ID.
        Specified by:
        setAttachmentRelationUsageId in interface AttachmentRelationBaseAddCmd
        Parameters:
        anAttachmentRelationUsageId - The attachment relation usage ID
      • setAttachmentObjectId

        public void setAttachmentObjectId(java.lang.Long anAttachmentObjectId)
        Sets the Attachment Object ID.
        Specified by:
        setAttachmentObjectId in interface AttachmentRelationBaseAddCmd
        Parameters:
        anAttachmentObjectId - The Attachment Object ID
      • setAttachmentObjectTypeId

        public void setAttachmentObjectTypeId(java.lang.Integer anAttachmentObjectTypeId)
        Sets the Attachment Object Type ID.
        Parameters:
        anObjectTypeId - The Attachment Object Type ID
      • setSequence

        public void setSequence(java.lang.Double adSequence)
        Sets the sequence in the attachment relation.
        Specified by:
        setSequence in interface AttachmentRelationBaseAddCmd
        Parameters:
        adSequence - The sequence number
      • setAttachmentRelationDescriptions

        public void setAttachmentRelationDescriptions(java.util.Vector avAttachmentRelationDescriptionDataBeans)
        Sets the vector of AttachmentRelationDescriptionDataBean to be created as the description for the attachment relation.
        Specified by:
        setAttachmentRelationDescriptions in interface AttachmentRelationBaseAddCmd
        Parameters:
        avAttachmentRelationDescriptionDataBeans - The list of AttachmentRelationDescriptionDataBean
      • setURL

        public void setURL(java.lang.String astrURL)
        Sets the redirect URL.
        Specified by:
        setURL in interface AttachmentRelationBaseAddCmd
        Parameters:
        astrURL - The redirect URL