Package io.jmix.ui.component.impl
Class RelativePathResourceImpl
java.lang.Object
io.jmix.ui.component.impl.AbstractResource
io.jmix.ui.component.impl.RelativePathResourceImpl
- All Implemented Interfaces:
WebResource,RelativePathResource,Resource,ResourceView.HasMimeType
@Component("ui_RelativePathResource")
@Scope("prototype")
public class RelativePathResourceImpl
extends AbstractResource
implements WebResource, RelativePathResource
-
Field Summary
FieldsFields 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.Methods 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.impl.WebResource
getResource, hasSource
-
Field Details
-
path
-
mimeType
-
-
Constructor Details
-
RelativePathResourceImpl
public RelativePathResourceImpl()
-
-
Method Details
-
setPath
- Specified by:
setPathin interfaceRelativePathResource- Parameters:
path- relative path to the resource, e.g. "images/image.png" for a resource located atsrc/main/resources/static/images/image.png- Returns:
- this RelativePathResource instance
-
getPath
- Specified by:
getPathin interfaceRelativePathResource
-
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
-