Package com.storedobject.ui
Class ZipUploadProcessorView
java.lang.Object
com.storedobject.vaadin.View
com.storedobject.ui.TextView
com.storedobject.ui.UploadProcessorView
com.storedobject.ui.ZipUploadProcessorView
- All Implemented Interfaces:
Executable,Reentrant,StyledBuilder,HasLogic,StyledBuilder,Transactional,ClickHandler,CloseableView,ExecutableView,HTMLGenerator,ValueChangeHandler,com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<? extends com.vaadin.flow.component.Component>>,com.vaadin.flow.component.HasValue.ValueChangeListener,Serializable,Runnable,EventListener
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.storedobject.vaadin.ClickHandler
ClickHandler.ModifiedClickEvent<C extends com.vaadin.flow.component.Component>Nested classes/interfaces inherited from interface com.storedobject.common.StyledBuilder
StyledBuilder.Style -
Field Summary
Fields inherited from interface com.storedobject.vaadin.HTMLGenerator
CHAR_ENTITIESFields inherited from interface com.storedobject.common.StyledBuilder
EMPTY_STRINGS -
Constructor Summary
ConstructorsConstructorDescriptionZipUploadProcessorView(String caption) ZipUploadProcessorView(String caption, String message) ZipUploadProcessorView(String caption, String message, BiConsumer<ZipEntry, InputStream> processor) ZipUploadProcessorView(String caption, BiConsumer<ZipEntry, InputStream> processor) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprocess(InputStream content, String mimeType) Do not override this method unless you want to process the file yourself without unzipping.protected voidprocess(ZipEntry zipEntry, InputStream content) Override this method for processing the "Zip Entries".protected voidThis will be invoked when the processing is completed.voidsetMaxFiles(int fileCount) voidsetProcessor(BiConsumer<InputStream, String> processor) voidsetZipEntryConsumer(BiConsumer<ZipEntry, InputStream> zipEntryConsumer) Methods inherited from class com.storedobject.ui.UploadProcessorView
getFileCount, getFileName, getProgressCaption, getTopComponent, getUploadComponent, setProcessor, uploadAbortedMethods inherited from class com.storedobject.ui.TextView
abort, add, clean, clearContent, close, decorateComponent, error, error, execute, getApplication, getBottomComponent, getInternalStyledBuilder, initUI, isNewLine, message, message, newLine, popup, process, readyForProcessing, remove, setApplication, setCaption, setIndeterminate, setProgress, setProgressCaption, setText, setValue, startProcess, warning, warningMethods inherited from class com.storedobject.vaadin.View
aborted, addClosedListener, addOpenedListener, createCloseableView, createWindow, execute, execute, executing, focus, focus, focusAny, getCaption, getComponent, getContent, getCreatedBy, getEmbeddedView, getMenuItem, getMenuItem, getView, invoke, isFullScreen, isScrollable, isWindowMode, select, setComponent, setCreatedBy, setDefaultPadding, setEmbeddedView, setFirstFocus, setFullScreen, setScrollable, setWindowMode, skipFirstFocusMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.vaadin.ClickHandler
clicked, doubleClicked, onComponentEvent, rightClickedMethods inherited from interface com.storedobject.common.Executable
actMethods inherited from interface com.storedobject.vaadin.ExecutableView
clearAlerts, clicked, createMenuItem, execute, getCaption, getMenuIconName, getMenuItem, getView, getView, invoke, isCloseable, isFullScreen, isHomeView, log, log, returnedFrom, run, setClickable, speak, trackValueChange, tray, valueChangedMethods inherited from interface com.storedobject.vaadin.HTMLGenerator
getPrintTextMethods inherited from interface com.storedobject.common.Reentrant
isReentrantMethods inherited from interface com.storedobject.common.StyledBuilder
append, newLine, setValueMethods inherited from interface com.storedobject.ui.StyledBuilder
append, append, append, appendHTML, appendIcon, appendWithTag, appendWithTag, blackMessage, blueMessage, clear, drawLine, getHTML, getValue, isEmpty, redMessage, setValue, space, updateMethods inherited from interface com.storedobject.ui.Transactional
commit, execute, getLogic, getTransactionManager, run, setLogic, transact, transact, transactControl, transactControl, transactControl, transactControlMethods inherited from interface com.storedobject.vaadin.ValueChangeHandler
valueChanged
-
Constructor Details
-
ZipUploadProcessorView
-
ZipUploadProcessorView
-
ZipUploadProcessorView
-
ZipUploadProcessorView
public ZipUploadProcessorView(String caption, String message, BiConsumer<ZipEntry, InputStream> processor)
-
-
Method Details
-
process
Do not override this method unless you want to process the file yourself without unzipping.- Overrides:
processin classUploadProcessorView- Parameters:
content- File stream.mimeType- Mime type.
-
setProcessor
- Overrides:
setProcessorin classUploadProcessorView
-
setMaxFiles
public void setMaxFiles(int fileCount) - Overrides:
setMaxFilesin classUploadProcessorView
-
setZipEntryConsumer
-
process
Override this method for processing the "Zip Entries". Each "Zip Entry" will be passed here unless a "Processor" (BiConsumer) is set and in that case, Processor's accept() method (BiConsumer.accept(Object, Object)) will be called with each zip entry.- Parameters:
zipEntry- Zip entry to consume.content- Input stream of the content.- Throws:
IOException- Exception for I/O error.
-
processCompleted
protected void processCompleted()This will be invoked when the processing is completed.
-