blackboard.platform
Interface LicenseManager


public interface LicenseManager

Interface for the service used to parse and validate license files. Licenses are read from a simple XML file that contains several different components to activate different parts of the application. Each component is represented by a License object.

Note: This object is primarily for Blackboard use and should be considered very unstable. It may change substantially in future releases.

Since:
7.2
Version:
$Revision: #1 $ $Date: 2007/06/27 $

Method Summary
 void assertIsLicensed(java.lang.reflect.AnnotatedElement component)
          Similar to isLicensed(), except that exceptions are thrown if the license check fails.
 void assertIsLicensed(java.lang.String componentName)
          Similar to isLicensed(), except that exceptions are thrown if the license check fails.
 java.lang.String getAppPack()
           
 java.lang.String getBuildNumber()
           
 java.lang.String getClientId()
          Returns the client id fromt the LicenseFile
 java.lang.String getFamilyNameUpdateHtml()
           
 java.lang.String getKey()
          Returns the validation key from the license file.
 java.util.Date getLicenseExpiration(java.lang.String componentName)
          Returns the expiration for a given license or null if it never expires.
 java.lang.String getLicenseParameter(java.lang.String componentName, java.lang.String propertyName)
          Returns the value of the specified property in the target key or null if the property is not found.
 java.lang.Integer getLicenseUnitsParameter(java.lang.String componentName, java.lang.String propertyName)
          Returns the Integer value of the specified property in the target key or null if the property is not found.
 java.lang.String getLongProductName()
          For the Web: HTML for bold, italic, superscript etc. tagged around each product if multiple products exist.
 java.lang.String getLongProductNameHtml()
          For the Web: HTML for bold, italic, superscript etc. tagged around each product if multiple products exist.
 java.lang.String getLongProductNameHtmlTm()
          For the Web: HTML for bold, italic, TM, superscript etc. tagged around each product if multiple products exist.
 java.lang.String getMajorReleaseNumber()
           
 java.lang.String getProductFamilyName()
          For the Web: HTML for bold, italic, superscript etc.
 java.lang.String getProductFamilyNameHtml()
          For the Web: HTML for bold, italic, superscript etc.
 java.lang.String getProductFamilyNameHtmlTm()
          For the Web: HTML for bold, italic, TM, superscript etc.
 java.lang.String getProductName()
          Returns the product name from the LicenseFile.
 java.lang.String getProductNameKey()
          Returns a key that is a transformed version of the product name (used for license-sensitive lookups)
 java.lang.String getProductOwnedId()
          Returns the product owned id fromt the LicenseFile
 java.lang.String getUpdateName()
           
 java.lang.String getUpdateNameLong()
           
 boolean isLicensed(java.lang.reflect.AnnotatedElement component)
          Method to check whether the specified component name is available and valid.
 boolean isLicensed(java.lang.String componentName)
          Method to check whether the specified component name is available and valid.
 boolean isLicenseUnitsParameterUnlimited(java.lang.String componentName, java.lang.String propertyName)
          Returns true if specified the units parameter is unlimited.
 License[] listLicenses()
          Returns an array of all License objects read from the license file.
 License lookupLicense(java.lang.String componentName)
          Returns the License associated with the specified component key.
 LicenseDescriptor lookupLicenseDescriptor(java.lang.String componentName)
          Looks up human-readable descriptor for specified component.
 void runtimeAssertIsLicensed(java.lang.reflect.AnnotatedElement component)
          Same as assertIsLicensed(), but exceptions are wrapped in a RuntimeBbServiceException.
 void runtimeAssertIsLicensed(java.lang.String componentName)
          Same as assertIsLicensed(), but exceptions are wrapped in a RuntimeBbServiceException.
 

Method Detail

getProductName

java.lang.String getProductName()
Returns the product name from the LicenseFile. The name is in the "product-name" attribute of the root <blackboard-licenses> element.

Returns:
"product-name" attribute from license file.

getProductOwnedId

java.lang.String getProductOwnedId()
Returns the product owned id fromt the LicenseFile

Returns:
"product-owned-id" attribute from the license file

