Class FileInfo
java.lang.Object
com.flowingcode.vaadin.addons.uploadhelper.FileInfo
- All Implemented Interfaces:
Serializable
Represents a file in the file list of an
Upload component.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs aFileInfoobject from the specified finished upload event.Constructs aFileInfoobject with the specified upload and file name. -
Method Summary
Modifier and TypeMethodDescriptioncomplete()Configure the upload in complete state (i.e. uploading is completed)True if uploading is completed, false otherwise.voidcreate()Adds a new file to the upload component.errorMessage(String errorMessage) Error message returned by the server, if any.Returnstrueif uploading is completed, false otherwise.Returns the error message returned by the server.Returnstrueif the remaining progress is unknown, false otherwise.getName()Returns the name of the uploaded file.Returns a number between 0 and 100, representing the uploading progress.Returns the uploading status.Configure the upload in indeterminate state (i.e. the remaining time is unknown)indeterminate(Boolean indeterminate) True if the remaining time is unknown, false otherwise.Number representing the uploading progress.Uploading status message.voidupdate()Updates this file in the upload component.
-
Constructor Details
-
FileInfo
Constructs aFileInfoobject with the specified upload and file name.- Parameters:
upload- theUploadinstance representing the file upload sourcename- the name of the file being uploaded
-
FileInfo
Constructs aFileInfoobject from the specified finished upload event.- Parameters:
ev- theFinishedEventrepresenting the succeeded or failed event
-
-
Method Details
-
update
public void update()Updates this file in the upload component. -
create
public void create()Adds a new file to the upload component. -
complete
True if uploading is completed, false otherwise.- Returns:
- This instance for method chaining
-
complete
Configure the upload in complete state (i.e. uploading is completed)- Returns:
- This instance for method chaining
-
indeterminate
Configure the upload in indeterminate state (i.e. the remaining time is unknown)- Returns:
- This instance for method chaining
-
indeterminate
True if the remaining time is unknown, false otherwise.- Returns:
- This instance for method chaining
-
errorMessage
Error message returned by the server, if any.- Returns:
- This instance for method chaining
-
progress
Number representing the uploading progress.- Returns:
- This instance for method chaining
-
status
Uploading status message.- Returns:
- This instance for method chaining
-
getName
Returns the name of the uploaded file. -
getComplete
Returnstrueif uploading is completed, false otherwise. -
getIndeterminate
Returnstrueif the remaining progress is unknown, false otherwise. -
getErrorMessage
Returns the error message returned by the server. -
getProgress
Returns a number between 0 and 100, representing the uploading progress. -
getStatus
Returns the uploading status.
-