com.ibm.commerce.command

Class AttachmentViewCmdImpl

  • All Implemented Interfaces:
    AccCommand, AttachmentViewCmd, 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:
    OrderItemAttachmentViewCmdImpl, RFQAttachmentViewCmdImpl


    public class AttachmentViewCmdImpl
    extends ControllerCommandImpl
    implements AttachmentViewCmd
    This class will retrieve the attachment content from the database and return the stream to the browser as a DirectView object if attachmentURL is same as attachment_id. If attachmentURL is not the same as attachment_id, it will be assumed that the attachment is not stored as BLOB in the attachment table in the database. We will open up the file as specified in attachmenturl and return the stream as a DirectView object to the browser. AttachmentViewCmdImpl is only intended to be extended and not used directly. AttachmentViewCmdImpl is not registered in the URL configuration or the command configuration.
    See Also:
    Serialized Form
    • Constructor Detail

      • AttachmentViewCmdImpl

        public AttachmentViewCmdImpl()
    • Method Detail

      • setAttachmentId

        public void setAttachmentId(java.lang.String id)
        This method sets the attachmentobj_id of the attachment object in database table.
        Specified by:
        setAttachmentId in interface AttachmentViewCmd
        Parameters:
        id - This is a String object representing the attachmentobj_id.
      • performAccessCheck

        public boolean performAccessCheck()
        This method implements access control checking. It is written by the command writer.
        Specified by:
        performAccessCheck in interface AttachmentViewCmd
        Returns:
        This method always returns a boolean value of true.