Package net.sf.jasperreports.repo
Class DefaultRepositoryService
java.lang.Object
net.sf.jasperreports.repo.DefaultRepositoryService
- All Implemented Interfaces:
RepositoryService,StreamRepositoryService
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ClassLoaderstatic final Stringprotected JasperReportsContextstatic final Stringstatic final StringFlag property that enables URL filtering for the default repository service.static final StringPrefix for properties that define allowed URL patterns as regular expressions.protected URLStreamHandlerFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInputStream(String uri) getInputStream(RepositoryContext context, String uri) getOutputStream(String uri) getResource(String uri) <K extends Resource>
KgetResource(String uri, Class<K> resourceType) <K extends Resource>
KgetResource(RepositoryContext context, String uri, Class<K> resourceType) getResourceInfo(RepositoryContext context, String location) protected booleanisURLAllowed(URL url) protected FileresolveFile(RepositoryContext context, String uri) voidsaveResource(String uri, Resource resource) voidsetClassLoader(ClassLoader classLoader) voidsetURLStreamHandlerFactory(URLStreamHandlerFactory urlHandlerFactory)
-
Field Details
-
PROPERTY_FILES_ENABLED
- See Also:
-
PROPERTY_URL_FILTER_ENABLED
Flag property that enables URL filtering for the default repository service. When enabled, only URLs matching patterns defined byPROPERTY_URL_WHITELIST_PREFIXproperties are allowed.- See Also:
-
PROPERTY_URL_WHITELIST_PREFIX
Prefix for properties that define allowed URL patterns as regular expressions. Each property value is a regexp matched against the full URL string. URLs that do not match any pattern are rejected when URL filtering is enabled viaPROPERTY_URL_FILTER_ENABLED.- See Also:
-
EXCEPTION_MESSAGE_KEY_NOT_IMPLEMENTED
- See Also:
-
jasperReportsContext
-
classLoader
-
urlHandlerFactory
-
-
Constructor Details
-
DefaultRepositoryService
-
-
Method Details
-
setClassLoader
-
setURLStreamHandlerFactory
-
getInputStream
- Specified by:
getInputStreamin interfaceStreamRepositoryService
-
getInputStream
- Specified by:
getInputStreamin interfaceStreamRepositoryService
-
isURLAllowed
-
resolveFile
-
getOutputStream
- Specified by:
getOutputStreamin interfaceStreamRepositoryService
-
getResource
- Specified by:
getResourcein interfaceRepositoryService
-
saveResource
- Specified by:
saveResourcein interfaceRepositoryService
-
getResource
- Specified by:
getResourcein interfaceRepositoryService
-
getResource
public <K extends Resource> K getResource(RepositoryContext context, String uri, Class<K> resourceType) - Specified by:
getResourcein interfaceRepositoryService
-
getResourceInfo
- Specified by:
getResourceInfoin interfaceRepositoryService
-