Class PluginConfigKeyBase

    • 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
    • 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)
      • PluginConfigKeyBase

        public PluginConfigKeyBase​(@NonNull
                                   @NonNull String pluginId,
                                   @NonNull
                                   @NonNull String id,
                                   @NonNull
                                   @NonNull String label,
                                   @NonNull
                                   @NonNull String description,
                                   String longDescription,
                                   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 see getKey(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
      • 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