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 InputSource
getExternalSubset(String name, String baseURI)
protected ClassLoader
getSearchClassloader()
Return the classloader used to look for XSD files in the classpath.InputSource
resolveEntity(String publicId, String systemId)
InputSource
resolveEntity(String name, String publicId, String baseURI, String systemId)
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.
-
-
-
Method Detail
-
resolveEntity
public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) throws SAXException, IOException
- Specified by:
resolveEntity
in interfaceEntityResolver2
- Throws:
SAXException
IOException
-
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:
getExternalSubset
in interfaceEntityResolver2
- Throws:
SAXException
IOException
-
resolveEntity
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
- Specified by:
resolveEntity
in interfaceEntityResolver
- Throws:
SAXException
IOException
-
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.
-
-