Class ECtransOption<T>
java.lang.Object
ecmwf.common.ectrans.ECtransOption<T>
- Type Parameters:
T- the generic type
- All Implemented Interfaces:
ECtransOptionDefinition
The Class ECtransOption.
- Author:
- root
-
Constructor Summary
ConstructorsConstructorDescriptionECtransOption(ECtransGroups group, String module, String name, Class<T> clazz, List<T> defaultValues, List<T> choices) Instantiates a new ectrans option.ECtransOption(ECtransGroups group, String module, String name, Class<T> clazz, List<T> defaultValues, List<T> choices, List<SubOption> subOptions, boolean freeFormSubOptions) Instantiates a new ectrans option, additionally describing the nested key=value entries expected inside its value (as parsed byOptions), if any.ECtransOption(ECtransGroups group, String module, String name, Class<T> clazz, List<T> defaultValues, List<T> choices, List<SubOption> subOptions, boolean freeFormSubOptions, Properties metadata) Builds an option using extension-owned help, visibility and redaction metadata. -
Method Summary
Modifier and TypeMethodDescriptionGets the choices.getClazz()Gets the clazz.protected StringgetComment(boolean detailed) Gets the comment.protected TGets the default value.Gets the default values.getGroup()Gets the group.Gets the module.getName()Gets the name.Gets the parameter.Gets the known nested key=value entries expected inside this option's value, if any.protected StringgetTips()Gets the tips.booleanChecks if this option's value holds arbitrary/free-form nested key=value entries (e.g.booleanChecks if is secured.booleanChecks if is visible.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ECtransOptionDefinition
getChoicesAsStrings, getDefaultString, getDefaultValue, getDefaultValues, getFullName
-
Constructor Details
-
ECtransOption
public ECtransOption(ECtransGroups group, String module, String name, Class<T> clazz, List<T> defaultValues, List<T> choices) Instantiates a new ectrans option.- Parameters:
group- the groupmodule- the modulename- the nameclazz- the clazzdefaultValues- the default valueschoices- the choices
-
ECtransOption
public ECtransOption(ECtransGroups group, String module, String name, Class<T> clazz, List<T> defaultValues, List<T> choices, List<SubOption> subOptions, boolean freeFormSubOptions) Instantiates a new ectrans option, additionally describing the nested key=value entries expected inside its value (as parsed byOptions), if any.- Parameters:
group- the groupmodule- the modulename- the nameclazz- the clazzdefaultValues- the default valueschoices- the choicessubOptions- the known nested key=value entries, or an empty list if not applicablefreeFormSubOptions- true if the value holds arbitrary/free-form nested key=value entries (e.g. HTTP headers) rather than a fixed/known set
-
ECtransOption
public ECtransOption(ECtransGroups group, String module, String name, Class<T> clazz, List<T> defaultValues, List<T> choices, List<SubOption> subOptions, boolean freeFormSubOptions, Properties metadata) Builds an option using extension-owned help, visibility and redaction metadata. Metadata keys use the same parameter.tips/visible/secured format as built-in options.
-
-
Method Details
-
getOption
- Specified by:
getOptionin interfaceECtransOptionDefinition
-
getParameter
Gets the parameter.- Specified by:
getParameterin interfaceECtransOptionDefinition- Returns:
- the parameter
-
getGroup
Gets the group.- Specified by:
getGroupin interfaceECtransOptionDefinition- Returns:
- the group
-
getModule
Gets the module.- Specified by:
getModulein interfaceECtransOptionDefinition- Returns:
- the module
-
getName
Gets the name.- Specified by:
getNamein interfaceECtransOptionDefinition- Returns:
- the name
-
getTips
-
getClazz
Gets the clazz.- Specified by:
getClazzin interfaceECtransOptionDefinition- Returns:
- the clazz
-
getComment
Gets the comment.- Parameters:
detailed- the detailed- Returns:
- the comment
-
getDefaultValue
-
getDefaultValues
-
getChoices
-
getSubOptions
Gets the known nested key=value entries expected inside this option's value, if any.- Specified by:
getSubOptionsin interfaceECtransOptionDefinition- Returns:
- the sub options, or an empty list if not applicable
-
hasFreeFormSubOptions
public boolean hasFreeFormSubOptions()Checks if this option's value holds arbitrary/free-form nested key=value entries (e.g. HTTP headers) rather than a fixed/known set described bygetSubOptions().- Specified by:
hasFreeFormSubOptionsin interfaceECtransOptionDefinition- Returns:
- true, if the nested entries are free-form
-
isVisible
public boolean isVisible()Checks if is visible.- Specified by:
isVisiblein interfaceECtransOptionDefinition- Returns:
- true, if is visible
-
isSecured
public boolean isSecured()Checks if is secured.- Specified by:
isSecuredin interfaceECtransOptionDefinition- Returns:
- true, if is secured
-