public final class ConfigurationBuilder extends Object
Configuration builder.
It also validates configuration parameters.| Constructor and Description |
|---|
ConfigurationBuilder() |
| Modifier and Type | Method and Description |
|---|---|
Configuration |
build()
Builds a
Configuration instance after validating the specified
parameters. |
ConfigurationBuilder |
withChangelogLoader(ChangelogLoader changelogLoader)
Sets
ChangelogLoader to use when reading Liquigraph changelogs. |
ConfigurationBuilder |
withClassLoader(ClassLoader classLoader)
Deprecated.
Please use
withChangelogLoader(ChangelogLoader) with a ClassLoaderChangelogLoader.
Sets ClassLoader to use when reading Liquigraph changelogs.
Default is Thread.currentThread().getContextClassLoader().
Don't call this unless you REALLY know what you're doing. |
ConfigurationBuilder |
withDataSource(DataSource dataSource)
Specifies the data source of the graph database instance.
|
ConfigurationBuilder |
withDryRunMode(Path outputDirectory)
Sets Liquigraph to write changesets in a
output.cypher
in the specified outputDirectory. |
ConfigurationBuilder |
withExecutionContexts(Collection<String> executionContexts)
Specifies one or more execution contexts.
|
ConfigurationBuilder |
withExecutionContexts(String... executionContexts) |
ConfigurationBuilder |
withMasterChangelogLocation(String masterChangelog)
Specifies the location of the master changelog file.
|
ConfigurationBuilder |
withPassword(String password)
Specifies the password allowed to connect to the remote graph database instance.
|
ConfigurationBuilder |
withRunMode()
Sets Liquigraph to execute changesets against the configured graph database.
|
ConfigurationBuilder |
withUri(String uri)
Specifies the JDBC connection URI of the graph database instance.
|
ConfigurationBuilder |
withUsername(String username)
Specifies the username allowed to connect to the remote graph database instance.
|
public ConfigurationBuilder withMasterChangelogLocation(String masterChangelog)
masterChangelog - Liquigraph changelogpublic ConfigurationBuilder withUri(String uri)
DataSource directlyuri - connection URIpublic ConfigurationBuilder withDataSource(DataSource dataSource)
dataSource - data sourcepublic ConfigurationBuilder withUsername(String username)
username - usernamepublic ConfigurationBuilder withPassword(String password)
password - passwordpublic ConfigurationBuilder withExecutionContexts(String... executionContexts)
executionContexts - 0 or more Liquigraph execution contexts to allow changeset
filteringwithExecutionContexts(java.util.Collection)public ConfigurationBuilder withExecutionContexts(Collection<String> executionContexts)
executionContexts - non-nullable execution contextspublic ConfigurationBuilder withRunMode()
public ConfigurationBuilder withDryRunMode(Path outputDirectory)
output.cypher
in the specified outputDirectory.
Note that it won't write to the graph database.outputDirectory - writable directory where the file is written@Deprecated public ConfigurationBuilder withClassLoader(ClassLoader classLoader)
withChangelogLoader(ChangelogLoader) with a ClassLoaderChangelogLoader.
Sets ClassLoader to use when reading Liquigraph changelogs.
Default is Thread.currentThread().getContextClassLoader().
Don't call this unless you REALLY know what you're doing.classLoader - class loaderpublic ConfigurationBuilder withChangelogLoader(ChangelogLoader changelogLoader)
ChangelogLoader to use when reading Liquigraph changelogs.
Default is ClassLoaderChangelogLoader.currentThreadContextClassLoader().
Don't call this unless you REALLY know what you're doing.changelogLoader - the changelog loader to usepublic Configuration build()
Configuration instance after validating the specified
parameters.Copyright © 2018. All rights reserved.