Package io.jmix.ui.component.impl
Class ClasspathResourceImpl
java.lang.Object
io.jmix.ui.component.impl.AbstractResource
io.jmix.ui.component.impl.AbstractStreamSettingsResource
io.jmix.ui.component.impl.ClasspathResourceImpl
- All Implemented Interfaces:
ClasspathResource
,WebResource
,Resource
,ResourceView.HasMimeType
,ResourceView.HasStreamSettings
@Component("ui_ClasspathResource")
@Scope("prototype")
public class ClasspathResourceImpl
extends AbstractStreamSettingsResource
implements WebResource, ClasspathResource
-
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
getPath()
void
setMimeType
(String mimeType) Sets the mime type of the resource.void
setResources
(Resources resources) 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
-
resources
-
path
-
mimeType
-
-
Constructor Details
-
ClasspathResourceImpl
public ClasspathResourceImpl()
-
-
Method Details
-
setResources
-
setPath
- Specified by:
setPath
in interfaceClasspathResource
- Parameters:
path
- relative path to the resource, e.g. "/com/company/app/images/image.png" for a resource located atsrc/main/resources/com/company/app/images/image.png
- Returns:
- this ClasspathResource instance
-
getPath
- Specified by:
getPath
in interfaceClasspathResource
-
createResource
protected void createResource()- Specified by:
createResource
in classAbstractResource
-
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
-