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

liquibase.license.LicenseTrackingFactory Maven / Gradle / Ivy

The newest version!
package liquibase.license;

import liquibase.Scope;
import liquibase.plugin.AbstractPluginFactory;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;

@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class LicenseTrackingFactory extends AbstractPluginFactory {


    @Override
    protected Class getPluginClass() {
        return LicenseTrackingListener.class;
    }

    @Override
    protected int getPriority(LicenseTrackingListener obj, Object... args) {
        return obj.getPriority();
    }

    public void handleEvent(LicenseTrackList event) {
        try {
            if (LicenseTrackingArgs.ENABLED.getCurrentValue()) {
                LicenseTrackingListener plugin = getPlugin();
                if (plugin != null) {
                    plugin.handleEvent(event);
                }
            }
        } catch (Exception e) {
            Scope.getCurrentScope().getLog(getClass()).severe("Liquibase was unable to transmit license tracking information to the Liquibase License Utility (LLU) server. Please verify that LLU is running, Liquibase is configured with the correct LLU server address, and that the LLU server is accessible from the machine where Liquibase is executing.", e);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy