| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| CustomChange |
|
| 1.0;1 |
| 1 | package liquibase.change.custom; | |
| 2 | ||
| 3 | import liquibase.database.Database; | |
| 4 | import liquibase.exception.SetupException; | |
| 5 | import liquibase.exception.ValidationErrors; | |
| 6 | import liquibase.resource.ResourceAccessor; | |
| 7 | ||
| 8 | /** | |
| 9 | * Interface to implement when creating a custom change. Actual custom changes implementations need to implement | |
| 10 | * CustomSqlChange or CustomTaskChange. <br> | |
| 11 | * <br> | |
| 12 | * See http://www.liquibase.org/manual/custom_refactoring_class for more information. | |
| 13 | */ | |
| 14 | public interface CustomChange { | |
| 15 | ||
| 16 | /** | |
| 17 | * Confirmation message to be displayed after the change is executed | |
| 18 | * | |
| 19 | * @return a {@link String} containing the message after the change is executed | |
| 20 | */ | |
| 21 | public String getConfirmationMessage(); | |
| 22 | ||
| 23 | /** | |
| 24 | * This method will be called after the no arg constructor and all of the properties have been set to allow the task | |
| 25 | * to do any heavy tasks or more importantly generate any exceptions to report to the user about the settings | |
| 26 | * provided. | |
| 27 | * | |
| 28 | */ | |
| 29 | public void setUp() throws SetupException; | |
| 30 | ||
| 31 | /** | |
| 32 | * Sets the fileOpener that should be used for any file loading and resource finding for files that are provided by | |
| 33 | * the user. | |
| 34 | */ | |
| 35 | public void setFileOpener(ResourceAccessor resourceAccessor); | |
| 36 | ||
| 37 | /** | |
| 38 | * Tests that the change is configured correctly before attempting to execute it. | |
| 39 | * | |
| 40 | * @param database | |
| 41 | * The database the change will be ran against | |
| 42 | */ | |
| 43 | public ValidationErrors validate(Database database); | |
| 44 | ||
| 45 | } |