Package io.jmix.aichat.component.chat
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
FieldsModifier and TypeFieldDescriptionprotected Stringprotected com.vaadin.flow.component.upload.UploadManager.FileRejectionReasonFields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionAttachmentRejectedEvent(AiChat<T> source, boolean fromClient, String fileName, com.vaadin.flow.component.upload.UploadManager.FileRejectionReason reason) Creates the event. -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.component.upload.UploadManager.FileRejectionReasonMethods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, getUI, isFromClient, unregisterListenerMethods inherited from class java.util.EventObject
toString
-
Field Details
-
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 componentfromClient-trueif the event comes from the clientfileName- the name of the rejected filereason- why the file was rejected
-
-
Method Details
-
getFileName
- Returns:
- the name of the rejected file
-
getReason
public com.vaadin.flow.component.upload.UploadManager.FileRejectionReason getReason()- Returns:
- why the file was rejected
-