com.dessci.mathflow.sdk.license
Class LicenseSource

java.lang.Object
  extended by com.dessci.mathflow.sdk.license.LicenseSource
All Implemented Interfaces:
com.dessci.mathflow.sdk.license.LicenseConstants

public class LicenseSource
extends java.lang.Object
implements com.dessci.mathflow.sdk.license.LicenseConstants

This class represents a license for a component. In the MathFlow SDK, there are two type of licenses in order to meet different needs:


Field Summary
 
Fields inherited from interface com.dessci.mathflow.sdk.license.LicenseConstants
debugMode, DESSCI_KEY, DOCUMENT_COMPOSER, DOCUMENT_COMPOSER_FOR_JAVA, DSI_LICENSE_DAEMON, EQUATION_COMPOSER, EQUATION_COMPOSER_FOR_JAVA, EVAL_LICENSE_FOR_APPLETS, FLEXLM_LIB_NAME, FLEXLM_LIC, LICENSE_EXPIRED, LICENSE_FILE_NAME, LICENSE_FOLDER_NAME, LICENSE_ID, LICENSE_INVALID, LICENSE_NOT_AVAILABLE, LICENSE_OK, SIMPLE_EDITOR, STRUCTURE_EDITOR, STYLE_EDITOR
 
Constructor Summary
LicenseSource(java.lang.String licenseString)
          Creates a new FlexLM LicenseSource object with the specified FlexLM license file.
LicenseSource(java.lang.String licenseString, int licenseType)
          Creates a new LicenseSource object with the specified type of license.
 
Method Summary
 com.dessci.mathflow.sdk.license.LicenseInterface getLicenseInstance()
          Returns the instance of this license object.
 java.lang.String getLicenseString()
          Returns the FlexLM file path or Design Science registration key depending on the license type.
 int getLicenseType()
          Returns the type of license.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LicenseSource

public LicenseSource(java.lang.String licenseString)
              throws com.dessci.mathflow.sdk.license.LicenseException
Creates a new FlexLM LicenseSource object with the specified FlexLM license file.

Parameters:
licenseString - the FlexLM license file
Throws:
LicenseException

LicenseSource

public LicenseSource(java.lang.String licenseString,
                     int licenseType)
              throws com.dessci.mathflow.sdk.license.LicenseException
Creates a new LicenseSource object with the specified type of license.

Parameters:
licenseString - the FlexLM license file or registration key string depending on the type of license
licenseType - the type of license. The valid values are:
        LicenseConstants.FLEXLM_LIC 
        LicenseConstants.DESSCI_KEY
 
Throws:
LicenseException
Method Detail

getLicenseInstance

public com.dessci.mathflow.sdk.license.LicenseInterface getLicenseInstance()
Returns the instance of this license object. It is either a DessciKey object or FlexlmLicense object.

Returns:
the instance of this license object

getLicenseString

public java.lang.String getLicenseString()
Returns the FlexLM file path or Design Science registration key depending on the license type.

Returns:
the FlexLM file path or Design Science registration key depending on the license type

getLicenseType

public int getLicenseType()
Returns the type of license.

Returns:
the license type

Copyright (c) 2015 Design Science
All rights reserved