blackboard.platform
Class LicenseManagerFactory

java.lang.Object
  extended by blackboard.platform.LicenseManagerFactory

public class LicenseManagerFactory
extends java.lang.Object

Simple service factory interface. This factory includes creation methods since the license is loaded by other tools outside the standard service management framework.

Since:
Bb 7.2

Constructor Summary
LicenseManagerFactory()
           
 
Method Summary
static LicenseManager getInstance()
          Access the currently configured LicenseManager for the system
static LicenseManager newInstance(java.io.File licenseFile)
          Returns an instance of LicenseManager initialized with the specified file.
static LicenseManager newInstance(java.io.File licenseFile, boolean validate)
          Returns an instance of LicenseManager initialized with the specified file.
static LicenseManager newInstance(java.io.InputStream licenseStream, boolean validate)
          Returns an instance of LicenseManager initialized with the specified stream.
static LicenseManager newInstance(java.lang.String productName, java.lang.String clientId, java.lang.String productOwnedId, License[] licenses, java.lang.String key)
          Creates a new instance of the license manager based on the information passed in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LicenseManagerFactory

public LicenseManagerFactory()
Method Detail

getInstance

public static final LicenseManager getInstance()
Access the currently configured LicenseManager for the system

Returns:
the registered license manager for the system

newInstance

public static final LicenseManager newInstance(java.io.File licenseFile)
                                        throws InitializationException
Returns an instance of LicenseManager initialized with the specified file.

Parameters:
licenseFile - File to read license data from
Returns:
Initialized LicenseManager
Throws:
InitializationException - Thrown if the file cannot be read or the license contains an invalid key

newInstance

public static final LicenseManager newInstance(java.io.File licenseFile,
                                               boolean validate)
                                        throws InitializationException
Returns an instance of LicenseManager initialized with the specified file.

Parameters:
licenseFile - File to read license data from
validate - Flag indicating whether to validate the licese data
Throws:
InitializationException - Thrown if the file cannot be read or the license contains an invalid key

newInstance

public static final LicenseManager newInstance(java.io.InputStream licenseStream,
                                               boolean validate)
                                        throws InitializationException
Returns an instance of LicenseManager initialized with the specified stream.

Parameters:
licenseStream - InputStream to read license data from
validate - Flag indicating whether to validate the license data
Throws:
InitializationException - Thrown if the license contains an invalid key

newInstance

public static final LicenseManager newInstance(java.lang.String productName,
                                               java.lang.String clientId,
                                               java.lang.String productOwnedId,
                                               License[] licenses,
                                               java.lang.String key)
Creates a new instance of the license manager based on the information passed in. This is used by other tools that don't use the standard license files.

Parameters:
productName - Product name in top-level element of the license file.
clientId - Client id in the top-level element of the license file.
productOwnedId - Product-owned id in the top-level element of the license file.
licenses - All components successfully parsed from the license file
key - Validation key
Returns:
An instanceof the license manager


Copyright © 2012 Blackboard, Inc. All Rights Reserved.