liquibase.precondition.Precondition Maven / Gradle / Ivy
package liquibase.precondition;
import liquibase.changelog.ChangeSet;
import liquibase.changelog.DatabaseChangeLog;
import liquibase.changelog.visitor.ChangeExecListener;
import liquibase.database.Database;
import liquibase.exception.PreconditionErrorException;
import liquibase.exception.PreconditionFailedException;
import liquibase.exception.ValidationErrors;
import liquibase.exception.Warnings;
import liquibase.parser.core.ParsedNode;
import liquibase.parser.core.ParsedNodeException;
import liquibase.resource.ResourceAccessor;
import liquibase.serializer.LiquibaseSerializable;
/**
* Marker interface for preconditions. May become an annotation in the future.
*/
public interface Precondition extends LiquibaseSerializable {
public String getName();
public Warnings warn(Database database);
public ValidationErrors validate(Database database);
public void check(Database database, DatabaseChangeLog changeLog, ChangeSet changeSet, ChangeExecListener changeExecListener)
throws PreconditionFailedException, PreconditionErrorException;
public void load(ParsedNode parsedNode, ResourceAccessor resourceAccessor) throws ParsedNodeException;
}