Package pl.project13.maven.validation
Class ValidationProperty
- java.lang.Object
-
- pl.project13.maven.validation.ValidationProperty
-
public class ValidationProperty extends java.lang.ObjectAllows to configure a single validation action that shall be performed when running theValidationMojo. A full configuration may like:<validationProperties> <validationProperty> <name>validating project version</name> <value>${project.version}</value> <shouldMatchTo><![CDATA[^.*(?<!-SNAPSHOT)$]]></shouldMatchTo> </validationProperty> </validationProperties>
-
-
Constructor Summary
Constructors Constructor Description ValidationProperty()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName()java.lang.StringgetShouldMatchTo()java.lang.StringgetValue()voidsetName(java.lang.String name)Sets a descriptive name that will be used to be able to identify the validation that does not match up (will be displayed in the error message).voidsetShouldMatchTo(java.lang.String shouldMatchTo)Sets the expectation what the given value should match to.voidsetValue(java.lang.String value)Sets the value that needs to be validated.
-
-
-
Method Detail
-
setName
public void setName(java.lang.String name)
Sets a descriptive name that will be used to be able to identify the validation that does not match up (will be displayed in the error message).- Parameters:
name- The name that shall be used to identify the validation
-
setValue
public void setValue(java.lang.String value)
Sets the value that needs to be validated.- Parameters:
value- The value that needs to be validated.
-
setShouldMatchTo
public void setShouldMatchTo(java.lang.String shouldMatchTo)
Sets the expectation what the given value should match to.- Parameters:
shouldMatchTo- The expectation what the given value should match to.
-
getName
public java.lang.String getName()
- Returns:
- A descriptive name that will be used to be able to identify the validation that does not match up (will be displayed in the error message).
-
getValue
public java.lang.String getValue()
- Returns:
- The value that needs to be validated.
-
getShouldMatchTo
public java.lang.String getShouldMatchTo()
- Returns:
- The expectation what the given value should match to.
-
-