Class 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 the ServiceLocator.
See Also:
  • Field Details

    • NO_EXCEPTION_ON_UNSUPPORTED_CHANGE_TYPE

      public static final String NO_EXCEPTION_ON_UNSUPPORTED_CHANGE_TYPE
      See Also:
    • SUPPORTS_METHOD_REQUIRED_MESSAGE

      protected static final String SUPPORTS_METHOD_REQUIRED_MESSAGE
      See Also:
  • Method Details

    • getPluginClass

      protected Class<Change> getPluginClass()
      Specified by:
      getPluginClass in class AbstractPluginFactory<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 through AbstractPluginFactory.getPlugin(Object...)
      Specified by:
      getPriority in class AbstractPluginFactory<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.
    • isNoExceptionOnUnsupportedChangeType

      public static boolean isNoExceptionOnUnsupportedChangeType()
    • getParameters

      public Map<String,Object> getParameters(Change change)
    • getInstance

      @Deprecated public static ChangeFactory getInstance()
      Deprecated.