Class PluginConfigKeyBase
- java.lang.Object
-
- com.funnelback.plugin.details.model.PluginConfigKeyBase
-
- All Implemented Interfaces:
PluginConfigKeyDetails
,PluginDetailsBase
- Direct Known Subclasses:
PluginConfigKey
,PluginConfigKeyEncrypted
public abstract class PluginConfigKeyBase extends Object implements PluginConfigKeyDetails
-
-
Field Summary
Fields Modifier and Type Field Description private @NonNull String
description
Short description of plugin configuration key to display in plugin configuration admin UI and in auto-generated documentationprotected @NonNull String
id
ID of a key to create a plugin configuration key For example, to create - key `plugin.pluginID.config.foo` provide `id="foo"` - key `plugin.pluginID.config.foo.bar` provide `id="foo.bar"` - key with wildcard `plugin.pluginID.config.foo.*` provide `id="foo.*"` - key with wildcard `plugin.pluginID.config.foo.*.baz` provide `id="foo.*.baz"` - key with wildcard `plugin.pluginID.config.foo.*.baz.*` provide `id="foo.*.baz.*"`private @NonNull String
label
Label for plugin configuration key to display in plugin configuration admin UIprivate String
longDescription
Longer description of plugin configuration key to display in plugin auto-generated documentationprivate @NonNull String
pluginId
ID of a current pluginprivate boolean
required
Mark plugin configuration key as required or optional in plugin configuration admin UI and in auto-generated documentationprivate @NonNull PluginConfigKeyType
type
Type of plugin configuration key, for details seePluginConfigKeyType
-
Fields inherited from interface com.funnelback.plugin.details.model.PluginDetailsBase
PLUGIN_CONFIG_QUALIFIER, PLUGIN_ENCRYPTED_QUALIFIER, PLUGIN_PREFIX
-
-
Constructor Summary
Constructors Constructor Description PluginConfigKeyBase(@NonNull String pluginId, @NonNull String id, @NonNull String label, @NonNull String description, boolean required, @NonNull PluginConfigKeyType type)
PluginConfigKeyBase(@NonNull String pluginId, @NonNull String id, @NonNull String label, @NonNull String description, String longDescription, boolean required, @NonNull PluginConfigKeyType type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NonNull String
getDescription()
Short description of plugin configuration key to display in plugin configuration admin UI and in auto-generated documentationString
getKey()
Create a plugin key based on provided key ID If ID was defined with wildcard, this method will return key in wildcard form.String
getKey(String... wildcard)
Create a plugin key based on provided key ID with resolving wildcards to provided values For example: - for ID `foo.*`, `getKey("something")` -> `plugin.pluginID.config.foo.something` - for ID `*.foo.*.bar`, `getKey("something", "more")` -> `plugin.pluginID.config.something.foo.more.bar`@NonNull String
getLabel()
Label for plugin configuration key to display in plugin configuration admin UIString
getLongDescription()
Longer description of plugin configuration key to display in plugin auto-generated documentation@NonNull String
getPluginId()
ID of a current plugin@NonNull PluginConfigKeyType
getType()
Type of plugin configuration key, for details seePluginConfigKeyType
boolean
isRequired()
Mark plugin configuration key as required or optional in plugin configuration admin UI and in auto-generated documentation-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.funnelback.plugin.details.model.PluginConfigKeyDetails
getAllowedValue, getDefaultValue, getShowIfKeyHasValue
-
Methods inherited from interface com.funnelback.plugin.details.model.PluginDetailsBase
getKeyPrefix
-
-
-
-
Field Detail
-
pluginId
@NonNull private final @NonNull String pluginId
ID of a current plugin
-
id
@NonNull protected final @NonNull String id
ID of a key to create a plugin configuration key For example, to create - key `plugin.pluginID.config.foo` provide `id="foo"` - key `plugin.pluginID.config.foo.bar` provide `id="foo.bar"` - key with wildcard `plugin.pluginID.config.foo.*` provide `id="foo.*"` - key with wildcard `plugin.pluginID.config.foo.*.baz` provide `id="foo.*.baz"` - key with wildcard `plugin.pluginID.config.foo.*.baz.*` provide `id="foo.*.baz.*"`
-
label
@NonNull private final @NonNull String label
Label for plugin configuration key to display in plugin configuration admin UI
-
description
@NonNull private final @NonNull String description
Short description of plugin configuration key to display in plugin configuration admin UI and in auto-generated documentation
-
longDescription
private String longDescription
Longer description of plugin configuration key to display in plugin auto-generated documentation
-
required
private final boolean required
Mark plugin configuration key as required or optional in plugin configuration admin UI and in auto-generated documentation
-
type
@NonNull private final @NonNull PluginConfigKeyType type
Type of plugin configuration key, for details seePluginConfigKeyType
-
-
Constructor Detail
-
PluginConfigKeyBase
public PluginConfigKeyBase(@NonNull @NonNull String pluginId, @NonNull @NonNull String id, @NonNull @NonNull String label, @NonNull @NonNull String description, boolean required, @NonNull @NonNull PluginConfigKeyType type)
-
-
Method Detail
-
getKey
public String getKey()
Create a plugin key based on provided key ID If ID was defined with wildcard, this method will return key in wildcard form. To resolve wildcard to particular value seegetKey(String...)
For example: - for ID `foo`, `getKey()` -> `plugin.pluginID.config.foo`, - for ID `foo.bar`, `getKey()` -> `plugin.pluginID.config.foo.bar` - for ID `foo.*`, `getKey()` -> `plugin.pluginID.config.foo.*`- Returns:
- plugin configuration key
-
getKey
public String getKey(String... wildcard)
Create a plugin key based on provided key ID with resolving wildcards to provided values For example: - for ID `foo.*`, `getKey("something")` -> `plugin.pluginID.config.foo.something` - for ID `*.foo.*.bar`, `getKey("something", "more")` -> `plugin.pluginID.config.something.foo.more.bar`- Parameters:
wildcard
- list of wildcard values to replace in key- Returns:
- plugin configuration key with resolved wildcard value
-
getPluginId
@NonNull public @NonNull String getPluginId()
ID of a current plugin- Specified by:
getPluginId
in interfacePluginDetailsBase
-
getLabel
@NonNull public @NonNull String getLabel()
Label for plugin configuration key to display in plugin configuration admin UI
-
getDescription
@NonNull public @NonNull String getDescription()
Short description of plugin configuration key to display in plugin configuration admin UI and in auto-generated documentation
-
getLongDescription
public String getLongDescription()
Longer description of plugin configuration key to display in plugin auto-generated documentation
-
isRequired
public boolean isRequired()
Mark plugin configuration key as required or optional in plugin configuration admin UI and in auto-generated documentation
-
getType
@NonNull public @NonNull PluginConfigKeyType getType()
Type of plugin configuration key, for details seePluginConfigKeyType
-
-