Class PluginConfigKeyAllowedValue<T>

  • Type Parameters:
    T - type of key value

    public class PluginConfigKeyAllowedValue<T>
    extends Object
    Define plugin configuration key allowed value To define fixed list of allowed values, set `values` values. For example, to allow only configuration key to be set to "A" or "Z":
    
     new PluginConfigKeyAllowedValue(List.of("A", "Z"))
     
    To define set `regex` regex. For example, to allow value to be in format 'number.number' ie. 1.2, 3.4:
    
     new PluginConfigKeyAllowedValue(Pattern.compile("\\d\\.\\d"))
     
    • Field Detail

      • values

        private final List<T> values
        Define a list of fixed values that plugin configuration key value can be set to to display in plugin configuration admin UI and in auto-generated documentation
      • regex

        private final Pattern regex
        Define regular expression to run against provided plugin configuration key value to determine if a value is allowed to display in plugin configuration admin UI
    • Constructor Detail

      • PluginConfigKeyAllowedValue

        private PluginConfigKeyAllowedValue()
        This private constructor is required for JSOM deserializer
      • PluginConfigKeyAllowedValue

        public PluginConfigKeyAllowedValue​(@NonNull
                                           @NonNull List<T> values)
      • PluginConfigKeyAllowedValue

        public PluginConfigKeyAllowedValue​(@NonNull
                                           @NonNull Pattern regex)
    • Method Detail

      • getValues

        public List<T> getValues()
        Define a list of fixed values that plugin configuration key value can be set to to display in plugin configuration admin UI and in auto-generated documentation
      • getRegex

        public Pattern getRegex()
        Define regular expression to run against provided plugin configuration key value to determine if a value is allowed to display in plugin configuration admin UI