
public class AggregateChangeLogGenerator extends Object
<include> elements inside it referencing other Liquibase
 changelog fragments.
 This class is chiefly for use by a LiquibaseChangeLogArtifactsProcessor.
| Constructor and Description | 
|---|
| AggregateChangeLogGenerator()Creates a new  AggregateChangeLogGenerator. | 
| Modifier and Type | Method and Description | 
|---|---|
| File | generate(Collection<? extends URL> resources)Generates a Liquibase changelog file that, from a high level,
 logically contains the Liquibase changelog fragments reachable
 from the supplied  URLs. | 
| protected File | generateEmptyAggregateChangeLogFile()Generates an empty (temporary)  Filethat will eventually
 contain Liquibase changelog contents. | 
| File | getAggregateChangeLogFile()Returns a  Filethat either does house or will house
 Liquibase changelog contents. | 
| String | getCharacterSet() | 
| String | getDatabaseChangeLogXsdVersion()Returns the version of the Liquibase changelog file that will be
 generated. | 
| Properties | getProperties()Returns a  Propertiesobject representing any custom
 properties that are to be converted to Liquibase changelog
 parameters. | 
| protected URL | getResource(String name)Loads a notional resource with the given  namefrom the
 classpath. | 
| String | getTemplate()Returns the source code of an MVEL
 template that represents the skeleton of a Liquibase
 changelog into which will be placed  <include>elements. | 
| void | setAggregateChangeLogFile(File file)Installs a  Filerepresenting the path to a file that will
 be erased and that will eventually contain Liquibase changelog
 contents. | 
| void | setCharacterSet(String characterSet) | 
| void | setDatabaseChangeLogXsdVersion(String version)Sets the version of the Liquibase changelog file that will be
 generated. | 
| void | setProperties(Properties properties)Installs a  Propertiesobject that represents custom
 properties that are to be converted to Liquibase changelog
 parameters. | 
| void | setTemplate(String template)Sets the source code of an MVEL template that will be used to
 produce a Liquibase changelog. | 
public AggregateChangeLogGenerator()
AggregateChangeLogGenerator.public String getDatabaseChangeLogXsdVersion()
This method may return null in which case "3.3" will be used internally instead.
By default, "3.3" is returned, and this default value
 will change when Liquibase is updated and this project is updated
 to depend on it.
nullsetDatabaseChangeLogXsdVersion(String)public void setDatabaseChangeLogXsdVersion(String version)
version - the new version; may be nullgetDatabaseChangeLogXsdVersion()protected URL getResource(String name)
name from the
 classpath.
 The default implementation invokes the ClassLoader.getResource(String) method on the supplied String using, in order:
ClassLoaderClassLoaderThe first of these ClassLoaders to return a non-null value will have its result returned.  Otherwise, the return
 value of ClassLoader.getSystemResource(String) is
 returned.
name - the name of the resource to load; may be null
 in which case null will be returnednullClassLoader.getResource(String)public Properties getProperties()
Properties object representing any custom
 properties that are to be converted to Liquibase changelog
 parameters.
 This method may return null.
Properties object representing custom
 properties, or nullsetProperties(Properties)public void setProperties(Properties properties)
Properties object that represents custom
 properties that are to be converted to Liquibase changelog
 parameters.properties - the Properties to be installed; may be
 nullgetProperties()public String getCharacterSet()
public void setCharacterSet(String characterSet)
public String getTemplate()
<include> elements.
 This method will not return null and overrides of it
 must not either.
null String containing the source
 code of an MVEL
 templatepublic void setTemplate(String template)
template - the new source code; must not be nullIllegalArgumentException - if template is nullgetTemplate()public File getAggregateChangeLogFile()
File that either does house or will house
 Liquibase changelog contents.
 This method may return null.
This method may generate such a file.
File representing the aggregate changelog, or
 nullgenerateEmptyAggregateChangeLogFile()public void setAggregateChangeLogFile(File file)
File representing the path to a file that will
 be erased and that will eventually contain Liquibase changelog
 contents.file - a path to a file that will be used as the Liquibase
 changelog file generated by this AggregateChangeLogGenerator; may be nullprotected File generateEmptyAggregateChangeLogFile() throws IOException
File that will eventually
 contain Liquibase changelog contents.
 This implementation calls File.createTempFile(String,
 String) with changelog and .tmp.xml as its
 arguments, instructs the File so created to be
 deleted when the Java Virtual
 Machine exits and returns the result.
null FileIOException - if an error occurspublic File generate(Collection<? extends URL> resources) throws IOException
URLs.
 This method never returns null.
resources - a Collection of URLs, each
 element of which resolves to a Liquibase changelog file; may be
 null or empty in whihc
 case a generally useless changelog will be generatednull File representing the path to
 the generated fileIOException - if an error occursIllegalStateException - if somehow the File into
 which content will be poured is nullgetAggregateChangeLogFile(), 
generateEmptyAggregateChangeLogFile()Copyright © 2014–2015, Laird Nelson. All rights reserved.