Class OptionsGroup

java.lang.Object
org.apache.camel.component.extension.verifier.OptionsGroup
All Implemented Interfaces:
Serializable

public final class OptionsGroup extends Object implements Serializable
A named group of options. A group of options requires that a set of component parameters is given as a whole. The option syntax can be "propertyName" to denote required property and "!propertyName" to denote required absence of a property.
See Also:
  • Constructor Details

    • OptionsGroup

      public OptionsGroup(String name)
      Creates new named OptionsGroup.
      Parameters:
      name - the name of the group
    • OptionsGroup

      public OptionsGroup(String name, Collection<String> options)
      Creates new named OptionsGroup with a set of option definitions.
      Parameters:
      name - the name of the group
      options - names of properties in the syntax mentioned in OptionsGroup
  • Method Details

    • addOption

      public void addOption(String option)
      Adds a option definition to this group. The option syntax can be "propertyName" to denote required property and "!propertyName" to denote required absence of a property.
      Parameters:
      option - definition.
    • getName

      public String getName()
      The name of the group.
    • getOptions

      public Set<String> getOptions()
      The option definitions in this group.
    • option

      public OptionsGroup option(String option)
      Adds a option definition to this group. The option syntax can be "propertyName" to denote required property and "!propertyName" to denote required absence of a property.
      Parameters:
      option - definition.
    • options

      public OptionsGroup options(String... options)
      Adds a number of option definitions to this group. The option syntax can be "propertyName" to denote required property and "!propertyName" to denote required absence of a property.
      Parameters:
      options - options definition
    • withName

      public static OptionsGroup withName(String name)
      Creates new group with the specified name.
      Parameters:
      name - the name of the group
    • withName

      public static OptionsGroup withName(Enum<?> enumItem)
      Creates new group with the specified name of the given Enum name.
      Parameters:
      enumItem - the name of the group
      See Also:
    • withNameAndOptions

      public static OptionsGroup withNameAndOptions(String name, String... options)
      Creates new group with the specified name and option definitions.
      Parameters:
      name - the name of the group
      options - options definition