What is the usage of methods warn() and validate() in liquibase.precondition.Precondition?

What is the usage of methods warn() and validate() in liquibase.precondition.Precondition ?

[ 9:18 AM ]

From @NathanVoxland:

They should be used like the corresonding methods in liquibase.change.Change.

validate() is used when liquibase is first starting up to determine if the precondition is correctly set up. For example, if the precondition needs a tableName attribute set, you would return a ValidationError if the user has not set one. Or if either viewName or tableName is required, but not both you’d check it in validate(). If there are any errors, liquibase processing stops.

warn() is used in the same startup phase, but is used for issues that you want to let the user know about, but don’t want to stop processing for. Like if you normally expect tableName to be set, but have logic to handle if it’s not you can send a warning about “You should probably set tableName to be safe”.

However, I don’t think the methods are currently hooked up like they should be. We will be working on the parser logic in general in an upcoming release, and have those methods defined so that when we do that, we won’t have to break existing extensions