com.atlassian.upm.license.compatibility
Class UpmCompatiblePluginLicenseManager

java.lang.Object
  extended by com.atlassian.upm.license.compatibility.UpmCompatiblePluginLicenseManager
All Implemented Interfaces:
CompatiblePluginLicenseManager

public class UpmCompatiblePluginLicenseManager
extends java.lang.Object
implements CompatiblePluginLicenseManager

The UPM 2.0 enabled implementation of CompatiblePluginLicenseManager. This implementation is used if UPM 2.0 is installed on the current product installation. This implementation exists such that versions of plugins that use this SPI will be compatible with both UPM 1.x and 2.0.


Constructor Summary
UpmCompatiblePluginLicenseManager(CompatiblePluginLicenseManager defaultPluginLicenseManager, com.atlassian.upm.api.license.PluginLicenseManager licenseManager, java.lang.String pluginKey)
           
 
Method Summary
 com.atlassian.extras.api.ProductLicense getCurrentLicense()
          Returns the current plugin license
 CompatibleLicenseStatus getCurrentLicenseStatus()
          Returns the status of the current plugin license
 com.atlassian.extras.api.ProductLicense getLicense(java.lang.String rawLicense)
          Returns the ProductLicense for the given license string.
 CompatibleLicenseStatus getLicenseStatus(java.lang.String rawLicense)
          Returns the status of the given license
 java.net.URI getPluginLicenseAdministrationUri()
          Returns the URI for the plugin license administration screen for this specific plugin.
 com.atlassian.extras.api.ProductLicense setLicense(java.lang.String rawLicense)
          Set the current plugin license.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpmCompatiblePluginLicenseManager

public UpmCompatiblePluginLicenseManager(CompatiblePluginLicenseManager defaultPluginLicenseManager,
                                         com.atlassian.upm.api.license.PluginLicenseManager licenseManager,
                                         java.lang.String pluginKey)
Method Detail

setLicense

public com.atlassian.extras.api.ProductLicense setLicense(java.lang.String rawLicense)
Description copied from interface: CompatiblePluginLicenseManager
Set the current plugin license.

Specified by:
setLicense in interface CompatiblePluginLicenseManager
Parameters:
rawLicense - the new plugin license
Returns:
the new plugin license

getCurrentLicense

public com.atlassian.extras.api.ProductLicense getCurrentLicense()
Description copied from interface: CompatiblePluginLicenseManager
Returns the current plugin license

Specified by:
getCurrentLicense in interface CompatiblePluginLicenseManager
Returns:
the current plugin license

getLicense

public com.atlassian.extras.api.ProductLicense getLicense(java.lang.String rawLicense)
Description copied from interface: CompatiblePluginLicenseManager
Returns the ProductLicense for the given license string.

Specified by:
getLicense in interface CompatiblePluginLicenseManager
Parameters:
rawLicense - the license string
Returns:
the ProductLicense

getCurrentLicenseStatus

public CompatibleLicenseStatus getCurrentLicenseStatus()
Description copied from interface: CompatiblePluginLicenseManager
Returns the status of the current plugin license

Specified by:
getCurrentLicenseStatus in interface CompatiblePluginLicenseManager
Returns:
the status of the current plugin license

getLicenseStatus

public CompatibleLicenseStatus getLicenseStatus(java.lang.String rawLicense)
Description copied from interface: CompatiblePluginLicenseManager
Returns the status of the given license

Specified by:
getLicenseStatus in interface CompatiblePluginLicenseManager
Parameters:
rawLicense - the license string
Returns:
the status of the license

getPluginLicenseAdministrationUri

public java.net.URI getPluginLicenseAdministrationUri()
Description copied from interface: CompatiblePluginLicenseManager
Returns the URI for the plugin license administration screen for this specific plugin. The returned URI should be relative to the product's base url, e.g. "/plugins/servlet/upm#manage/com.example.sampleplugin"

Specified by:
getPluginLicenseAdministrationUri in interface CompatiblePluginLicenseManager
Returns:
the URI for the plugin license administration screen for this specific plugin.


Copyright © 2012 Atlassian Pty Ltd. All Rights Reserved.