public class License extends Object implements Comparable<License>
Constructor and Description |
---|
License(boolean isSourceRequired,
String baseText,
Collection<String> expectedParameters,
String id,
String url,
String name)
Constructs meta-data for a family of licenses.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(License other) |
boolean |
equals(Object obj) |
Collection<String> |
getExpectedParameters()
Gets parameters required by the template
to generate a instance of this license family.
|
String |
getId()
Gets the unique identifier for this license.
|
String |
getName()
Gets a name for this license suitable for
display.
|
String |
getText()
Gets legal text expressing this license.
|
String |
getText(Map<String,String> parameters)
Gets legal text expressing this license,
|
String |
getURL()
Gets a locator for this license.
|
int |
hashCode() |
boolean |
isSourceRequired()
Is source information inclusion required by this
license?
|
License |
storeIn(Map<String,License> map)
Stores the license by its id.
|
String |
toString() |
public License(boolean isSourceRequired, String baseText, Collection<String> expectedParameters, String id, String url, String name)
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 nullpublic boolean isSourceRequired()
public String getText() throws LicenseTemplateException
LicenseTemplateException
- when the text cannot
be created from the templatepublic String getText(Map<String,String> parameters) throws LicenseTemplateException
parameters
- possibly nullLicenseTemplateException
- when the text cannot
be created from the templatepublic Collection<String> getExpectedParameters()
public License storeIn(Map<String,License> map)
map
- not nullpublic String getId()
public String getURL()
public String getName()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int compareTo(License other)
compareTo
in interface Comparable<License>
Comparable.compareTo(java.lang.Object)
Copyright © 2011–1970 Apache Software Foundation. All rights reserved.