Constructor
new License(shortName, [internalName], [longName], [deedUrl], [attributionRequired], [nonFree])
#
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
shortName |
string | see |
|
internalName |
string |
optional |
see |
longName |
string |
optional |
see |
deedUrl |
string |
optional |
see |
attributionRequired |
boolean |
optional |
|
nonFree |
boolean |
optional |
see |
Properties
attributionRequired :boolean
#
does the author need to be attributed on reuse?
Type:
- boolean
deedUrl :string
#
URL to the description of the license (e.g. the CC deed)
Type:
- string
internalName :string
#
internal name of the license, used for localization (e.g. cc-by-sa )
Type:
- string
longName :string
#
full name of the license (e.g. Creative Commons etc. etc.)
Type:
- string
nonFree :boolean
#
shortName :string
#
short (abbreviated) name of the license (e.g. CC-BY-SA-3.0)
Type:
- string
Methods
getShortLink() → {string}
#
Returns a short HTML representation of the license.
Returns:
- Type
- string
getShortName() → {string}
#
Returns the short name of the license:
- if we have interface messages for this license (basically just CC and PD), use those
- otherwise use the short name from the license template (might or might not be translated still, depending on how the template is set up)
Returns:
FIXME a model should not depend on an i18n class. We should probably use view models.
- Type
- string
Returns the short name of the license:
- if we have interface messages for this license (basically just CC and PD), use those
- otherwise use the short name from the license template (might or might not be translated still, depending on how the template is set up)
isCc() → {boolean}
#
Check whether this is a Creative Commons license.
Returns:
- Type
- boolean
isFree() → {boolean}
#
Check whether this is a free license.
Returns:
- Type
- boolean
isPd() → {boolean}
#
Check whether this is a public domain "license".
Returns:
- Type
- boolean
needsAttribution() → {boolean}
#
Check whether reusers need to attribute the author
Returns:
- Type
- boolean