Package org.keycloak.provider
Class ProviderConfigProperty
- java.lang.Object
-
- org.keycloak.provider.ProviderConfigProperty
-
public class ProviderConfigProperty extends Object
Configuration property metadata. Used to render generic configuration pages for Keycloak extensions in the admin console.- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Field Summary
Fields Modifier and Type Field Description static String
BOOLEAN_TYPE
static String
CLIENT_LIST_TYPE
protected Object
defaultValue
static String
FILE_TYPE
static String
GROUP_TYPE
protected String
helpText
protected String
label
static String
LIST_TYPE
Possibility to configure single String value, which needs to be chosen from the list of predefined values (HTML select)static String
MAP_TYPE
Configure multiple (key, value) pairsstatic String
MULTIVALUED_LIST_TYPE
Possibility to configure multiple String values, which needs to be chosen from the list of predefined values (HTML select with multiple)static String
MULTIVALUED_STRING_TYPE
Possibility to configure multiple String values of any value (something like "redirect_uris" for clients)protected String
name
protected List<String>
options
static String
PASSWORD
static String
ROLE_TYPE
static String
SCRIPT_TYPE
protected boolean
secret
static String
STRING_TYPE
static String
TEXT_TYPE
textarea fieldprotected String
type
-
Constructor Summary
Constructors Constructor Description ProviderConfigProperty()
ProviderConfigProperty(String name, String label, String helpText, String type, Object defaultValue)
ProviderConfigProperty(String name, String label, String helpText, String type, Object defaultValue, boolean secret)
ProviderConfigProperty(String name, String label, String helpText, String type, Object defaultValue, String... options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getDefaultValue()
Default value for the variableString
getHelpText()
Help text that will be displayed in the admin console tooltipString
getLabel()
Label shown in the admin console when configuring the variableString
getName()
Name of the config variable stored in the databaseList<String>
getOptions()
For list types, this is a list of choices to choose from.String
getType()
Type of the variable.boolean
isReadOnly()
boolean
isSecret()
If true, this variable is only writeable.void
setDefaultValue(Object defaultValue)
void
setHelpText(String helpText)
void
setLabel(String label)
void
setName(String name)
void
setOptions(List<String> options)
void
setReadOnly(boolean readOnly)
void
setSecret(boolean secret)
void
setType(String type)
-
-
-
Field Detail
-
BOOLEAN_TYPE
public static final String BOOLEAN_TYPE
- See Also:
- Constant Field Values
-
STRING_TYPE
public static final String STRING_TYPE
- See Also:
- Constant Field Values
-
MULTIVALUED_STRING_TYPE
public static final String MULTIVALUED_STRING_TYPE
Possibility to configure multiple String values of any value (something like "redirect_uris" for clients)- See Also:
- Constant Field Values
-
SCRIPT_TYPE
public static final String SCRIPT_TYPE
- See Also:
- Constant Field Values
-
FILE_TYPE
public static final String FILE_TYPE
- See Also:
- Constant Field Values
-
ROLE_TYPE
public static final String ROLE_TYPE
- See Also:
- Constant Field Values
-
GROUP_TYPE
public static final String GROUP_TYPE
- See Also:
- Constant Field Values
-
LIST_TYPE
public static final String LIST_TYPE
Possibility to configure single String value, which needs to be chosen from the list of predefined values (HTML select)- See Also:
- Constant Field Values
-
MULTIVALUED_LIST_TYPE
public static final String MULTIVALUED_LIST_TYPE
Possibility to configure multiple String values, which needs to be chosen from the list of predefined values (HTML select with multiple)- See Also:
- Constant Field Values
-
CLIENT_LIST_TYPE
public static final String CLIENT_LIST_TYPE
- See Also:
- Constant Field Values
-
PASSWORD
public static final String PASSWORD
- See Also:
- Constant Field Values
-
TEXT_TYPE
public static final String TEXT_TYPE
textarea field- See Also:
- Constant Field Values
-
MAP_TYPE
public static final String MAP_TYPE
Configure multiple (key, value) pairs- See Also:
- Constant Field Values
-
name
protected String name
-
label
protected String label
-
helpText
protected String helpText
-
type
protected String type
-
defaultValue
protected Object defaultValue
-
secret
protected boolean secret
-
-
Constructor Detail
-
ProviderConfigProperty
public ProviderConfigProperty()
-
ProviderConfigProperty
public ProviderConfigProperty(String name, String label, String helpText, String type, Object defaultValue)
-
ProviderConfigProperty
public ProviderConfigProperty(String name, String label, String helpText, String type, Object defaultValue, String... options)
-
-
Method Detail
-
getName
public String getName()
Name of the config variable stored in the database- Returns:
-
setName
public void setName(String name)
-
getLabel
public String getLabel()
Label shown in the admin console when configuring the variable- Returns:
-
setLabel
public void setLabel(String label)
-
getType
public String getType()
Type of the variable. i.e. boolean, string etc. See the constants declared in this class for what your choices are.- Returns:
-
setType
public void setType(String type)
-
getDefaultValue
public Object getDefaultValue()
Default value for the variable- Returns:
-
setDefaultValue
public void setDefaultValue(Object defaultValue)
-
getOptions
public List<String> getOptions()
For list types, this is a list of choices to choose from.- Returns:
-
getHelpText
public String getHelpText()
Help text that will be displayed in the admin console tooltip- Returns:
-
setHelpText
public void setHelpText(String helpText)
-
isSecret
public boolean isSecret()
If true, this variable is only writeable. It will never be viewable. This is important for things like passwords in which you never want to display them on the screen.- Returns:
-
setSecret
public void setSecret(boolean secret)
-
setReadOnly
public void setReadOnly(boolean readOnly)
-
isReadOnly
public boolean isReadOnly()
-
-