Class ExpandableParameter
- java.lang.Object
-
- org.opennms.netmgt.eventd.processor.expandable.ExpandableParameter
-
- All Implemented Interfaces:
ExpandableToken
public class ExpandableParameter extends java.lang.Object implements ExpandableToken
AnExpandableParameter
requires the {@link #ExpandableParameter#parameter} to be replaced with an appropriate value. Eachtoken
may be mapped to aExpandableParameterResolver
resolving the token to a value. If no resolver is found, null is returned.- See Also:
ExpandableParameterResolverRegistry
-
-
Constructor Summary
Constructors Constructor Description ExpandableParameter(java.lang.String token, EventUtil eventUtil)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
expand(Event event, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> decode)
Expands a token.boolean
requiresTransaction()
Defines if thisExpandableToken
requires a transaction to be expanded.
-
-
-
Constructor Detail
-
ExpandableParameter
public ExpandableParameter(java.lang.String token, EventUtil eventUtil)
-
-
Method Detail
-
expand
public java.lang.String expand(Event event, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> decode)
Description copied from interface:ExpandableToken
Expands a token.- Specified by:
expand
in interfaceExpandableToken
- Parameters:
event
- An event, to expand the token from. May not be null.decode
- A Map, to help expanding the token. May be null.- Returns:
- The expanded token.
-
requiresTransaction
public boolean requiresTransaction()
Description copied from interface:ExpandableToken
Defines if thisExpandableToken
requires a transaction to be expanded.- Specified by:
requiresTransaction
in interfaceExpandableToken
- Returns:
- True if a transaction is required, False otherwise.
-
-