Class Dependency

java.lang.Object
com.vaadin.appsec.backend.model.dto.Dependency
All Implemented Interfaces:
Serializable

public class Dependency extends Object implements Serializable
DTO for a dependency instance, used in the UI.
See Also:
  • Constructor Details

    • Dependency

      public Dependency(@NotNull @NotNull Ecosystem ecosystem, String group, @NotNull @NotNull String name, @NotNull @NotNull String version)
      Instantiates a new Dependency dto.
      Parameters:
      group - the group
      name - the name
      version - the version
  • Method Details

    • getEcosystem

      public Ecosystem getEcosystem()
      Gets the dependency ecosystem.
      Returns:
      the ecosystem
    • setEcosystem

      public void setEcosystem(Ecosystem ecosystem)
      Sets the dependency ecosystem.
      Parameters:
      ecosystem - the ecosystem
    • getGroup

      public String getGroup()
      Gets group.
      Returns:
      the group
    • setGroup

      public void setGroup(String group)
      Sets group.
      Parameters:
      group - the group
    • getName

      public String getName()
      Gets name.
      Returns:
      the name
    • setName

      public void setName(String name)
      Sets name.
      Parameters:
      name - the name
    • getVersion

      public String getVersion()
      Gets version.
      Returns:
      the version
    • setVersion

      public void setVersion(String version)
      Sets version.
      Parameters:
      version - the version
    • getParentBomRef

      public String getParentBomRef()
      Gets parent dependency's BOM reference (purl).
      Returns:
      the parent dependency's BOM reference (purl)
    • setParentBomRef

      public void setParentBomRef(String parentBomRef)
      Sets parent dependency's BOM reference (purl).
      Parameters:
      parentBomRef - the parent dependency's BOM reference (purl)
    • getNumOfVulnerabilities

      public Integer getNumOfVulnerabilities()
      Gets num of vulnerabilities.
      Returns:
      the num of vulnerabilities
    • setNumOfVulnerabilities

      public void setNumOfVulnerabilities(Integer numOfVulnerabilities)
      Sets num of vulnerabilities.
      Parameters:
      numOfVulnerabilities - the num of vulnerabilities
    • getSeverityLevel

      public SeverityLevel getSeverityLevel()
      Gets severity level.
      Returns:
      the severity level
    • setSeverityLevel

      public void setSeverityLevel(SeverityLevel severityLevel)
      Sets severity level.
      Parameters:
      severityLevel - the severity level
    • getRiskScore

      public Double getRiskScore()
      Gets risk score.
      Returns:
      the risk score
    • setRiskScore

      public void setRiskScore(Double riskScore)
      Sets risk score.
      Parameters:
      riskScore - the risk score
    • getCvssString

      public String getCvssString()
      Gets CVSS string.
      Returns:
      the CVSS string
    • setCvssString

      public void setCvssString(String cvssString)
      Sets CVSS string.
      Parameters:
      cvssString - the CVSS string
    • isDevDependency

      public boolean isDevDependency()
      Shows if a npm dependency is a dev dependency. For the Maven dependencies this is always false.
      Returns:
      true if the npm dependency is a dev dependency, otherwise false
    • setDevDependency

      public void setDevDependency(boolean devDependency)
      Sets the npm dev dependency. For the Maven dependencies this should be set to false.
      Parameters:
      devDependency - the npm dev dependency
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object