hudson.tasks.junit
Class XMLEntityResolver

java.lang.Object
  extended by hudson.util.io.ParserConfigurator
      extended by hudson.tasks.junit.XMLEntityResolver
All Implemented Interfaces:
ExtensionPoint, Serializable, EntityResolver

@Extension
public class XMLEntityResolver
extends ParserConfigurator
implements EntityResolver

As the name suggest: a resolver for XML entities.

Basically, it provides the possibility to intercept online DTD lookups and instead do offline lookup by redirecting to a local directory where .dtd's are stored (useful when parsing testng-results.xml - which points to testng.org)

Author:
Mikael Carneholm
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
XMLEntityResolver()
           
 
Method Summary
 void configure(org.dom4j.io.SAXReader reader, Object context)
          Install EntityResolver for resolving DTDs, which are in files created by TestNG.
 InputSource resolveEntity(String publicId, String systemId)
          Intercepts the lookup of publicId, systemId
 
Methods inherited from class hudson.util.io.ParserConfigurator
all, applyConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLEntityResolver

public XMLEntityResolver()
Method Detail

resolveEntity

public InputSource resolveEntity(String publicId,
                                 String systemId)
                          throws SAXException,
                                 IOException
Intercepts the lookup of publicId, systemId

Specified by:
resolveEntity in interface EntityResolver
Throws:
SAXException
IOException

configure

public void configure(org.dom4j.io.SAXReader reader,
                      Object context)
Install EntityResolver for resolving DTDs, which are in files created by TestNG.

Overrides:
configure in class ParserConfigurator
context - Object that represents the context in which the parser is used. It is up to the caller to decide what to pass in here.


Copyright © 2004-2013. All Rights Reserved.