com.atlassian.confluence.importexport.resolvers
Class ServletContextURIResolver

java.lang.Object
  extended by com.atlassian.confluence.importexport.resolvers.ServletContextURIResolver
All Implemented Interfaces:
javax.xml.transform.URIResolver, org.springframework.web.context.ServletContextAware

public class ServletContextURIResolver
extends java.lang.Object
implements javax.xml.transform.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.


Constructor Summary
ServletContextURIResolver()
           
 
Method Summary
 javax.xml.transform.Source resolve(java.lang.String href, java.lang.String base)
           
 void setServletContext(javax.servlet.ServletContext servletContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletContextURIResolver

public ServletContextURIResolver()
Method Detail

resolve

public javax.xml.transform.Source resolve(java.lang.String href,
                                          java.lang.String base)
                                   throws javax.xml.transform.TransformerException
Specified by:
resolve in interface javax.xml.transform.URIResolver
Returns:
the source for this href if it can be found in the servlet context, else return null
Throws:
javax.xml.transform.TransformerException

setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)
Specified by:
setServletContext in interface org.springframework.web.context.ServletContextAware


Copyright © 2003-2013 Atlassian. All Rights Reserved.