com.atlassian.jira.license
Interface LicenseDetailsFactory

All Known Implementing Classes:
LicenseDetailsFactoryImpl

@Internal
public interface LicenseDetailsFactory

Provides the ability to extract a LicenseDetails object from a license String.


Method Summary
 LicenseDetails getLicense(String licenseString)
          Converts an encrypted license string to a license details.
 boolean isDecodeable(String licenseString)
          Determines whether a license string can be decoded by this factory.
 

Method Detail

getLicense

@Nonnull
LicenseDetails getLicense(@Nullable
                                  String licenseString)
Converts an encrypted license string to a license details. This method never returns null, instead it returns a placeholder license details if the license string cannot be converted to a valid license. This placeholder is typically a NullLicenseDetails.

Parameters:
licenseString - the (usually encrypted) license string
Returns:
the corresponding license details

isDecodeable

boolean isDecodeable(@Nullable
                     String licenseString)
Determines whether a license string can be decoded by this factory. If this returns true, then getLicense is guaranteed t return a valid non-placeholder LicenseDetails object.

Parameters:
licenseString - the (usually encrypted) license string to test
Returns:
true if the license string can be interpreted by this factory, false otherwise


Copyright © 2002-2014 Atlassian. All Rights Reserved.