Package org.apache.creadur.whisker.model
Class License
java.lang.Object
org.apache.creadur.whisker.model.License
- All Implemented Interfaces:
Comparable<License>
Describes a software license.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
Gets 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.int
hashCode()
boolean
Is 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
Stores the license by its id.- Parameters:
map
- not null- Returns:
- the license stored
-
getId
Gets the unique identifier for this license.- Returns:
- not null
-
getURL
Gets a locator for this license.- Returns:
- not null
-
getName
Gets a name for this license suitable for display.- Returns:
- not null
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<License>
- See Also:
-
toString
-