Class UploadEvent

  • All Implemented Interfaces:

    public class UploadEvent
    extends Event
    Represents that user has uploaded one or several files from the client to the server.
    See Also:
    Serialized Form
    • Constructor Detail

      • UploadEvent

        public UploadEvent​(java.lang.String name,
                           Component target,
                           Media[] meds)
        Constructs the upload event.
        meds - the media being uploaded, or null if no file is uploaded. If a zero-length array is passed, null is assumed.
    • Method Detail

      • getMedia

        public final Media getMedia()
        Returns the first media being uploaded, or null if no file is uploaded.
      • getMedias

        public final Media[] getMedias()
        Returns the array of media being uploaded, or null if the user uploaded no file at all. If non-null is returned, the array length must be at least one.
      • getUploadEvent

        public static UploadEvent getUploadEvent​(java.lang.String name,
                                                 Component component,
                                                 AuRequest request)
        Creates an instance of UploadEvent based on the event name and component, the UploadEvent contains the upload media(s) from user. Internal Use Only.
        name - event name
        component - component that triggers the upload event
        request - An AuRequest object
        upload event