Class AttachmentRejectedEvent<T extends AiChatMessage>

java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<AiChat<T>>
io.jmix.aichat.component.chat.AttachmentRejectedEvent<T>
Type Parameters:
T - the message type
All Implemented Interfaces:
Serializable

public class AttachmentRejectedEvent<T extends AiChatMessage> extends com.vaadin.flow.component.ComponentEvent<AiChat<T>>
Fired when the UploadManager rejects an attached file (too many, too large, or wrong type). Re-fired from the inner input so the facade need not be bypassed.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
     
    protected com.vaadin.flow.component.upload.UploadManager.FileRejectionReason
     

    Fields inherited from class java.util.EventObject

    source
  • Constructor Summary

    Constructors
    Constructor
    Description
    AttachmentRejectedEvent(AiChat<T> source, boolean fromClient, String fileName, com.vaadin.flow.component.upload.UploadManager.FileRejectionReason reason)
    Creates the event.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    com.vaadin.flow.component.upload.UploadManager.FileRejectionReason
     

    Methods inherited from class com.vaadin.flow.component.ComponentEvent

    getSource, getUI, isFromClient, unregisterListener

    Methods inherited from class java.util.EventObject

    toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • fileName

      protected String fileName
    • reason

      protected com.vaadin.flow.component.upload.UploadManager.FileRejectionReason reason
  • Constructor Details

    • AttachmentRejectedEvent

      public AttachmentRejectedEvent(AiChat<T> source, boolean fromClient, String fileName, com.vaadin.flow.component.upload.UploadManager.FileRejectionReason reason)
      Creates the event.
      Parameters:
      source - the source component
      fromClient - true if the event comes from the client
      fileName - the name of the rejected file
      reason - why the file was rejected
  • Method Details

    • getFileName

      public String getFileName()
      Returns:
      the name of the rejected file
    • getReason

      public com.vaadin.flow.component.upload.UploadManager.FileRejectionReason getReason()
      Returns:
      why the file was rejected