getClientId

java.lang.String getClientId()
Returns the client id fromt the LicenseFile

Returns:
"client-id" attribute from the license file

getKey

java.lang.String getKey()
Returns the validation key from the license file. The key is a string representation of the license hash.

Returns:
Hash value for license.

getProductNameKey

java.lang.String getProductNameKey()
Returns a key that is a transformed version of the product name (used for license-sensitive lookups)

Returns:
key derived from the "product-name" attribute from the license file

isLicensed

boolean isLicensed(java.lang.String componentName)
Method to check whether the specified component name is available and valid. License must and pass the following checks:

Parameters:
componentName - Component to check
Returns:
True if component passes checks.

assertIsLicensed

void assertIsLicensed(java.lang.String componentName)
                      throws LicenseNotFoundException,
                             LicenseExpiredException,
                             UnlicensedServerException
Similar to isLicensed(), except that exceptions are thrown if the license check fails.

Parameters:
componentName - Component to check.
Throws:
LicenseNotFoundException - if the license is not found
LicenseExpiredException - If the license is expired
UnlicensedServerException - If the license is not valid to run on this server

runtimeAssertIsLicensed

void runtimeAssertIsLicensed(java.lang.String componentName)
                             throws RuntimeBbServiceException
Same as assertIsLicensed(), but exceptions are wrapped in a RuntimeBbServiceException. Use e.getNestedException() to get the actual LicenseException.

Parameters:
componentName - License component to check.
Throws:
RuntimeBbServiceException - If any of the checks fails.

isLicensed

boolean isLicensed(java.lang.reflect.AnnotatedElement component)
Method to check whether the specified component name is available and valid. License must and pass the following checks:

Parameters:
componentName - Component to check
Returns:
True if component passes checks.

assertIsLicensed

void assertIsLicensed(java.lang.reflect.AnnotatedElement component)
                      throws LicenseNotFoundException,
                             LicenseExpiredException,
                             UnlicensedServerException
Similar to isLicensed(), except that exceptions are thrown if the license check fails.

Parameters:
componentName - Component to check.
Throws:
LicenseNotFoundException - if the license is not found
LicenseExpiredException - If the license is expired
UnlicensedServerException - If the license is not valid to run on this server

runtimeAssertIsLicensed

void runtimeAssertIsLicensed(java.lang.reflect.AnnotatedElement component)
                             throws RuntimeBbServiceException
Same as assertIsLicensed(), but exceptions are wrapped in a RuntimeBbServiceException. Use e.getNestedException() to get the actual LicenseException.

Parameters:
componentName - License component to check.
Throws:
RuntimeBbServiceException - If any of the checks fails.

getLicenseExpiration

java.util.Date getLicenseExpiration(java.lang.String componentName)
                                    throws LicenseNotFoundException,
                                           LicenseExpiredException,
                                           UnlicensedServerException
Returns the expiration for a given license or null if it never expires.

Parameters:
componentName - License component to check
Returns:
Expiration date for the specified component
Throws:
LicenseNotFoundException - if the license is not found
LicenseExpiredException - if the license is expired
UnlicensedServerException - if the license is not valid to run on this server

getLicenseUnitsParameter

java.lang.Integer getLicenseUnitsParameter(java.lang.String componentName,
                                           java.lang.String propertyName)
                                           throws LicenseNotFoundException,
                                                  LicenseExpiredException,
                                                  UnlicensedServerException
Returns the Integer value of the specified property in the target key or null if the property is not found. Returns Integer.MAX_VALUE if the units are unlimited. Note that the system will not initialize if any unit parameter is malformed.

Parameters:
componentName - Component to check unit for
propertyName - Unit parameter to check
Returns:
Integer value of the property.
Throws:
LicenseNotFoundException - if the license is not found
LicenseExpiredException - if the license is opined
UnlicensedServerException - if the license is not valid to run on this server

isLicenseUnitsParameterUnlimited

boolean isLicenseUnitsParameterUnlimited(java.lang.String componentName,
                                         java.lang.String propertyName)
                                         throws LicenseNotFoundException,
                                                LicenseExpiredException,
                                                UnlicensedServerException
