Class GrainsRegEx
- java.lang.Object
-
- com.suse.salt.netapi.datatypes.target.GrainsRegEx
-
-
Field Summary
Fields Modifier and Type Field Description static charDEFAULT_DELIMITERprotected chardelimiterprotected Stringkeyprotected Ttargetprotected TargetTypetypeprotected Stringvalue
-
Constructor Summary
Constructors Constructor Description GrainsRegEx(String target)Creates a grains matcherGrainsRegEx(String target, char delimiter)Creates a grains matcherGrainsRegEx(String grain, String regex)Creates a grains matcherGrainsRegEx(String grain, String regex, char delimiter)Creates a grains matcher
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description chargetDelimiter()StringgetKey()Map<String,Object>getProps()TgetTarget()TargetTypegetType()StringgetValue()
-
-
-
Field Detail
-
DEFAULT_DELIMITER
public static final char DEFAULT_DELIMITER
- See Also:
- Constant Field Values
-
key
protected final String key
-
value
protected final String value
-
delimiter
protected final char delimiter
-
target
protected final T target
-
type
protected final TargetType type
-
-
Constructor Detail
-
GrainsRegEx
public GrainsRegEx(String target)
Creates a grains matcher- Parameters:
target- the targeting expression
-
GrainsRegEx
public GrainsRegEx(String target, char delimiter)
Creates a grains matcher- Parameters:
target- the targeting expressiondelimiter- the character to delimit nesting in the grain name
-
GrainsRegEx
public GrainsRegEx(String grain, String regex)
Creates a grains matcher- Parameters:
grain- the grain nameregex- the regular expression to match
-
-
Method Detail
-
getKey
public String getKey()
- Returns:
- the grain name of this matcher
-
getValue
public String getValue()
- Returns:
- the value to match the grain
-
getDelimiter
public char getDelimiter()
- Returns:
- the delimiter used by this target
-
getProps
public Map<String,Object> getProps()
- Returns:
- a map of items to include in the API call payload This will include the 'delimiter' key if not using the default delimiter.
-
getTarget
public T getTarget()
-
getType
public TargetType getType()
-
-