Package io.jmix.ui.component.impl
Class FileStorageResourceImpl
java.lang.Object
io.jmix.ui.component.impl.AbstractResource
io.jmix.ui.component.impl.AbstractStreamSettingsResource
io.jmix.ui.component.impl.FileStorageResourceImpl
- All Implemented Interfaces:
FileStorageResource,WebResource,Resource,ResourceView.HasMimeType,ResourceView.HasStreamSettings
@Component("ui_FileStorageResource")
@Scope("prototype")
public class FileStorageResourceImpl
extends AbstractStreamSettingsResource
implements WebResource, FileStorageResource
-
Field Summary
FieldsFields inherited from class io.jmix.ui.component.impl.AbstractStreamSettingsResource
bufferSize, cacheTime, fileNameFields inherited from class io.jmix.ui.component.impl.AbstractResource
hasSource, resource, resourceUpdateHandler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected StringsetFileReference(FileRef fileReference) voidsetFileStorageLocator(FileStorageLocator fileStorageLocator) voidsetMimeType(String mimeType) Sets the mime type of the resource.Methods inherited from class io.jmix.ui.component.impl.AbstractStreamSettingsResource
getBufferSize, getCacheTime, getFileName, setBufferSize, setCacheTime, setFileNameMethods inherited from class io.jmix.ui.component.impl.AbstractResource
fireResourceUpdateEvent, getResource, hasSource, setResourceUpdatedHandlerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.ui.component.ResourceView.HasStreamSettings
getBufferSize, getCacheTime, getFileName, setBufferSize, setCacheTime, setFileNameMethods inherited from interface io.jmix.ui.component.impl.WebResource
getResource, hasSource
-
Field Details
-
fileStorageLocator
-
fileReference
-
mimeType
-
-
Constructor Details
-
FileStorageResourceImpl
public FileStorageResourceImpl()
-
-
Method Details
-
setFileStorageLocator
-
setFileReference
- Specified by:
setFileReferencein interfaceFileStorageResource- Parameters:
fileReference- reference to the file in file storage- Returns:
- this FileStorageResource instance
-
getFileReference
- Specified by:
getFileReferencein interfaceFileStorageResource
-
createResource
protected void createResource()- Specified by:
createResourcein classAbstractResource
-
getResourceName
-
setMimeType
Description copied from interface:ResourceView.HasMimeTypeSets the mime type of the resource.- Specified by:
setMimeTypein interfaceResourceView.HasMimeType- Parameters:
mimeType- the MIME type to be set
-
getMimeType
- Specified by:
getMimeTypein interfaceResourceView.HasMimeType- Returns:
- resource MIME type
-