java.lang.Object | +--com.chainkey.jchain.sa.licensor.LicenseManager
The class for managing the product licenses on licensors' side.
* You don't have to use this API, if the JChain Management Panel
is enough for your purpose. Please check out the JChain Management Panel first.
| Method Summary | |
java.sql.ResultSet |
executeQuery(java.lang.String sqlStatement)
Executes SQL query for the user database. |
int |
executeUpdate(java.lang.String sqlStatement)
Executes SQL update (INSERT, UPDATE or DELETE) for the user database. |
java.lang.String[] |
generateSerialNumbers(int productNumber,
int num,
java.lang.String filePath,
boolean append)
Generates serial numbers at once and writes them to a specified file (either append or overwrite). |
java.lang.String |
getAppDirPath(int productNumber)
Gets the absolute path of "app" directory for designated product #. |
int[] |
getExpirationDate()
Gets the expiration date of your current licensor key. |
static LicenseManager |
getInstance()
Gets an instance of the LicenseManager class. |
int |
getTotalModules(int productNumber)
Gets the number of modules for a product designated by its "product #". |
int |
getTotalProducts()
Gets the number of products that can be protected by your current licensor key of JChain. |
void |
setInterval(double interval)
Sets the time-interval of updating the license key by deamon. |
int |
startKeyUpdateDaemon()
Manually starts the licensor key updater (i.e. |
void |
stopKeyUpdateDaemon()
Manually stops the licensor key updater (i.e. |
int |
takeInKey(java.lang.String selected)
Takes in a designated licensor key file and activates your copy of JChain. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public void setInterval(double interval)
interval - the interval in hour (e.g. 0.1 means 6 minutes)startKeyUpdateDaemon(),
stopKeyUpdateDaemon()public int startKeyUpdateDaemon()
setInterval( double interval ),
stopKeyUpdateDaemon()public void stopKeyUpdateDaemon()
startKeyUpdateDaemon(),
setInterval( double interval )public int[] getExpirationDate()
public static LicenseManager getInstance()
public int takeInKey(java.lang.String selected)
selected - the absolute path of the key filepublic int getTotalProducts()
public int getTotalModules(int productNumber)
productNumber - the product number
public java.lang.String[] generateSerialNumbers(int productNumber,
int num,
java.lang.String filePath,
boolean append)
productNumber - the number indicating the product for which
the serial number is issued.num - the number of serial numbers to generatefilePath - the path of the file to be written. Set null
if you don't need such a file.append - set true to append to the file; false to overwrite.
public java.sql.ResultSet executeQuery(java.lang.String sqlStatement)
throws java.sql.SQLException
java.sql.SQLException - - if a database access error occurs
public int executeUpdate(java.lang.String sqlStatement)
throws java.sql.SQLException
public java.lang.String getAppDirPath(int productNumber)
productNumber - the product #