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 |
- Source:
Properties
attributionRequired
#
Properties:
| Name | Type | Description |
|---|---|---|
attributionRequired |
boolean | does the author need to be attributed on reuse? |
- Source:
deedUrl
#
Properties:
| Name | Type | Description |
|---|---|---|
deedUrl |
string | URL to the description of the license (e.g. the CC deed) |
- Source:
internalName
#
Properties:
| Name | Type | Description |
|---|---|---|
internalName |
string | internal name of the license, used for localization (e.g. cc-by-sa ) |
- Source:
longName
#
Properties:
| Name | Type | Description |
|---|---|---|
longName |
string | full name of the license (e.g. Creative Commons etc. etc.) |
- Source:
nonFree
#
Properties:
| Name | Type | Description |
|---|---|---|
nonFree |
boolean | is this a non-free license? |
- Source:
shortName
#
Properties:
| Name | Type | Description |
|---|---|---|
shortName |
string | short (abbreviated) name of the license (e.g. CC-BY-SA-3.0) |
- Source:
Methods
getShortLink() → {string}
#
Returns a short HTML representation of the license.
Returns:
- Type
- string
- Source:
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
- Source:
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
- Source:
isFree() → {boolean}
#
Check whether this is a free license.
Returns:
- Type
- boolean
- Source:
isPd() → {boolean}
#
Check whether this is a public domain "license".
Returns:
- Type
- boolean
- Source:
needsAttribution() → {boolean}
#
Check whether reusers need to attribute the author
Returns:
- Type
- boolean
- Source: