public class Tool4DialogLicenses
extends java.lang.Object
Tool4DialogLicenses
class controls the licenses of the application.Modifier and Type | Field and Description |
---|---|
static int |
APPLICATION_ERROR |
static int |
APPVERSION_ERROR |
static int |
CLIENT_NAME_ERROR |
static int |
CUSCOMP_ERROR |
static int |
errCode
internal error code.
|
static java.lang.String |
errMess |
static int |
LICENSE_AVAILABLE_ERROR |
static int |
LICENSE_FILE_ERROR |
static int |
LICENSE_TIME_ERROR |
static int |
SERIALNUMBER_ERROR |
static int |
VALIDE_ERROR |
Constructor and Description |
---|
Tool4DialogLicenses(java.lang.String dbname)
The constructor
Tool4DialogLicenses creates a new instance(object) of the class. |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
bookLicenses(java.lang.String clientuid,
java.lang.String lics2book)
The method
bookLicenses books licenses for a user login, if available. |
static int |
getAccountLic(java.lang.String clientuid,
java.lang.String name)
get field: counter of avalible licenses.
|
static int |
getAccountLicUsed(java.lang.String clientuid,
java.lang.String name)
get field: counter of used licenses of license 1.
|
static java.util.ArrayList |
getClientList(java.lang.String coredbname)
The method
getClientList gets a list of all clients. |
static boolean |
getIsvalid()
get field: flag initialization was valide.
|
static java.util.ArrayList |
getLicNames(java.lang.String clientuid)
get field: list of all license names.
|
static java.util.Hashtable |
getLicNamesIfAvailable(java.lang.String clientuid)
get field: list of available licenses.
|
static java.util.Hashtable |
getLicNamesIfNotInList(java.lang.String clientuid,
java.lang.String curr_lics)
get field: list of licenses not in list.
|
static void |
initClientLicenses(java.lang.String client_name)
The method
initClientLicenses initialises the license definition of a single client. |
static void |
setIsInitialised(boolean input)
get field: flag initialization was valide.
|
static boolean |
testAllLicDate(java.lang.String clientuid)
The method
testAllLicDate test the validation of the dates of all licenses. |
static void |
unbookLicenses(n4e.core.list.List4SysUser userobject)
The method
unbookLicenses deletes licenses for a userlogout. |
public static final int APPLICATION_ERROR
public static final int APPVERSION_ERROR
public static final int CUSCOMP_ERROR
public static final int SERIALNUMBER_ERROR
public static final int VALIDE_ERROR
public static final int LICENSE_TIME_ERROR
public static final int LICENSE_FILE_ERROR
public static final int CLIENT_NAME_ERROR
public static final int LICENSE_AVAILABLE_ERROR
public static int errCode
public static java.lang.String errMess
public Tool4DialogLicenses(java.lang.String dbname) throws java.lang.Exception
Tool4DialogLicenses
creates a new instance(object) of the class.dbname
- the name of the database.java.lang.Exception
- if errorpublic static boolean getIsvalid()
public static void setIsInitialised(boolean input)
input
- the valide flagpublic static java.util.ArrayList getLicNames(java.lang.String clientuid)
clientuid
- the uniqueid of the current client.public static java.util.Hashtable getLicNamesIfAvailable(java.lang.String clientuid)
clientuid
- the uniqueid of the current client.public static java.util.Hashtable getLicNamesIfNotInList(java.lang.String clientuid, java.lang.String curr_lics)
clientuid
- the uniqueid of the current client.curr_lics
- the current licenses.public static int getAccountLic(java.lang.String clientuid, java.lang.String name)
clientuid
- the uniqueid of the current client.name
- the current license name.public static int getAccountLicUsed(java.lang.String clientuid, java.lang.String name)
clientuid
- the uniqueid of the current client.name
- the current license name.public static void initClientLicenses(java.lang.String client_name) throws java.lang.Exception
initClientLicenses
initialises the license definition of a single client.client_name
- the name of a client.java.lang.Exception
- if error.public static boolean testAllLicDate(java.lang.String clientuid)
testAllLicDate
test the validation of the dates of all licenses.clientuid
- the uniqueid of the current client.public static java.lang.String bookLicenses(java.lang.String clientuid, java.lang.String lics2book) throws java.lang.Exception
bookLicenses
books licenses for a user login, if available.clientuid
- the uniqueid of the current client.lics2book
- license to book for user.java.lang.Exception
- if errorpublic static void unbookLicenses(n4e.core.list.List4SysUser userobject) throws java.lang.Exception
unbookLicenses
deletes licenses for a userlogout.userobject
- the current user object.java.lang.Exception
- if errorpublic static java.util.ArrayList getClientList(java.lang.String coredbname) throws java.lang.Exception
getClientList
gets a list of all clients.coredbname
- the database name of the corejava.lang.Exception
- if error