Class AttachmentRelationBaseUpdateCmdImpl

  • All Implemented Interfaces:
    AttachmentRelationBaseUpdateCmd, AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable,,,,,,
    Direct Known Subclasses:
    CatalogAttachmentUpdateCmdImpl, CatalogEntryAttachmentUpdateCmdImpl, CatalogGroupAttachmentUpdateCmdImpl

    public abstract class AttachmentRelationBaseUpdateCmdImpl
    extends ControllerCommandImpl
    implements AttachmentRelationBaseUpdateCmd
    The AttachmentRelationBaseUpdateCmd is a base command for the business object attachment relationship URL and controller command that:
    • Updates a new attachment relation for the specified object.
    • Update the descriptions for the attachment relation.

    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. The behaviour depends 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. Ensure that the name, short description, and long description are set in the databean even if they are not changed. The command will take the name and descriptions as they are and update the attachment relation description.
    • However, when the command is executed as a 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 descriptions is set to True. If the option is set to false and the attachment relation or any of its descriptions is not found, an exception will be thrown. 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
    • ,
    • UpdateAttachmentRelationCmd
    • ,
    Utilities and Helpers:
    • AttachmentRelationHelper
    See Also:
    Serialized Form
    • Field Detail


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

        public static final java.lang.String CLASSNAME
        Define the CLASSNAME.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AttachmentRelationBaseUpdateCmdImpl

        public AttachmentRelationBaseUpdateCmdImpl()
    • Method Detail

      • getAttachmentObjectTypeId

        public java.lang.Integer getAttachmentObjectTypeId()
        Gets the Attachment Object Type ID.
        The Attachment Object Type ID
      • 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
        performExecute in class AbstractECTargetableCommand
      • reset

        public void reset()
        Resets the variables used.
        Specified by:
        reset in interface
        reset in class AbstractECTargetableCommand
      • setCreateMissing

        public void setCreateMissing(java.lang.Boolean aboolCreateMissing)
        Sets the option the create missing attachment relation and attachment relation descriptions.
        • True - create the missing attachment relation and descriptions.
        • False - throw exception if the attachment relation or descriptions do not exists
        By default, the option is set to True.
        Specified by:
        setCreateMissing in interface AttachmentRelationBaseUpdateCmd
        aboolCreateMissing - The create missing flag
      • setAttachmentObjectTypeId

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

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

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

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

        public void setSequence(java.lang.Double adSequence)
        Sets the sequence in the attachment relation.
        Specified by:
        setSequence in interface AttachmentRelationBaseUpdateCmd
        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 AttachmentRelationBaseUpdateCmd
        avAttachmentRelationDescriptionDataBeans - The list of AttachmentRelationDescriptionDataBean
      • setURL

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