Add license acknowledgment mechanism for consumer plugins to notify users when they attempt to install a new license

closes elastic/elasticsearch#461

Original commit: elastic/x-pack-elasticsearch@bc30ac2871
This commit is contained in:
Areek Zillur 2015-08-18 16:05:29 -04:00
parent f879ccf426
commit 0b9021ee87
6 changed files with 6 additions and 6 deletions

View File

@ -81,7 +81,7 @@ public class LicenseService extends AbstractLifecycleComponent<LicenseService> {
@Override
protected void doStart() throws ElasticsearchException {
clientService.register(FEATURE_NAME, TRIAL_LICENSE_OPTIONS, expirationLoggers, new InternalListener(this));
clientService.register(FEATURE_NAME, TRIAL_LICENSE_OPTIONS, expirationLoggers, null, new InternalListener(this));
}
@Override

View File

@ -124,7 +124,7 @@ public class LicenseIntegrationTests extends ESIntegTestCase {
}
@Override
public void register(String s, LicensesService.TrialLicenseOptions trialLicenseOptions, Collection<LicensesService.ExpirationCallback> collection, Listener listener) {
public void register(String s, LicensesService.TrialLicenseOptions trialLicenseOptions, Collection<LicensesService.ExpirationCallback> collection, AcknowledgementCallback acknowledgementCallback, Listener listener) {
listeners.add(listener);
enable();
}

View File

@ -87,7 +87,7 @@ public class LicenseService extends AbstractLifecycleComponent<LicenseService> {
@Override
protected void doStart() throws ElasticsearchException {
if (settings.getGroups("tribe", true).isEmpty()) {
licensesClientService.register(FEATURE_NAME, TRIAL_LICENSE_OPTIONS, expirationLoggers, new InternalListener());
licensesClientService.register(FEATURE_NAME, TRIAL_LICENSE_OPTIONS, expirationLoggers, null, new InternalListener());
} else {
//TODO currently we disable licensing on tribe node. remove this once es core supports merging cluster
new InternalListener().onEnabled(null);

View File

@ -233,7 +233,7 @@ public class LicensingTests extends ShieldIntegTestCase {
}
@Override
public void register(String s, LicensesClientService.TrialLicenseOptions trialLicenseOptions, Collection<LicensesClientService.ExpirationCallback> collection, Listener listener) {
public void register(String s, LicensesClientService.TrialLicenseOptions trialLicenseOptions, Collection<LicensesClientService.ExpirationCallback> collection, AcknowledgementCallback acknowledgementCallback, Listener listener) {
listeners.add(listener);
enable();
}

View File

@ -84,7 +84,7 @@ public class LicenseService extends AbstractLifecycleComponent<LicenseService> {
@Override
protected void doStart() throws ElasticsearchException {
clientService.register(FEATURE_NAME, TRIAL_LICENSE_OPTIONS, expirationLoggers, new InternalListener(this));
clientService.register(FEATURE_NAME, TRIAL_LICENSE_OPTIONS, expirationLoggers, null, new InternalListener(this));
}
@Override

View File

@ -317,7 +317,7 @@ public class LicenseIntegrationTests extends AbstractWatcherIntegrationTests {
}
@Override
public void register(String s, LicensesService.TrialLicenseOptions trialLicenseOptions, Collection<LicensesService.ExpirationCallback> collection, Listener listener) {
public void register(String s, LicensesService.TrialLicenseOptions trialLicenseOptions, Collection<LicensesService.ExpirationCallback> collection, AcknowledgementCallback acknowledgementCallback, Listener listener) {
listeners.add(listener);
enable();
}