Package io.jmix.webdavui.component.impl
Class WebdavDocumentUploadFieldImpl
java.lang.Object
io.jmix.ui.component.impl.AbstractComponent<T>
io.jmix.ui.component.impl.AbstractValueComponent<T,P,V>
io.jmix.ui.component.impl.AbstractField<JmixFileUploadField,String,R>
io.jmix.ui.component.impl.AbstractSingleFileUploadField<T>
io.jmix.ui.component.impl.AbstractFileStorageUploadField<WebdavDocument>
io.jmix.webdavui.component.impl.WebdavDocumentUploadFieldImpl
- All Implemented Interfaces:
AttachNotifier
,Buffered
,Component
,Component.BelongToFrame
,Component.Editable
,Component.Focusable
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,Component.HasXmlDescriptor
,Component.Wrapper
,HasValueSource<WebdavDocument>
,Field<WebdavDocument>
,HasContextHelp
,HasDebugId
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,HasValidator<WebdavDocument>
,HasValue<WebdavDocument>
,Requirable
,SingleFileUploadField
,UploadField
,Validatable
,WebdavDocumentUploadField
,org.springframework.beans.factory.InitializingBean
public class WebdavDocumentUploadFieldImpl
extends AbstractFileStorageUploadField<WebdavDocument>
implements WebdavDocumentUploadField, org.springframework.beans.factory.InitializingBean
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.ui.component.impl.AbstractSingleFileUploadField
AbstractSingleFileUploadField.JmixSingleFileUploadField
Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasValue
HasValue.ValueChangeEvent<V>
Nested classes/interfaces inherited from interface io.jmix.ui.component.SingleFileUploadField
SingleFileUploadField.AfterValueClearEvent, SingleFileUploadField.BeforeValueClearEvent, SingleFileUploadField.FileUploadSucceedEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.UploadField
UploadField.DropZone, UploadField.FileUploadErrorEvent, UploadField.FileUploadEvent, UploadField.FileUploadFinishEvent, UploadField.FileUploadStartEvent
-
Field Summary
Modifier and TypeFieldDescriptionprotected WebdavDocumentsManagementService
protected WebdavProperties
Fields inherited from class io.jmix.ui.component.impl.AbstractFileStorageUploadField
fileId, fileStorage, fileStorageLocator, fileStorageName, internalValueChangedOnUpload, mode, tempFileId, temporaryStorage
Fields inherited from class io.jmix.ui.component.impl.AbstractSingleFileUploadField
accept, BYTES_IN_MEGABYTE, componentProperties, contentProvider, downloader, dropZone, dropZonePrompt, fileName, fileSizeLimit, messages, notifications, pasteZone, permittedExtensions
Fields inherited from class io.jmix.ui.component.impl.AbstractField
editable, parentEditableChangeListener, validators, VALIDATORS_LIST_INITIAL_CAPACITY
Fields inherited from class io.jmix.ui.component.impl.AbstractValueComponent
internalValue, uiTestIdsSupport, valueBinding
Fields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Fields inherited from interface io.jmix.webdavui.component.WebdavDocumentUploadField
NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Consumer<Action.ActionPerformedEvent>
void
protected String
convertToPresentation
(WebdavDocument modelValue) protected boolean
protected void
onFileNameClick
(com.vaadin.ui.Button.ClickEvent e) protected void
protected void
void
setDocumentsManagementService
(WebdavDocumentsManagementService documentsManagementService) void
setFileStorageName
(String fileStorageName) Sets the name of FileStorage where the upload file will be placed.void
setValue
(WebdavDocument value) void
setWebdavProperties
(WebdavProperties webdavProperties) Methods inherited from class io.jmix.ui.component.impl.AbstractFileStorageUploadField
checkFileStorageInitialized, getFileContent, getFileId, getFileName, internalValueChanged, onUploadFailed, receiveUpload, setFileStorageLocator, setTemporaryStorage, valueBindingConnected
Methods inherited from class io.jmix.ui.component.impl.AbstractSingleFileUploadField
addAfterValueClearListener, addBeforeValueClearListener, addFileUploadErrorListener, addFileUploadFinishListener, addFileUploadStartListener, addFileUploadSucceedListener, clearButtonClicked, commit, createComponent, discard, fireFileUploadError, fireFileUploadFinish, fireFileUploadStart, fireFileUploadSucceed, focus, getAccept, getActualFileSizeLimit, getClearButtonCaption, getClearButtonDescription, getClearButtonIcon, getContentProvider, getDropZone, getDropZonePrompt, getFileSizeLimit, getFileSizeLimitString, getPasteZone, getPermittedExtensions, getTabIndex, getUploadButtonCaption, getUploadButtonDescription, getUploadButtonIcon, initComponent, isBuffered, isModified, isShowClearButton, isShowFileName, onFileExtensionNotAllowed, onFileSizeLimitExceeded, onUploadFinished, onUploadStarted, setAccept, setBuffered, setClearButtonCaption, setClearButtonDescription, setClearButtonIcon, setComponentProperties, setContentProvider, setDownloader, setDropZone, setDropZonePrompt, setFileSizeLimit, setMessages, setNotifications, setPasteZone, setPermittedExtensions, setShowClearButton, setShowFileName, setTabIndex, setUploadButtonCaption, setUploadButtonDescription, setUploadButtonIcon
Methods inherited from class io.jmix.ui.component.impl.AbstractField
addValidator, attachValueChangeListener, getDatatypeConversionErrorMsg, getDefaultRequiredMessage, getErrorMessage, getRequiredMessage, getValidators, isEditable, isRequired, isValid, removeValidator, setEditable, setEditableToComponent, setParent, setRequired, setRequiredMessage, setupComponentErrorProvider, triggerValidators, validate
Methods inherited from class io.jmix.ui.component.impl.AbstractValueComponent
addValueChangeListener, componentValueChanged, convertToModel, fieldValueEquals, getValue, getValueSource, setUiTestId, setUiTestIdsSupport, setValueSource, setValueToPresentation, valueBindingActivated
Methods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, attached, detached, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getStyleName, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDebugId, setDescription, setDescriptionAsHtml, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setResponsive, setStyleName, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.ui.component.Buffered
commit, discard, isBuffered, isModified, setBuffered
Methods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.Editable
isEditable, isEditableWithParent, setEditable
Methods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable, setTabIndex
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
Methods inherited from interface io.jmix.ui.component.HasValidator
addValidator, addValidators, getValidators, removeValidator
Methods inherited from interface io.jmix.ui.component.HasValue
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty
Methods inherited from interface io.jmix.ui.component.data.HasValueSource
getValueSource, setValueSource
Methods inherited from interface io.jmix.ui.component.Requirable
getRequiredMessage, isRequired, setRequired, setRequiredMessage
Methods inherited from interface io.jmix.ui.component.SingleFileUploadField
addAfterValueClearListener, addBeforeValueClearListener, addFileUploadSucceedListener, getClearButtonCaption, getClearButtonDescription, getClearButtonIcon, getContentProvider, getUploadButtonCaption, getUploadButtonDescription, getUploadButtonIcon, isShowClearButton, isShowFileName, setClearButtonCaption, setClearButtonDescription, setClearButtonIcon, setContentProvider, setShowClearButton, setShowFileName, setUploadButtonCaption, setUploadButtonDescription, setUploadButtonIcon
Methods inherited from interface io.jmix.ui.component.UploadField
addFileUploadErrorListener, addFileUploadFinishListener, addFileUploadStartListener, getAccept, getDropZone, getDropZonePrompt, getFileSizeLimit, getPasteZone, getPermittedExtensions, setAccept, setDropZone, setDropZonePrompt, setFileSizeLimit, setPasteZone, setPermittedExtensions
Methods inherited from interface io.jmix.ui.component.Validatable
isValid, isValidateOnCommit, validate
-
Field Details
-
documentsManagementService
-
webdavProperties
-
-
Constructor Details
-
WebdavDocumentUploadFieldImpl
public WebdavDocumentUploadFieldImpl()
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in classAbstractSingleFileUploadField<WebdavDocument>
-
setValue
- Specified by:
setValue
in interfaceHasValue<WebdavDocument>
- Overrides:
setValue
in classAbstractValueComponent<JmixFileUploadField,
String, WebdavDocument>
-
setDocumentsManagementService
@Autowired public void setDocumentsManagementService(WebdavDocumentsManagementService documentsManagementService) -
setWebdavProperties
-
onUploadSucceeded
- Overrides:
onUploadSucceeded
in classAbstractSingleFileUploadField<WebdavDocument>
-
saveFile
-
isVersioningEnabled
protected boolean isVersioningEnabled() -
actionUnderDocumentLock
protected Consumer<Action.ActionPerformedEvent> actionUnderDocumentLock(Consumer<Action.ActionPerformedEvent> handler) -
onFileNameClick
protected void onFileNameClick(com.vaadin.ui.Button.ClickEvent e) - Specified by:
onFileNameClick
in classAbstractSingleFileUploadField<WebdavDocument>
-
getFileContent
- Specified by:
getFileContent
in interfaceSingleFileUploadField
- Returns:
- content of uploaded file.
-
convertToPresentation
@Nullable protected String convertToPresentation(@Nullable WebdavDocument modelValue) throws ConversionException - Overrides:
convertToPresentation
in classAbstractValueComponent<JmixFileUploadField,
String, WebdavDocument> - Throws:
ConversionException
-
setFileStorageName
Description copied from interface:WebdavDocumentUploadField
Sets the name of FileStorage where the upload file will be placed.- Specified by:
setFileStorageName
in interfaceWebdavDocumentUploadField
- Parameters:
fileStorageName
- the name of file storage
-
getFileStorageName
- Specified by:
getFileStorageName
in interfaceWebdavDocumentUploadField
- Returns:
- the name of FileStorage where the upload file will be placed
-