com.mageddo.togglefirst.activation.Parameter 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;
/**
* A parameter used to configure an {@link ActivationStrategy}. Users can either use {@link ParameterBuilder} for creating a
* parameter using a fluent API or implement the interface directly.
*
* @author Christian Kaltepoth
*/
public interface Parameter {
/**
* The name of the parameter. This name is used to store and retrieve the parameter
*
*/
String getName();
/**
* A human readable label that describes the parameter.
*/
String getLabel();
/**
* An optional description of the parameter. Can return null
, if no description exists.
*/
String getDescription();
/**
* Returns true
if the parameter is optional.
*/
boolean isOptional();
/**
* Returns true
if the parameter value is typically large so that it should be displayed with an textarea
* instead of a simple text input field.
*/
boolean isLargeText();
/**
* This method allows to implement custom validation logic for the parameter.
*/
boolean isValid(String value);
}