Class LicenseTemplateFormatWriter
java.lang.Object
org.spdx.licenselistpublisher.licensegenerator.LicenseTemplateFormatWriter
- All Implemented Interfaces:
ILicenseFormatWriter
Write license template format as described in the SPDX spec
- Author:
- Gary O'Neall
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetTemplateFolder(File templateFolder) voidwriteException(ListedExceptionContainer exceptionContainer) voidwriteLicense(ListedLicenseContainer licenseContainer, boolean deprecated, String deprecatedVersion) Formats and writes a specific licensevoidwriteToC()Write the Table of Contents file for the format if applicable
-
Constructor Details
-
LicenseTemplateFormatWriter
- Parameters:
templateFolder- Folder containing the template files
-
-
Method Details
-
getTemplateFolder
- Returns:
- the templateFolder
-
setTemplateFolder
- Parameters:
templateFolder- the templateFolder to set
-
writeLicense
public void writeLicense(ListedLicenseContainer licenseContainer, boolean deprecated, String deprecatedVersion) throws IOException, org.spdx.core.InvalidSPDXAnalysisException Description copied from interface:ILicenseFormatWriterFormats and writes a specific license- Specified by:
writeLicensein interfaceILicenseFormatWriter- Parameters:
licenseContainer- License to be addeddeprecated- True if deprecateddeprecatedVersion- License list version when the license was deprecated, null otherwise- Throws:
IOExceptionorg.spdx.core.InvalidSPDXAnalysisException
-
writeToC
Description copied from interface:ILicenseFormatWriterWrite the Table of Contents file for the format if applicable- Specified by:
writeToCin interfaceILicenseFormatWriter- Throws:
IOExceptionLicenseGeneratorException
-
writeException
public void writeException(ListedExceptionContainer exceptionContainer) throws IOException, LicenseGeneratorException, org.spdx.core.InvalidSPDXAnalysisException - Specified by:
writeExceptionin interfaceILicenseFormatWriter- Parameters:
exceptionContainer- Exception to be formatted and written- Throws:
IOExceptionLicenseGeneratorExceptionorg.spdx.core.InvalidSPDXAnalysisException
-