Class CommandLineCriterion
java.lang.Object
org.metricshub.maven.plugin.connector.producer.model.criteria.AbstractCriterion
org.metricshub.maven.plugin.connector.producer.model.criteria.CommandLineCriterion
Represents a criterion for filtering based on a command line.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCommandLineCriterion(com.fasterxml.jackson.databind.JsonNode criterion) Constructs CommandLineCriterion with the specified JSON criterion. -
Method Summary
Modifier and TypeMethodDescriptiongetCommandLineOrDefault(String defaultValue) Gets the command line from the criterion, or a default value if not present.booleanisExecuteLocallyOrDefault(boolean defaultValue) Checks if the execution should be performed locally.voidproduce(org.apache.maven.doxia.sink.Sink sink) Produces the command line criterion as a list item.
-
Constructor Details
-
CommandLineCriterion
public CommandLineCriterion(com.fasterxml.jackson.databind.JsonNode criterion) Constructs CommandLineCriterion with the specified JSON criterion.- Parameters:
criterion- The JSON criterion for command line.
-
-
Method Details
-
isExecuteLocallyOrDefault
public boolean isExecuteLocallyOrDefault(boolean defaultValue) Checks if the execution should be performed locally.- Parameters:
defaultValue- The default value to return if the executeLocally node is not present.- Returns:
trueif execution should be performed locally,falseotherwise.
-
getCommandLineOrDefault
Gets the command line from the criterion, or a default value if not present.- Parameters:
defaultValue- The default value to return if the command line is not present.- Returns:
- The command line from the criterion, or the default value if not present.
-
produce
public void produce(org.apache.maven.doxia.sink.Sink sink) Produces the command line criterion as a list item.- Specified by:
producein classAbstractCriterion- Parameters:
sink- The sink to write to.
-