ppt4j 1.0
 
Loading...
Searching...
No Matches
ppt4j.database.Vulnerability Interface Reference
Inheritance diagram for ppt4j.database.Vulnerability:

Public Member Functions

default int getDatabaseId ()
 
default String getCVEId ()
 
default String getProjectName ()
 
String getRepoUrl ()
 
String getPatchCommitHash ()
 
default String getDiffUrl ()
 
String getJavaSrcTopLevelDir ()
 
String getClassesTopLevelDir ()
 
default String[] getThirdPartySrcDirs ()
 
default String[] getThirdPartyLibDirs ()
 
default boolean shouldScanAllModules ()
 
default String[] getIgnoredFilePatterns ()
 
default String[] getRequiredFilePatterns ()
 
default void dump (String path)
 

Static Public Member Functions

static Vulnerability load (String path)
 

Member Function Documentation

◆ dump()

default void ppt4j.database.Vulnerability.dump ( String path)

Serializes the current object and writes it to the specified file path.

Parameters
paththe file path where the serialized object will be written

◆ getClassesTopLevelDir()

String ppt4j.database.Vulnerability.getClassesTopLevelDir ( )

This method returns the top-level directory where all the classes are located.

Returns
the top-level directory where all the classes are located

◆ getCVEId()

default String ppt4j.database.Vulnerability.getCVEId ( )

This method returns the CVE ID of the current class by retrieving the value specified in the Database annotation associated with the class.

Returns
the CVE ID of the current class

◆ getDatabaseId()

default int ppt4j.database.Vulnerability.getDatabaseId ( )

This method retrieves the database id associated with the current class by getting the Database annotation and returning its id.

Returns
the database id as an integer

◆ getDiffUrl()

default String ppt4j.database.Vulnerability.getDiffUrl ( )

This method constructs a URL that links to the diff of the commit associated with the patch. It concatenates the repository URL, the commit hash of the patch, and the file extension ".diff".

Returns
the URL string pointing to the diff of the commit associated with the patch

◆ getIgnoredFilePatterns()

default String[] ppt4j.database.Vulnerability.getIgnoredFilePatterns ( )

Returns an array of file patterns that are ignored during file processing. These patterns include files with names containing "Test", "Issue", files in src/test directory, and package-info.java files.

Returns
an array of ignored file patterns

◆ getJavaSrcTopLevelDir()

String ppt4j.database.Vulnerability.getJavaSrcTopLevelDir ( )

This method retrieves the top-level directory where the Java source files are located.

Returns
the top-level directory path for Java source files

◆ getPatchCommitHash()

String ppt4j.database.Vulnerability.getPatchCommitHash ( )

This method returns the commit hash of the latest patch applied to the software. It retrieves the commit hash from a designated source, such as a version control system.

Returns
The commit hash of the latest patch applied to the software.

◆ getProjectName()

default String ppt4j.database.Vulnerability.getProjectName ( )

This method retrieves the project name from the repository URL by extracting the substring that comes after the last occurrence of the '/' character in the URL.

Returns
the project name extracted from the repository URL

◆ getRepoUrl()

String ppt4j.database.Vulnerability.getRepoUrl ( )

This method returns the URL of the repository. The URL is typically used to access the repository for various operations such as cloning, fetching, and pushing.

Returns
the URL of the repository

◆ getRequiredFilePatterns()

default String[] ppt4j.database.Vulnerability.getRequiredFilePatterns ( )

Returns an array of required file patterns. These patterns are used to filter files based on their names. This method specifically returns a pattern for Java files.

Returns
an array of required file patterns

◆ getThirdPartyLibDirs()

default String[] ppt4j.database.Vulnerability.getThirdPartyLibDirs ( )

This method returns an array of directories where third-party libraries are stored. Since there are no third-party libraries by default, an empty array is returned.

Returns
an array of directories where third-party libraries are stored

◆ getThirdPartySrcDirs()

default String[] ppt4j.database.Vulnerability.getThirdPartySrcDirs ( )

This method returns an array of third party source directories.

Returns
an array of strings representing third party source directories

◆ load()

static Vulnerability ppt4j.database.Vulnerability.load ( String path)
static

Loads a Vulnerability object from the specified file path using deserialization.

Parameters
paththe file path of the serialized Vulnerability object
Returns
the deserialized Vulnerability object

◆ shouldScanAllModules()

default boolean ppt4j.database.Vulnerability.shouldScanAllModules ( )

This method determines whether all modules should be scanned.

Returns
false indicating that not all modules should be scanned

The documentation for this interface was generated from the following file: