Class HintRule


  • @NotThreadSafe
    public class HintRule
    extends java.lang.Object
    A collection of product and vendor evidence to match; if any evidence is matched the addVendor and addProduct evidence should be added to the dependency.
    Author:
    Jeremy Long
    • Constructor Summary

      Constructors 
      Constructor Description
      HintRule()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAddProduct​(java.lang.String source, java.lang.String name, java.lang.String value, Confidence confidence)
      Adds a given product to the list of evidence to add when matched.
      void addAddVendor​(java.lang.String source, java.lang.String name, java.lang.String value, Confidence confidence)
      Adds a given vendor to the list of evidence to add when matched.
      void addAddVersion​(java.lang.String source, java.lang.String name, java.lang.String value, Confidence confidence)
      Adds a given version to the list of evidence to add when matched.
      void addFilename​(PropertyType filename)
      Adds the filename evidence to the collection.
      void addGivenProduct​(java.lang.String source, java.lang.String name, java.lang.String value, boolean regex, Confidence confidence)
      Adds a given product to the list of evidence to matched.
      void addGivenVendor​(java.lang.String source, java.lang.String name, java.lang.String value, boolean regex, Confidence confidence)
      Adds a given vendors to the list of evidence to matched.
      void addGivenVersion​(java.lang.String source, java.lang.String name, java.lang.String value, boolean regex, Confidence confidence)
      Adds a given version to the list of evidence to match.
      void addRemoveProduct​(java.lang.String source, java.lang.String name, java.lang.String value, boolean regex, Confidence confidence)
      Adds a given product to the list of evidence to remove when matched.
      void addRemoveVendor​(java.lang.String source, java.lang.String name, java.lang.String value, boolean regex, Confidence confidence)
      Adds a given vendor to the list of evidence to remove when matched.
      void addRemoveVersion​(java.lang.String source, java.lang.String name, java.lang.String value, boolean regex, Confidence confidence)
      Adds a given version to the list of evidence to remove when matched.
      java.util.List<Evidence> getAddProduct()
      Get the value of addProduct.
      java.util.List<Evidence> getAddVendor()
      Get the value of addVendor.
      java.util.List<Evidence> getAddVersion()
      Get the value of addVersion.
      java.util.List<PropertyType> getFileNames()
      Returns the list of fileName evidence to match against.
      java.util.List<EvidenceMatcher> getGivenProduct()
      Get the value of givenProduct.
      java.util.List<EvidenceMatcher> getGivenVendor()
      Get the value of givenVendor.
      java.util.List<EvidenceMatcher> getGivenVersion()
      Get the value of givenVersion.
      java.util.List<EvidenceMatcher> getRemoveProduct()
      Get the value of removeProduct.
      java.util.List<EvidenceMatcher> getRemoveVendor()
      Get the value of removeVendor.
      java.util.List<EvidenceMatcher> getRemoveVersion()
      Get the value of removeVersion.
      • Methods inherited from class java.lang.Object

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

      • HintRule

        public HintRule()
    • Method Detail

      • addFilename

        public void addFilename​(PropertyType filename)
        Adds the filename evidence to the collection.
        Parameters:
        filename - the filename to add
      • getFileNames

        public java.util.List<PropertyType> getFileNames()
        Returns the list of fileName evidence to match against.
        Returns:
        the list of fileName evidence to match against
      • addGivenProduct

        public void addGivenProduct​(java.lang.String source,
                                    java.lang.String name,
                                    java.lang.String value,
                                    boolean regex,
                                    Confidence confidence)
        Adds a given product to the list of evidence to matched.
        Parameters:
        source - the source of the evidence
        name - the name of the evidence
        value - the value of the evidence
        regex - whether value is a regex
        confidence - the confidence of the evidence
      • getGivenProduct

        public java.util.List<EvidenceMatcher> getGivenProduct()
        Get the value of givenProduct.
        Returns:
        the value of givenProduct
      • addGivenVendor

        public void addGivenVendor​(java.lang.String source,
                                   java.lang.String name,
                                   java.lang.String value,
                                   boolean regex,
                                   Confidence confidence)
        Adds a given vendors to the list of evidence to matched.
        Parameters:
        source - the source of the evidence
        name - the name of the evidence
        value - the value of the evidence
        regex - whether value is a regex
        confidence - the confidence of the evidence
      • getGivenVendor

        public java.util.List<EvidenceMatcher> getGivenVendor()
        Get the value of givenVendor.
        Returns:
        the value of givenVendor
      • addAddProduct

        public void addAddProduct​(java.lang.String source,
                                  java.lang.String name,
                                  java.lang.String value,
                                  Confidence confidence)
        Adds a given product to the list of evidence to add when matched.
        Parameters:
        source - the source of the evidence
        name - the name of the evidence
        value - the value of the evidence
        confidence - the confidence of the evidence
      • getAddProduct

        public java.util.List<Evidence> getAddProduct()
        Get the value of addProduct.
        Returns:
        the value of addProduct
      • addAddVersion

        public void addAddVersion​(java.lang.String source,
                                  java.lang.String name,
                                  java.lang.String value,
                                  Confidence confidence)
        Adds a given version to the list of evidence to add when matched.
        Parameters:
        source - the source of the evidence
        name - the name of the evidence
        value - the value of the evidence
        confidence - the confidence of the evidence
      • getAddVersion

        public java.util.List<Evidence> getAddVersion()
        Get the value of addVersion.
        Returns:
        the value of addVersion
      • addAddVendor

        public void addAddVendor​(java.lang.String source,
                                 java.lang.String name,
                                 java.lang.String value,
                                 Confidence confidence)
        Adds a given vendor to the list of evidence to add when matched.
        Parameters:
        source - the source of the evidence
        name - the name of the evidence
        value - the value of the evidence
        confidence - the confidence of the evidence
      • getAddVendor

        public java.util.List<Evidence> getAddVendor()
        Get the value of addVendor.
        Returns:
        the value of addVendor
      • addRemoveVendor

        public void addRemoveVendor​(java.lang.String source,
                                    java.lang.String name,
                                    java.lang.String value,
                                    boolean regex,
                                    Confidence confidence)
        Adds a given vendor to the list of evidence to remove when matched.
        Parameters:
        source - the source of the evidence
        name - the name of the evidence
        value - the value of the evidence
        regex - whether value is a regex
        confidence - the confidence of the evidence
      • getRemoveVendor

        public java.util.List<EvidenceMatcher> getRemoveVendor()
        Get the value of removeVendor.
        Returns:
        the value of removeVendor
      • addRemoveProduct

        public void addRemoveProduct​(java.lang.String source,
                                     java.lang.String name,
                                     java.lang.String value,
                                     boolean regex,
                                     Confidence confidence)
        Adds a given product to the list of evidence to remove when matched.
        Parameters:
        source - the source of the evidence
        name - the name of the evidence
        value - the value of the evidence
        regex - whether value is a regex
        confidence - the confidence of the evidence
      • getRemoveProduct

        public java.util.List<EvidenceMatcher> getRemoveProduct()
        Get the value of removeProduct.
        Returns:
        the value of removeProduct
      • addRemoveVersion

        public void addRemoveVersion​(java.lang.String source,
                                     java.lang.String name,
                                     java.lang.String value,
                                     boolean regex,
                                     Confidence confidence)
        Adds a given version to the list of evidence to remove when matched.
        Parameters:
        source - the source of the evidence
        name - the name of the evidence
        value - the value of the evidence
        regex - whether value is a regex
        confidence - the confidence of the evidence
      • getRemoveVersion

        public java.util.List<EvidenceMatcher> getRemoveVersion()
        Get the value of removeVersion.
        Returns:
        the value of removeVersion
      • addGivenVersion

        public void addGivenVersion​(java.lang.String source,
                                    java.lang.String name,
                                    java.lang.String value,
                                    boolean regex,
                                    Confidence confidence)
        Adds a given version to the list of evidence to match.
        Parameters:
        source - the source of the evidence
        name - the name of the evidence
        value - the value of the evidence
        regex - whether value is a regex
        confidence - the confidence of the evidence
      • getGivenVersion

        public java.util.List<EvidenceMatcher> getGivenVersion()
        Get the value of givenVersion.
        Returns:
        the value of givenVersion