Package com.xwiki.licensing.test
Class TestLicensor
- java.lang.Object
-
- com.xwiki.licensing.test.TestLicensor
-
-
Constructor Summary
Constructors Constructor Description TestLicensor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.xwiki.licensing.LicensegetLicense()Retrieve the currently applicable license for the current context document if any.com.xwiki.licensing.LicensegetLicense(org.xwiki.extension.ExtensionId extensionId)Retrieve the currently applicable license for the given installed extension.com.xwiki.licensing.LicensegetLicense(org.xwiki.model.reference.EntityReference reference)Get the license applicable to the given reference.booleanhasLicensure()booleanhasLicensure(org.xwiki.extension.ExtensionId extensionId)Check if the given extension is covered by a valid license.booleanhasLicensure(org.xwiki.model.reference.EntityReference reference)Check if the given entity is covered by a valid license.
-
-
-
Method Detail
-
hasLicensure
public boolean hasLicensure(org.xwiki.model.reference.EntityReference reference)
Description copied from interface:LicensorCheck if the given entity is covered by a valid license.- Specified by:
hasLicensurein interfaceLicensor- Parameters:
reference- the reference of the entity for which licensure should be checked.- Returns:
- true if the given reference has a valid license or is not subject to licensing.
-
hasLicensure
public boolean hasLicensure(org.xwiki.extension.ExtensionId extensionId)
Description copied from interface:LicensorCheck if the given extension is covered by a valid license.- Specified by:
hasLicensurein interfaceLicensor- Parameters:
extensionId- the identifier of the extension for which licensure should be checked.- Returns:
- true if the given extension has a valid license or is not subject to licensing.
-
hasLicensure
public boolean hasLicensure()
- Specified by:
hasLicensurein interfaceLicensor- Returns:
- true if the current document has a valid license or is not subject to licensing.
-
getLicense
public com.xwiki.licensing.License getLicense()
Description copied from interface:LicensorRetrieve the currently applicable license for the current context document if any.- Specified by:
getLicensein interfaceLicensor- Returns:
- a license, or null if there is no current document, or the current document is not subject to licensing.
-
getLicense
public com.xwiki.licensing.License getLicense(org.xwiki.extension.ExtensionId extensionId)
Description copied from interface:LicensorRetrieve the currently applicable license for the given installed extension.- Specified by:
getLicensein interfaceLicensor- Parameters:
extensionId- identifier of an installed extension- Returns:
- a license, or null if the given installed extension is not subject to licensing.
-
getLicense
public com.xwiki.licensing.License getLicense(org.xwiki.model.reference.EntityReference reference)
Description copied from interface:LicensorGet the license applicable to the given reference.- Specified by:
getLicensein interfaceLicensor- Parameters:
reference- the reference to get the license from.- Returns:
- a license, or null if the given reference is not subject to licensing.
-
-