org.tranche.license
Class LicenseUtil
java.lang.Object
org.tranche.license.LicenseUtil
public class LicenseUtil
- extends java.lang.Object
A helper class in generating a license file.
- Author:
- Bryan Smith - bryanesmith@gmail.com, James "Augie" Hill - augman85@gmail.com
|
Field Summary |
static java.lang.String |
RECOMMENDED_LICENSE_FILE_NAME
The standard and recommended file name for the license included in the Tranche upload. |
|
Method Summary |
static java.io.File |
buildLicenseFile(java.io.File outputFile,
License license,
java.util.List<java.lang.String> additionalAgreements,
java.util.Map<java.lang.String,java.lang.String> optionalNotes)
Build a license file based on the parameters. |
static java.io.File |
buildLicenseMultiLicenseExplanationFile(java.io.File outputFile,
java.util.Map<java.lang.String,BigHash> pathsToParentHash)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RECOMMENDED_LICENSE_FILE_NAME
public static final java.lang.String RECOMMENDED_LICENSE_FILE_NAME
The standard and recommended file name for the license included in the Tranche upload.
- See Also:
- Constant Field Values
LicenseUtil
public LicenseUtil()
buildLicenseFile
public static java.io.File buildLicenseFile(java.io.File outputFile,
License license,
java.util.List<java.lang.String> additionalAgreements,
java.util.Map<java.lang.String,java.lang.String> optionalNotes)
throws java.lang.Exception
Build a license file based on the parameters.
- Parameters:
outputFile - File for the output. Note that if file does not exist, will be created.license - The License object representing the selected license or waiver.additionalAgreements - Any addition required statements of agreement. Can be null.optionalNotes - Any additional optional notes. Can be null.
- Returns:
- The file with the license information. (The same file as parameter outputFile.)
- Throws:
java.lang.Exception
buildLicenseMultiLicenseExplanationFile
public static java.io.File buildLicenseMultiLicenseExplanationFile(java.io.File outputFile,
java.util.Map<java.lang.String,BigHash> pathsToParentHash)
throws java.lang.Exception
- Parameters:
outputFile - license - additionalAgreements - optionalNotes -
- Returns:
-
- Throws:
java.lang.Exception
This code is free for use both commercially and non-commercially as stated in the project's license