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
Fields inherited from class io.jmix.ui.component.impl.AbstractStreamSettingsResource
bufferSize, cacheTime, fileName
Fields inherited from class io.jmix.ui.component.impl.AbstractResource
hasSource, resource, resourceUpdateHandler
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected String
setFileReference
(FileRef fileReference) void
setFileStorageLocator
(FileStorageLocator fileStorageLocator) void
setMimeType
(String mimeType) Sets the mime type of the resource.Methods inherited from class io.jmix.ui.component.impl.AbstractStreamSettingsResource
getBufferSize, getCacheTime, getFileName, setBufferSize, setCacheTime, setFileName
Methods inherited from class io.jmix.ui.component.impl.AbstractResource
fireResourceUpdateEvent, getResource, hasSource, setResourceUpdatedHandler
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.ResourceView.HasStreamSettings
getBufferSize, getCacheTime, getFileName, setBufferSize, setCacheTime, setFileName
Methods 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:
setFileReference
in interfaceFileStorageResource
- Parameters:
fileReference
- reference to the file in file storage- Returns:
- this FileStorageResource instance
-
getFileReference
- Specified by:
getFileReference
in interfaceFileStorageResource
-
createResource
protected void createResource()- Specified by:
createResource
in classAbstractResource
-
getResourceName
-
setMimeType
Description copied from interface:ResourceView.HasMimeType
Sets the mime type of the resource.- Specified by:
setMimeType
in interfaceResourceView.HasMimeType
- Parameters:
mimeType
- the MIME type to be set
-
getMimeType
- Specified by:
getMimeType
in interfaceResourceView.HasMimeType
- Returns:
- resource MIME type
-