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 Changecreate(String name)Create a new Change implementation for the given change name.ChangeMetaDatagetChangeMetaData(String change)ChangeMetaDatagetChangeMetaData(Change change)SortedSet<String>getDefinedChanges()Returns all defined changes in the registry.static ChangeFactorygetInstance()Deprecated.Map<String,Object>getParameters(Change change)protected Class<Change>getPluginClass()protected intgetPriority(Change obj, Object... args)Returns the priority of the given object based on the passed args array.voidsetPerformSupportsDatabaseValidation(boolean performSupportsDatabaseValidation)Should the change be checked to see if it supports the current database? Default is truevoidunregister(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:
getPluginClassin classAbstractPluginFactory<Change>
-
getPriority
protected int getPriority(Change obj, Object... args)
Description copied from class:AbstractPluginFactoryReturns the priority of the given object based on the passed args array. The args are created as as part of the custom public getPlugin method in implementations are are passed throughAbstractPluginFactory.getPlugin(Object...)- Specified by:
getPriorityin 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-
-
-