Class License
java.lang.Object
org.apache.creadur.whisker.model.License
- All Implemented Interfaces:
Comparable<License>
Describes a software license.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanGets parameters required by the template to generate a instance of this license family.getId()Gets the unique identifier for this license.getName()Gets a name for this license suitable for display.getText()Gets legal text expressing this license.Gets legal text expressing this license,getURL()Gets a locator for this license.inthashCode()booleanIs source information inclusion required by this license?Stores the license by its id.toString()
-
Constructor Details
-
License
public License(boolean isSourceRequired, String baseText, Collection<String> expectedParameters, String id, String url, String name) Constructs meta-data for a family of licenses.- Parameters:
isSourceRequired- true if this license requires information about source distribution to be included within the distributionbaseText- a template for the legal text, not nullexpectedParameters- not nullid- not nullurl- not nullname- not null
-
-
Method Details
-
isSourceRequired
public boolean isSourceRequired()Is source information inclusion required by this license?- Returns:
- true when information about the source should be included, false otherwise
-
getText
Gets legal text expressing this license.- Returns:
- not null
- Throws:
LicenseTemplateException- when the text cannot be created from the template
-
getText
Gets legal text expressing this license,- Parameters:
parameters- possibly null- Returns:
- not null
- Throws:
LicenseTemplateException- when the text cannot be created from the template
-
getExpectedParameters
Gets parameters required by the template to generate a instance of this license family.- Returns:
- not null, possibly empty
-
storeIn
-
getId
-
getURL
-
getName
-
hashCode
-
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<License>- See Also:
-
toString
-