Skip to content

Instantly share code, notes, and snippets.

@nattaphonjeamjit
Last active April 8, 2018 16:37
Show Gist options
  • Save nattaphonjeamjit/31d17b9048ce3d8b65d7cddce11cf200 to your computer and use it in GitHub Desktop.
Save nattaphonjeamjit/31d17b9048ce3d8b65d7cddce11cf200 to your computer and use it in GitHub Desktop.
import org.togglz.core.Feature;
public enum FeatureEnum implements Feature {
@Label("Promotion Management Feature")
@EnabledByDefault
@DefaultActivationStrategy(
id = SystemPropertyActivationStrategy.ID,
parameters = { @ActivationParameter(name = SystemPropertyActivationStrategy.PARAM_PROPERTY_NAME,
value = "promotion.feature"),
@ActivationParameter(name = SystemPropertyActivationStrategy.PARAM_PROPERTY_VALUE,
value = "true") })
PROMOTION_MANAGEMENT_FEATURE;
public boolean isActive() {
return FeatureContext.getFeatureManager().isActive(this);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment