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
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 voidgetPath()voidsetMimeType(String mimeType) Sets the mime type of the resource.voidsetResources(Resources resources) 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
-
resources
-
path
-
mimeType
-
-
Constructor Details
-
ClasspathResourceImpl
public ClasspathResourceImpl()
-
-
Method Details
-
setResources
-
setPath
- Specified by:
setPathin 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:
getPathin interfaceClasspathResource
-
createResource
protected void createResource()- Specified by:
createResourcein classAbstractResource
-
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
-