Class LicenseInfoFile
- java.lang.Object
-
- se.ayoy.maven.plugins.licenseverifier.LicenseInfo.LicenseInfoFile
-
public class LicenseInfoFile extends Object
Represents the file in which licenses are categorized.
-
-
Constructor Summary
Constructors Constructor Description LicenseInfoFile(String filePathString, org.apache.maven.plugin.logging.Log log)Initialize the instance from a file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLicenseInfo(LicenseInfo licenseInfo)Add a license to the "database".LicenseInfogetLicenseInfo(String name, String url)Search for a licence using name or url.
-
-
-
Constructor Detail
-
LicenseInfoFile
public LicenseInfoFile(String filePathString, org.apache.maven.plugin.logging.Log log) throws FileNotFoundException, org.apache.maven.plugin.MojoExecutionException
Initialize the instance from a file.- Parameters:
filePathString- The path to the file.log- The log instance to be able to log.- Throws:
FileNotFoundException- thrown when the file could not be found.org.apache.maven.plugin.MojoExecutionException- thrown when something goes wrong during initialization.
-
-
Method Detail
-
getLicenseInfo
public LicenseInfo getLicenseInfo(String name, String url)
Search for a licence using name or url.- Parameters:
name- name to search for.url- url to search for.- Returns:
- the found license or null.
-
addLicenseInfo
public void addLicenseInfo(LicenseInfo licenseInfo)
Add a license to the "database".- Parameters:
licenseInfo- the license to add.
-
-