From a421c5f9527ccd5bb8e6131111028513c6f07f12 Mon Sep 17 00:00:00 2001 From: Jeremy Long Date: Sat, 10 May 2014 06:57:44 -0400 Subject: [PATCH] added displayFileName field to the dependency class Former-commit-id: 0b4af6346a1bfd1034a3b65e766c11a42dfcdf65 --- .../dependency/Dependency.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/dependency-check-core/src/main/java/org/owasp/dependencycheck/dependency/Dependency.java b/dependency-check-core/src/main/java/org/owasp/dependencycheck/dependency/Dependency.java index 18965edc5..08ddd9819 100644 --- a/dependency-check-core/src/main/java/org/owasp/dependencycheck/dependency/Dependency.java +++ b/dependency-check-core/src/main/java/org/owasp/dependencycheck/dependency/Dependency.java @@ -177,6 +177,33 @@ public class Dependency implements Comparable { this.filePath = filePath; } + /** + * The file name to display in reports. + */ + private String displayName = null; + + /** + * Sets the file name to display in reports. + * + * @param displayName the name to display + */ + public void setDisplayFileName(String displayName) { + this.displayName = displayName; + } + + /** + * Returns the file name to display in reports; if no display file name has been set it will default to the actual + * file name. + * + * @return the file name to display + */ + public String getDisplayFileName() { + if (displayName == null) { + return this.fileName; + } + return this.displayName; + } + /** *

* Gets the file path of the dependency.