public class FileServiceResourceConverter extends PropertyEditorSupport implements org.springframework.core.convert.converter.Converter<String,org.springframework.core.io.Resource>, org.springframework.context.ResourceLoaderAware
FileService
.Constructor and Description |
---|
FileServiceResourceConverter()
Convenient constructor for declarative configuration purposes.
|
FileServiceResourceConverter(FileService fileService) |
Modifier and Type | Method and Description |
---|---|
org.springframework.core.io.Resource |
convert(String source)
Convert the source path to a Resource.
|
void |
setAsText(String text) |
void |
setFileService(FileService fileService) |
void |
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
Set the resource loader as a fallback for resources that are not managed
by the
FileService . |
addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
public FileServiceResourceConverter()
public FileServiceResourceConverter(FileService fileService)
fileService
- FileService
to be usedpublic void setFileService(FileService fileService)
fileService
- the fileService to setpublic void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
FileService
.setResourceLoader
in interface org.springframework.context.ResourceLoaderAware
ResourceLoaderAware.setResourceLoader(ResourceLoader)
public org.springframework.core.io.Resource convert(String source)
FileService
then it will be returned as a wrapper.convert
in interface org.springframework.core.convert.converter.Converter<String,org.springframework.core.io.Resource>
Converter.convert(Object)
public void setAsText(String text) throws IllegalArgumentException
setAsText
in interface PropertyEditor
setAsText
in class PropertyEditorSupport
IllegalArgumentException
Copyright © 2015. All rights reserved.