com.cinnabarsystems.clm
Class LicenseFactory

java.lang.Object
  extended by com.cinnabarsystems.clm.LicenseFactory

public class LicenseFactory
extends Object

Class used to programatically generate license files


Constructor Summary
LicenseFactory()
           
 
Method Summary
static void generateLicense(InputStream licenseSpecificationInputStream, InputStream privateKeyInputStream, OutputStream licenseOutputStream)
          Generate a license file from a stream containing a license specification and a stream containing an encoded private key.
static void generateLicense(InputStream licenseSpecificationInputStream, OutputStream licenseOutputStream, OutputStream privateKeyOutputStream, OutputStream publicKeyOutputStream)
          Generate a license file and new key pair from a stream containing a license specification.
static void generateLicense(InputStream licenseSpecificationInputStream, PrivateKey signingKey, OutputStream licenseOutputStream)
          Generate a license file from a stream containing a license specification and an existing PrivateKey object.
static void generateLicense(License license, InputStream privateKeyInputStream, OutputStream licenseOutputStream)
          Generate a license file from an existing License object and a stream containing an encoded private key.
static void generateLicense(License license, OutputStream licenseOutputStream, OutputStream privateKeyOutputStream, OutputStream publicKeyOutputStream)
          Generate a license file and new key pair from an existing License object
static void generateLicense(License license, PrivateKey signingKey, OutputStream licenseOutputStream)
          Generate a license file from existing License and PrivateKey objects.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LicenseFactory

public LicenseFactory()
Method Detail

generateLicense

public static void generateLicense(License license,
                                   PrivateKey signingKey,
                                   OutputStream licenseOutputStream)
                            throws IOException,
                                   GeneralSecurityException
Generate a license file from existing License and PrivateKey objects.

Parameters:
license - License object describing the desired license specifications
signingKey - the private key used to sign the license
licenseOutputStream - stream to which the license file should be written
Throws:
IOException
GeneralSecurityException

generateLicense

public static void generateLicense(InputStream licenseSpecificationInputStream,
                                   PrivateKey signingKey,
                                   OutputStream licenseOutputStream)
                            throws IOException,
                                   GeneralSecurityException,
                                   LicenseManagerException
Generate a license file from a stream containing a license specification and an existing PrivateKey object.

Parameters:
licenseSpecificationInputStream - stream containing the desired license specifications in the Cinnabar License Specification Format
signingKey - the private key used to sign the license
licenseOutputStream - stream to which the license file should be written
Throws:
IOException
GeneralSecurityException
LicenseManagerException

generateLicense

public static void generateLicense(License license,
                                   InputStream privateKeyInputStream,
                                   OutputStream licenseOutputStream)
                            throws IOException,
                                   GeneralSecurityException
Generate a license file from an existing License object and a stream containing an encoded private key.

Parameters:
license - License object describing the desired license specifications
privateKeyInputStream - stream from which an encoded private key can be read and used to sign the license
licenseOutputStream - stream to which the license file should be written
Throws:
IOException
GeneralSecurityException

generateLicense

public static void generateLicense(InputStream licenseSpecificationInputStream,
                                   InputStream privateKeyInputStream,
                                   OutputStream licenseOutputStream)
                            throws IOException,
                                   GeneralSecurityException,
                                   LicenseManagerException
Generate a license file from a stream containing a license specification and a stream containing an encoded private key.

Parameters:
licenseSpecificationInputStream - stream containing the desired license specifications in the Cinnabar License Specification Format
privateKeyInputStream - stream from which an encoded private key can be read and used to sign the license
licenseOutputStream - stream to which the license file should be written
Throws:
IOException
GeneralSecurityException
LicenseManagerException

generateLicense

public static void generateLicense(License license,
                                   OutputStream licenseOutputStream,
                                   OutputStream privateKeyOutputStream,
                                   OutputStream publicKeyOutputStream)
                            throws IOException,
                                   GeneralSecurityException
Generate a license file and new key pair from an existing License object

Parameters:
license - License object describing the desired license specifications
licenseOutputStream - stream to which the license file should be written
privateKeyOutputStream - stream to which the encoded new private key should be written
publicKeyOutputStream - stream to which the encoded new public key should be written
Throws:
IOException
GeneralSecurityException

generateLicense

public static void generateLicense(InputStream licenseSpecificationInputStream,
                                   OutputStream licenseOutputStream,
                                   OutputStream privateKeyOutputStream,
                                   OutputStream publicKeyOutputStream)
                            throws IOException,
                                   GeneralSecurityException,
                                   LicenseManagerException
Generate a license file and new key pair from a stream containing a license specification.

Parameters:
licenseSpecificationInputStream - stream containing the desired license specifications in the Cinnabar License Specification Format
licenseOutputStream - stream to which the license file should be written
privateKeyOutputStream - stream to which the encoded new private key should be written
publicKeyOutputStream - stream to which the encoded new public key should be written
Throws:
IOException
GeneralSecurityException
LicenseManagerException