com.atlassian.upm.license.compatibility
Class OnDemandCompatiblePluginLicenseManager

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

public class OnDemandCompatiblePluginLicenseManager
extends java.lang.Object
implements CompatiblePluginLicenseManager

This CompatiblePluginLicenseManager is used in On Demand environments. In an On Demand environment it acts as the default CompatiblePluginLicenseManager would normally, but with one exception: the license administration URL always points back to the default implementation.


Constructor Summary
OnDemandCompatiblePluginLicenseManager(LegacyCompatiblePluginLicenseManager legacyPluginLicenseManager, CompatiblePluginLicenseManager defaultPluginLicenseManager)
           
 
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

OnDemandCompatiblePluginLicenseManager

public OnDemandCompatiblePluginLicenseManager(LegacyCompatiblePluginLicenseManager legacyPluginLicenseManager,
                                              CompatiblePluginLicenseManager defaultPluginLicenseManager)
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.