Package liquibase.change
Class ChangeFactory
- java.lang.Object
-
- liquibase.plugin.AbstractPluginFactory<Change>
-
- liquibase.change.ChangeFactory
-
- All Implemented Interfaces:
PluginFactory
,SingletonObject
public class ChangeFactory extends AbstractPluginFactory<Change>
Factory class for constructing the correct liquibase.change.Change implementation based on a command name. For XML-based changelogs, the tag name is the command name. Change implementations are looked up via theServiceLocator
.- See Also:
Change
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Change
create(String name)
Create a new Change implementation for the given change name.ChangeMetaData
getChangeMetaData(String change)
ChangeMetaData
getChangeMetaData(Change change)
SortedSet<String>
getDefinedChanges()
Returns all defined changes in the registry.static ChangeFactory
getInstance()
Deprecated.Map<String,Object>
getParameters(Change change)
protected Class<Change>
getPluginClass()
protected int
getPriority(Change obj, Object... args)
Returns the priority of the given object based on the passed args array.void
setPerformSupportsDatabaseValidation(boolean performSupportsDatabaseValidation)
Should the change be checked to see if it supports the current database? Default is truevoid
unregister(String name)
Unregister all instances of a given Change name.-
Methods inherited from class liquibase.plugin.AbstractPluginFactory
findAllInstances, getPlugin, getPlugins, register, removeInstance
-
-
-
-
Method Detail
-
getPluginClass
protected Class<Change> getPluginClass()
- Specified by:
getPluginClass
in classAbstractPluginFactory<Change>
-
getPriority
protected int getPriority(Change obj, Object... args)
Description copied from class:AbstractPluginFactory
Returns the priority of the given object based on the passed args array. The args are created as part of the custom public getPlugin method in implementations are passed throughAbstractPluginFactory.getPlugin(Object...)
- Specified by:
getPriority
in classAbstractPluginFactory<Change>
-
getChangeMetaData
public ChangeMetaData getChangeMetaData(String change)
-
getChangeMetaData
public ChangeMetaData getChangeMetaData(Change change)
-
unregister
public void unregister(String name)
Unregister all instances of a given Change name. Normally used for testing, but can be called manually if needed.
-
getDefinedChanges
public SortedSet<String> getDefinedChanges()
Returns all defined changes in the registry. Returned set is not modifiable.
-
create
public Change create(String name)
Create a new Change implementation for the given change name. The class of the constructed object will be the Change implementation with the highest priority. Each call to create will return a new instance of the Change.
-
getInstance
public static ChangeFactory getInstance()
Deprecated.
-
setPerformSupportsDatabaseValidation
public void setPerformSupportsDatabaseValidation(boolean performSupportsDatabaseValidation)
Should the change be checked to see if it supports the current database? Default is true- Parameters:
performSupportsDatabaseValidation
-
-
-