Class CommandLineCriterion
java.lang.Object
org.sentrysoftware.maven.metricshub.connector.producer.model.criteria.AbstractCriterion
org.sentrysoftware.maven.metricshub.connector.producer.model.criteria.CommandLineCriterion
Represents a criterion for filtering based on a command line.
- See Also:
-
Constructor Summary
ConstructorDescriptionCommandLineCriterion
(com.fasterxml.jackson.databind.JsonNode criterion) Constructs CommandLineCriterion with the specified JSON criterion. -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(ICriterionVisitor visitor) Accepts the given visitor.getCommandLineOrDefault
(String defaultValue) Gets the command line from the criterion, or a default value if not present.boolean
isExecuteLocallyOrDefault
(boolean defaultValue) Checks if the execution should be performed locally.
-
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
-
accept
Description copied from class:AbstractCriterion
Accepts the given visitor.- Specified by:
accept
in classAbstractCriterion
- Parameters:
visitor
- The visitor class with its specific business logic.
-
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:
true
if execution should be performed locally,false
otherwise.
-
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.
-