Class JmixFileDownloader
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.html.Anchor>
io.jmix.flowui.component.filedownloader.JmixFileDownloader
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasStyle,Serializable
@Deprecated(since="2.8",
forRemoval=true)
public class JmixFileDownloader
extends com.vaadin.flow.component.Composite<com.vaadin.flow.component.html.Anchor>
Deprecated, for removal: This API element is subject to removal in a future version.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated, for removal: This API element is subject to removal in a future version.static classDeprecated, for removal: This API element is subject to removal in a future version. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intDeprecated, for removal: This API element is subject to removal in a future version.protected static final StringDeprecated, for removal: This API element is subject to removal in a future version.protected StringDeprecated, for removal: This API element is subject to removal in a future version.protected com.vaadin.flow.function.SerializableConsumer<OutputStream>Deprecated, for removal: This API element is subject to removal in a future version.protected static final StringDeprecated, for removal: This API element is subject to removal in a future version.protected StringDeprecated, for removal: This API element is subject to removal in a future version.protected Predicate<JmixFileDownloader.FileNotFoundContext>Deprecated, for removal: This API element is subject to removal in a future version.protected booleanDeprecated, for removal: This API element is subject to removal in a future version.protected com.vaadin.flow.server.RequestHandlerDeprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidDeprecated, for removal: This API element is subject to removal in a future version.com.vaadin.flow.shared.RegistrationaddDownloadFinishedListener(com.vaadin.flow.component.ComponentEventListener<JmixFileDownloader.DownloadFinishedEvent> listener) Deprecated, for removal: This API element is subject to removal in a future version.Adds a listener that is executed when the file content has been streamed.protected voidafterWriteHandler(OutputStream outputStream) Deprecated, for removal: This API element is subject to removal in a future version.protected voidbeforeClientResponseDownloadHandler(com.vaadin.flow.component.UI ui) Deprecated, for removal: This API element is subject to removal in a future version.voiddownloadFile(com.vaadin.flow.server.StreamResource resource) Deprecated, for removal: This API element is subject to removal in a future version.protected voidexecute()Deprecated, for removal: This API element is subject to removal in a future version.getFileName(com.vaadin.flow.server.VaadinSession session, com.vaadin.flow.server.VaadinRequest request) Deprecated, for removal: This API element is subject to removal in a future version.Gets the filename of downloaded file.Deprecated, for removal: This API element is subject to removal in a future version.protected voidonDetach(com.vaadin.flow.component.DetachEvent detachEvent) Deprecated, for removal: This API element is subject to removal in a future version.protected voidrunBeforeClientResponse(com.vaadin.flow.function.SerializableConsumer<com.vaadin.flow.component.UI> command) Deprecated, for removal: This API element is subject to removal in a future version.protected voidrunCommand(com.vaadin.flow.server.StreamResource resource) Deprecated, for removal: This API element is subject to removal in a future version.voidsetCacheMaxAgeSec(int cacheMaxAgeSec) Deprecated, for removal: This API element is subject to removal in a future version.Sets the maximum time in seconds during which the file will be considered relevant.voidsetFileName(String fileName) Deprecated, for removal: This API element is subject to removal in a future version.voidsetFileNotFoundExceptionHandler(Predicate<JmixFileDownloader.FileNotFoundContext> fileNotFoundExceptionHandler) Deprecated, for removal: This API element is subject to removal in a future version.voidviewDocument(com.vaadin.flow.server.StreamResource resource) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElement, initContentMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Field Details
-
DOWNLOAD_RESOURCE_PREFIX
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
CLICK_EXPRESSION
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
fileName
Deprecated, for removal: This API element is subject to removal in a future version. -
cacheMaxAgeSec
protected int cacheMaxAgeSecDeprecated, for removal: This API element is subject to removal in a future version. -
requestHandler
protected com.vaadin.flow.server.RequestHandler requestHandlerDeprecated, for removal: This API element is subject to removal in a future version. -
contentWriter
Deprecated, for removal: This API element is subject to removal in a future version. -
isViewDocumentRequest
protected boolean isViewDocumentRequestDeprecated, for removal: This API element is subject to removal in a future version. -
contentType
Deprecated, for removal: This API element is subject to removal in a future version. -
fileNotFoundExceptionHandler
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
JmixFileDownloader
public JmixFileDownloader()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
setCacheMaxAgeSec
public void setCacheMaxAgeSec(int cacheMaxAgeSec) Deprecated, for removal: This API element is subject to removal in a future version.Sets the maximum time in seconds during which the file will be considered relevant. Makes sense for using the built-in PDF viewer in the Chrome browser.- Parameters:
cacheMaxAgeSec- the maximum time in seconds during which the file will be considered relevant- See Also:
-
setFileName
Deprecated, for removal: This API element is subject to removal in a future version. -
getFileName
public String getFileName(com.vaadin.flow.server.VaadinSession session, com.vaadin.flow.server.VaadinRequest request) Deprecated, for removal: This API element is subject to removal in a future version.Gets the filename of downloaded file. Override if you want to generate the name dynamically.- Parameters:
session- the vaadin sessionrequest- the vaadin request- Returns:
- the file name
-
setFileNotFoundExceptionHandler
public void setFileNotFoundExceptionHandler(Predicate<JmixFileDownloader.FileNotFoundContext> fileNotFoundExceptionHandler) Deprecated, for removal: This API element is subject to removal in a future version. -
getFileNotFoundExceptionHandler
Deprecated, for removal: This API element is subject to removal in a future version. -
addDownloadFinishedListener
public com.vaadin.flow.shared.Registration addDownloadFinishedListener(com.vaadin.flow.component.ComponentEventListener<JmixFileDownloader.DownloadFinishedEvent> listener) Deprecated, for removal: This API element is subject to removal in a future version.Adds a listener that is executed when the file content has been streamed. Note that the UI changes done in the listener don't necessarily happen live if you don't have @Pushin use or useUI.setPollInterval(int)method.- Parameters:
listener- the listener- Returns:
- the
Registrationyou can use to remove this listener.
-
downloadFile
public void downloadFile(com.vaadin.flow.server.StreamResource resource) Deprecated, for removal: This API element is subject to removal in a future version. -
viewDocument
public void viewDocument(com.vaadin.flow.server.StreamResource resource) Deprecated, for removal: This API element is subject to removal in a future version. -
runCommand
protected void runCommand(com.vaadin.flow.server.StreamResource resource) Deprecated, for removal: This API element is subject to removal in a future version. -
execute
protected void execute()Deprecated, for removal: This API element is subject to removal in a future version. -
beforeClientResponseDownloadHandler
protected void beforeClientResponseDownloadHandler(com.vaadin.flow.component.UI ui) Deprecated, for removal: This API element is subject to removal in a future version. -
onDetach
protected void onDetach(com.vaadin.flow.component.DetachEvent detachEvent) Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
onDetachin classcom.vaadin.flow.component.Component
-
afterWriteHandler
Deprecated, for removal: This API element is subject to removal in a future version. -
runBeforeClientResponse
protected void runBeforeClientResponse(com.vaadin.flow.function.SerializableConsumer<com.vaadin.flow.component.UI> command) Deprecated, for removal: This API element is subject to removal in a future version. -
accessCommand
protected void accessCommand()Deprecated, for removal: This API element is subject to removal in a future version.
-
DownloaderExportHandlerwith a regularAnchorinstead. Will be removed either in the next major release or when Vaadin removeStreamResource.