com.ibm.commerce.attachment.commands

Interface WriteManagedFileCmd

  • All Superinterfaces:
    com.ibm.websphere.command.CacheableCommand, com.ibm.commerce.command.CacheableECCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, ECCommand, java.io.Serializable, com.ibm.websphere.command.TargetableCommand, TaskCommand
    All Known Implementing Classes:
    WriteManagedFileCmdImpl


    public interface WriteManagedFileCmd
    extends TaskCommand
    Interface for the command WriteManagedFile. The Commerce implementation for the command is WriteManagedFileCmdImpl.
    WriteManagedFile can:
    • Create a new managed file
    • Update the content of an existing managed file
    • Disassociate the managed file with an attachment asset

    The file path and the file content must be set if a new managed file is to be created. Either the file path or file ID must be set, together with the file content if the managed file is to be updated. The association flag must be set if the managed file association flag is to be updated.
    The file path and the content of the managed file can be retrieved by the available getter methods.
    • Field Detail

      • COPYRIGHT

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

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

      • getFilePath

        java.lang.String getFilePath()
        Gets the file path.
        Returns:
        The file path
      • getFile

        byte[] getFile()
        Gets the content of the file.
        Returns:
        The file content
      • setFileId

        void setFileId(java.lang.Long anFileId)
        Sets the file ID.
        Parameters:
        anFileId - The file ID
      • getFileId

        java.lang.Long getFileId()
        Gets the file ID.
        Returns:
        The file ID
      • setFilePath

        void setFilePath(java.lang.String astrFilePath)
        Sets the file path.
        Parameters:
        astrFilePath - The file path
      • setFile

        void setFile(byte[] abaFile)
        Sets the content of the file.
        Parameters:
        abaFile - The file content
      • setAssociation

        void setAssociation(java.lang.Boolean aboolAssociation)
        Sets the association option of the managed file.
        • True - the managed file is linked to an attachment asset.
        • False - the managed file is not linked to an attachment asset.
        By default it is set to True. It is possible that multiple assets can be linked to the same managed file. The option here only specified whether the caller of the command is associating or removing the link to the managed file.
        Parameters:
        aboolAssociation - The option to set an association with the managed file
      • setStoreentId

        void setStoreentId(java.lang.Integer anStoreentId)
        Sets the store entity ID that owns the managed file.
        Parameters:
        anStoreentId - The store entity ID