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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OptionsGroup(String name)
Creates new namedOptionsGroup
.OptionsGroup(String name, Collection<String> options)
Creates new namedOptionsGroup
with a set of option definitions.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOption(String option)
Adds a option definition to this group.String
getName()
The name of the group.Set<String>
getOptions()
The option definitions in this group.OptionsGroup
option(String option)
Adds a option definition to this group.OptionsGroup
options(String... options)
Adds a number of option definitions to this group.static OptionsGroup
withName(Enum<?> enumItem)
Creates new group with the specified name of the givenEnum
name.static OptionsGroup
withName(String name)
Creates new group with the specified name.static OptionsGroup
withNameAndOptions(String name, String... options)
Creates new group with the specified name and option definitions.
-
-
-
Constructor Detail
-
OptionsGroup
public OptionsGroup(String name)
Creates new namedOptionsGroup
.- Parameters:
name
- the name of the group
-
OptionsGroup
public OptionsGroup(String name, Collection<String> options)
Creates new namedOptionsGroup
with a set of option definitions.- Parameters:
name
- the name of the groupoptions
- names of properties in the syntax mentioned inOptionsGroup
-
-
Method Detail
-
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.
-
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 givenEnum
name.- Parameters:
enumItem
- the name of the group- See Also:
Enum.name()
-
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 groupoptions
- options definition
-
-