com.mageddo.togglefirst.activation.NopActivationStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of toggle-first-core Show documentation
Show all versions of toggle-first-core Show documentation
Enable and disable your features in production on a button click
package com.mageddo.togglefirst.activation;
import com.mageddo.togglefirst.FeatureMetadata;
import java.util.UUID;
/**
* Just delegate feature check to feature metadata
*/
public class NopActivationStrategy implements ActivationStrategy {
public static final UUID ID = UUID.fromString("47293db9-dc9e-4f18-a899-68a20dd699d9");
@Override
public UUID id() {
return ID;
}
@Override
public String description() {
return "Does nothing, delegates to feature metadata";
}
@Override
public boolean isActive(FeatureMetadata featureMetadata, String user) {
return featureMetadata.isActive();
}
}