All Downloads are FREE. Search and download functionalities are using the official Maven repository.

liquibase.parser.core.yaml.YamlParser Maven / Gradle / Ivy

There is a newer version: 3.6.2.5.inovus
Show newest version
package liquibase.parser.core.yaml;

import liquibase.logging.LogService;
import liquibase.logging.Logger;
import liquibase.parser.LiquibaseParser;
import liquibase.resource.ResourceAccessor;

public abstract class YamlParser implements LiquibaseParser {

    protected Logger log = LogService.getLog(getClass());

    public boolean supports(String changeLogFile, ResourceAccessor resourceAccessor) {
        for (String extension : getSupportedFileExtensions()) {
            if (changeLogFile.toLowerCase().endsWith("." + extension)) {
                return true;
            }
        }
        return false;
    }

    protected String[] getSupportedFileExtensions() {
        return new String[] {"yaml", "yml"};
    }

    @Override
    public int getPriority() {
        return PRIORITY_DEFAULT;
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy