public class FileServiceResourceConverter
extends java.beans.PropertyEditorSupport
implements org.springframework.core.convert.converter.Converter<java.lang.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(java.lang.String source)
Convert the source path to a Resource.
|
void |
setAsText(java.lang.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. |
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.ResourceLoaderAwareResourceLoaderAware.setResourceLoader(ResourceLoader)public org.springframework.core.io.Resource convert(java.lang.String source)
FileService then it will be returned as a wrapper.convert in interface org.springframework.core.convert.converter.Converter<java.lang.String,org.springframework.core.io.Resource>Converter.convert(Object)public void setAsText(java.lang.String text)
throws java.lang.IllegalArgumentException
setAsText in interface java.beans.PropertyEditorsetAsText in class java.beans.PropertyEditorSupportjava.lang.IllegalArgumentExceptionCopyright © 2015. All Rights Reserved.