Package liquibase.parser.core.xml
Class LiquibaseEntityResolver
- java.lang.Object
-
- liquibase.parser.core.xml.LiquibaseEntityResolver
-
- All Implemented Interfaces:
EntityResolver,EntityResolver2
public class LiquibaseEntityResolver extends Object implements EntityResolver2
Finds the Liquibase schema from the classpath rather than fetching it over the Internet. Also resolve external entities using a resourceAccessor if it's provided
-
-
Constructor Summary
Constructors Constructor Description LiquibaseEntityResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputSourcegetExternalSubset(String name, String baseURI)protected ClassLoadergetSearchClassloader()Return the classloader used to look for XSD files in the classpath.InputSourceresolveEntity(String publicId, String systemId)InputSourceresolveEntity(String name, String publicId, String baseURI, String systemId)voidsetShouldWarnOnMismatchedXsdVersion(boolean shouldWarnOnMismatchedXsdVersion)When set to true, a warning will be printed to the console if the XSD version used does not match the version of Liquibase.
-
-
-
Method Detail
-
resolveEntity
public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) throws SAXException, IOException
- Specified by:
resolveEntityin interfaceEntityResolver2- Throws:
SAXExceptionIOException
-
getSearchClassloader
protected ClassLoader getSearchClassloader()
Return the classloader used to look for XSD files in the classpath.
-
getExternalSubset
public InputSource getExternalSubset(String name, String baseURI) throws SAXException, IOException
- Specified by:
getExternalSubsetin interfaceEntityResolver2- Throws:
SAXExceptionIOException
-
resolveEntity
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
- Specified by:
resolveEntityin interfaceEntityResolver- Throws:
SAXExceptionIOException
-
setShouldWarnOnMismatchedXsdVersion
public void setShouldWarnOnMismatchedXsdVersion(boolean shouldWarnOnMismatchedXsdVersion)
When set to true, a warning will be printed to the console if the XSD version used does not match the version of Liquibase. If "latest" is used as the XSD version, no warning is printed.
-
-