Class ValidationProperty


  • public class ValidationProperty
    extends java.lang.Object
    Allows to configure a single validation action that shall be performed when running the ValidationMojo. A full configuration may like:
    
     <validationProperties>
       <validationProperty>
         <name>validating project version</name>
         <value>${project.version}</value>
         <shouldMatchTo><![CDATA[^.*(?<!-SNAPSHOT)$]]></shouldMatchTo>
       </validationProperty>
     </validationProperties>
     
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()  
      java.lang.String getShouldMatchTo()  
      java.lang.String getValue()  
      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).
      void setShouldMatchTo​(java.lang.String shouldMatchTo)
      Sets the expectation what the given value should match to.
      void setValue​(java.lang.String value)
      Sets the value that needs to be validated.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ValidationProperty

        public ValidationProperty()
    • 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.