com.atlassian.confluence.importexport.resolvers
Class ServletContextURIResolver
java.lang.Object
com.atlassian.confluence.importexport.resolvers.ServletContextURIResolver
- All Implemented Interfaces:
- URIResolver, org.springframework.web.context.ServletContextAware
public class ServletContextURIResolver
- extends Object
- implements URIResolver, org.springframework.web.context.ServletContextAware
Resolves URI's against the ServletContext (which has access to resources starting from the web app root such as /images).
We've decided to roll our own instead of using org.apache.fop.servlet.ServletContextURIResolver
because this
implementation does not require a servletcontext: prefix on all URI's.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServletContextURIResolver
public ServletContextURIResolver()
resolve
public Source resolve(String href,
String base)
throws TransformerException
- Specified by:
resolve
in interface URIResolver
- Returns:
- the source for this href if it can be found in the servlet context, else return null
- Throws:
TransformerException
setServletContext
public void setServletContext(ServletContext servletContext)
- Specified by:
setServletContext
in interface org.springframework.web.context.ServletContextAware