Returns true if specified the units parameter is unlimited.

Parameters:
componentName - License component to check
propertyName - Unit parameter to check
Throws:
LicenseNotFoundException - if the license is not found
LicenseExpiredException - if the license is opined
UnlicensedServerException - if the license is not valid to run on this server

getLicenseParameter

java.lang.String getLicenseParameter(java.lang.String componentName,
                                     java.lang.String propertyName)
                                     throws LicenseNotFoundException,
                                            LicenseExpiredException,
                                            UnlicensedServerException
Returns the value of the specified property in the target key or null if the property is not found.

Parameters:
componentName - License component to check
propertyName - Unit parameter to check
Throws:
LicenseNotFoundException - if the license is not found
LicenseExpiredException - if the license is opined
UnlicensedServerException - if the license is not valid to run on this server

lookupLicense

License lookupLicense(java.lang.String componentName)
                      throws LicenseNotFoundException
Returns the License associated with the specified component key.

Parameters:
componentName - License to look up
Returns:
Specified license. An exception is thrown if the license is not found.
Throws:
LicenseNotFoundException - Thrown if the specified component is not found.

lookupLicenseDescriptor

LicenseDescriptor lookupLicenseDescriptor(java.lang.String componentName)
Looks up human-readable descriptor for specified component.

Parameters:
componentName - Component to look up
Returns:
Initialized LicenseDescriptor

listLicenses

License[] listLicenses()
Returns an array of all License objects read from the license file.

Returns:
Array of License objects.

getBuildNumber

java.lang.String getBuildNumber()
Returns:
Returns the buildNumber.

getLongProductName

java.lang.String getLongProductName()
For the Web: HTML for bold, italic, superscript etc. tagged around each product if multiple products exist. No font size For the Installer/Updater: Text No Release number Multiple product names will be separated by plain-text commas which can be removed to manage the separate names Blackboard Learning System, Blackboard Portal System, currently Blackboard Learning System™ (Release 6) or Blackboard Learning System™ (Release 6)


getLongProductNameHtml

java.lang.String getLongProductNameHtml()
For the Web: HTML for bold, italic, superscript etc. tagged around each product if multiple products exist. No font size For the Installer/Updater: Text No Release number Multiple product names will be separated by plain-text commas which can be removed to manage the separate names Blackboard Learning System, Blackboard Portal System, currently Blackboard Learning System™ (Release 6) or Blackboard Learning System™ (Release 6)


getLongProductNameHtmlTm

java.lang.String getLongProductNameHtmlTm()
For the Web: HTML for bold, italic, TM, superscript etc. tagged around each product if multiple products exist. No font size For the Installer/Updater: Text No Release number Multiple product names will be separated by plain-text commas which can be removed to manage the separate names Blackboard Learning System, Blackboard Portal System, currently Blackboard Learning System™ (Release 6) or Blackboard Learning System™ (Release 6)


getMajorReleaseNumber

java.lang.String getMajorReleaseNumber()
Returns:
Returns the majorReleaseNumber.

getProductFamilyName

java.lang.String getProductFamilyName()
For the Web: HTML for bold, italic, superscript etc. No font size For the Installer/Updater: Text No Release number


getProductFamilyNameHtml

java.lang.String getProductFamilyNameHtml()
For the Web: HTML for bold, italic, superscript etc. No font size For the Installer/Updater: Text No Release number


getProductFamilyNameHtmlTm

java.lang.String getProductFamilyNameHtmlTm()
For the Web: HTML for bold, italic, TM, superscript etc. No font size For the Installer/Updater: Text No Release number


getUpdateName

java.lang.String getUpdateName()
Returns:
Returns the updateName.

getUpdateNameLong

java.lang.String getUpdateNameLong()
Returns:
Returns the updateNameLong.

getFamilyNameUpdateHtml

java.lang.String getFamilyNameUpdateHtml()
Returns:
Returns the familyNameUpdate.

getAppPack

java.lang.String getAppPack()


Copyright © 2003 Blackboard, Inc. All Rights Reserved.