Package net.sf.jasperreports.repo
Class FileRepositoryService
- java.lang.Object
-
- net.sf.jasperreports.repo.FileRepositoryService
-
- All Implemented Interfaces:
RepositoryService
,StreamRepositoryService
public class FileRepositoryService extends Object implements StreamRepositoryService
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description static String
EXCEPTION_MESSAGE_KEY_NOT_IMPLEMENTED
-
Constructor Summary
Constructors Constructor Description FileRepositoryService(JasperReportsContext jasperReportsContext, String root, boolean resolveAbsolutePath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
getFile(RepositoryContext context, String uri)
InputStream
getInputStream(String uri)
InputStream
getInputStream(RepositoryContext context, String uri)
OutputStream
getOutputStream(String uri)
Resource
getResource(String uri)
<K extends Resource>
KgetResource(String uri, Class<K> resourceType)
<K extends Resource>
KgetResource(RepositoryContext context, String uri, Class<K> resourceType)
ResourceInfo
getResourceInfo(RepositoryContext context, String location)
String
getRoot()
protected File
locateFile(String location)
protected Path
rootNormalizedPath()
void
saveResource(String uri, Resource resource)
void
setRoot(String root)
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_NOT_IMPLEMENTED
public static final String EXCEPTION_MESSAGE_KEY_NOT_IMPLEMENTED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FileRepositoryService
public FileRepositoryService(JasperReportsContext jasperReportsContext, String root, boolean resolveAbsolutePath)
-
-
Method Detail
-
setRoot
public void setRoot(String root)
-
getRoot
public String getRoot()
-
rootNormalizedPath
protected Path rootNormalizedPath()
-
getInputStream
public InputStream getInputStream(String uri)
- Specified by:
getInputStream
in interfaceStreamRepositoryService
-
getFile
public File getFile(RepositoryContext context, String uri)
-
getInputStream
public InputStream getInputStream(RepositoryContext context, String uri)
- Specified by:
getInputStream
in interfaceStreamRepositoryService
-
getOutputStream
public OutputStream getOutputStream(String uri)
- Specified by:
getOutputStream
in interfaceStreamRepositoryService
-
getResource
public Resource getResource(String uri)
- Specified by:
getResource
in interfaceRepositoryService
-
saveResource
public void saveResource(String uri, Resource resource)
- Specified by:
saveResource
in interfaceRepositoryService
-
getResource
public <K extends Resource> K getResource(String uri, Class<K> resourceType)
- Specified by:
getResource
in interfaceRepositoryService
-
getResource
public <K extends Resource> K getResource(RepositoryContext context, String uri, Class<K> resourceType)
- Specified by:
getResource
in interfaceRepositoryService
-
getResourceInfo
public ResourceInfo getResourceInfo(RepositoryContext context, String location)
- Specified by:
getResourceInfo
in interfaceRepositoryService
-
-