public class VulnerabilitiesLoader extends Object
Vulnerability
from a XML file for a given Locale
.Vulnerability
Constructor and Description |
---|
VulnerabilitiesLoader(Path directory,
String fileName,
String fileExtension)
Constructs a
VulnerabilitiesLoader that loads the resource XML files from the given
directory with the given fileName and fileExtension . |
Modifier and Type | Method and Description |
---|---|
List<Vulnerability> |
load(Locale locale)
Returns an unmodifiable
List of Vulnerability s for the given locale . |
public VulnerabilitiesLoader(Path directory, String fileName, String fileExtension)
VulnerabilitiesLoader
that loads the resource XML files from the given
directory
with the given fileName
and fileExtension
.directory
- the directory where the XML files are locatedfileName
- the name of the XML files that contains the vulnerabilitiesfileExtension
- the extension (with dot) of the XML files that contains the
vulnerabilitiesIllegalArgumentException
- if directory
is null
or if fileName
and fileExtension
are null
or emptypublic List<Vulnerability> load(Locale locale)
List
of Vulnerability
s for the given locale
.
If there's no perfect match for the given locale
the default will be returned, if
available. The list will be empty if an error occurs.
locale
- the locale that will Vulnerability
s will be loadedList
of Vulnerability
s for the given locale