Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.owasp.dependencycheck.dependency
Class VulnerableSoftware

    java.lang.Object
      org.owasp.dependencycheck.data.cpe.IndexEntry
          org.owasp.dependencycheck.dependency.VulnerableSoftware

All Implemented Interfaces:
  Serializable, Comparable<VulnerableSoftware>

    public class VulnerableSoftware

extends IndexEntry
implements Serializable, Comparable<VulnerableSoftware>

A record containing information about vulnerable software. This is referenced from a vulnerability.

Author:
  Jeremy Long (jeremy.long@owasp.org)
See Also:
  Serialized Form

Constructor Summary
`VulnerableSoftware()`

Method Summary
`int` | `compareTo(VulnerableSoftware vs)` Implementation of the comparable interface.
`boolean` | `equals(Object obj)` Standard equals implementation to compare this VulnerableSoftware to another object.
`String` | `getEdition()` Get the value of edition.
`String` | `getName()` Get the value of name.
`String` | `getPreviousVersion()` Get the value of previousVersion.
`String` | `getRevision()` Get the value of revision.
`String` | `getVersion()` Get the value of version.
`int` | `hashCode()` Standard implementation of hashCode.
`boolean` | `hasPreviousVersion()` Indicates if previous versions of this software are vulnerable.
`void` | `parseName(String cpeName)` Parses a name attribute value, from the cpe.xml, into its corresponding parts: vendor, product, version, revision.
`void` | `setCpe(String cpe)` Parse a CPE entry from the cpe string representation.
`void` | `setEdition(String edition)` Set the value of edition.
`void` | `setName(String name)` Set the value of name.
`void` | `setPreviousVersion(String previousVersion)` Set the value of previousVersion.
`void` | `setRevision(String revision)` Set the value of revision.
`void` | `setVersion(String version)` Set the value of version.
`String` | `toString()` Standard toString() implementation display the name and whether or not previous versions are also affected.

Methods inherited from class org.owasp.dependencycheck.data.cpe.IndexEntry
`getDocumentId, getProduct, getSearchScore, getVendor, setDocumentId, setProduct, setSearchScore, setVendor`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### VulnerableSoftware

    public VulnerableSoftware()

Method Detail

### setCpe

    public void setCpe(String cpe)

  Parse a CPE entry from the cpe string representation.

  Parameters:
    `cpe` - a cpe entry (e.g. cpe:/a:vendor:software:version)

### parseName

    public void parseName(String cpeName)
                   throws UnsupportedEncodingException

  Parses a name attribute value, from the cpe.xml, into its corresponding parts: vendor, product, version, revision.

  Example:

  `cpe:/a:apache:struts:1.1:rc2`

  Results in:

  - Vendor: apache
  - Product: struts
  - Version: 1.1
  - Revision: rc2

  Overrides:
    `parseName` in class `IndexEntry`
  Parameters:
    `cpeName` - the cpe name
  Throws:
    `UnsupportedEncodingException` - should never be thrown...

### hasPreviousVersion

    public boolean hasPreviousVersion()

  Indicates if previous versions of this software are vulnerable.

  Returns:
    if previous versions of this software are vulnerable

### getPreviousVersion

    public String getPreviousVersion()

  Get the value of previousVersion.

  Returns:
    the value of previousVersion

### setPreviousVersion

    public void setPreviousVersion(String previousVersion)

  Set the value of previousVersion.

  Parameters:
    `previousVersion` - new value of previousVersion

### equals

    public boolean equals(Object obj)

  Standard equals implementation to compare this VulnerableSoftware to another object.

  Overrides:
    `equals` in class `IndexEntry`
  Parameters:
    `obj` - the object to compare
  Returns:
    whether or not the objects are equal

### hashCode

    public int hashCode()

  Standard implementation of hashCode.

  Overrides:
    `hashCode` in class `IndexEntry`
  Returns:
    the hashCode for the object

### toString

    public String toString()

  Standard toString() implementation display the name and whether or not previous versions are also affected.

  Overrides:
    `toString` in class `IndexEntry`
  Returns:
    a string representation of the object

### compareTo

    public int compareTo(VulnerableSoftware vs)

  Implementation of the comparable interface.

  Specified by:
    `compareTo` in interface `Comparable<VulnerableSoftware>`
  Parameters:
    `vs` - the VulnerableSoftware to compare
  Returns:
    an integer indicating the ordering of the two objects

### getName

    public String getName()

  Get the value of name.

  Returns:
    the value of name

### setName

    public void setName(String name)

  Set the value of name.

  Parameters:
    `name` - new value of name

### getVersion

    public String getVersion()

  Get the value of version.

  Returns:
    the value of version

### setVersion

    public void setVersion(String version)

  Set the value of version.

  Parameters:
    `version` - new value of version

### getRevision

    public String getRevision()

  Get the value of revision.

  Returns:
    the value of revision

### setRevision

    public void setRevision(String revision)

  Set the value of revision.

  Parameters:
    `revision` - new value of revision

### getEdition

    public String getEdition()

  Get the value of edition.

  Returns:
    the value of edition

### setEdition

    public void setEdition(String edition)

  Set the value of edition.

  Parameters:
    `edition` - new value of edition

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012-2013 OWASP. All Rights Reserved.