public class Verifier
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
AVAILABLE |
protected java.util.Properties |
features |
static java.lang.String |
LICENSE_FILE_NAME |
protected int |
status |
static int |
UNAVAILABLE |
static int |
UNREAD |
Constructor and Description |
---|
Verifier() |
Modifier and Type | Method and Description |
---|---|
protected int |
daysLeft()
It returns how many days are left for the license.
|
void |
displayLicenseMessage(Configuration config)
Display a message about the license status
|
java.lang.String |
getFeature(java.lang.String name,
Configuration config)
This method is called to get the feature of the license.
|
java.lang.String |
getSerialNumber()
Get the serial number of the license
|
protected void |
loadLicense(Configuration config) |
void |
loadLicense(java.io.File filename)
Read the license file directly from a specified file
|
static void |
main(java.lang.String[] args)
Test program to verify that a license contained in a specific file is valid
|
void |
supplyLicenseKey(java.io.BufferedReader reader)
This method allows the contents of a license key to be supplied programmatically.
|
protected java.util.Properties features
protected int status
public static final int UNREAD
public static final int AVAILABLE
public static final int UNAVAILABLE
public static final java.lang.String LICENSE_FILE_NAME
protected int daysLeft()
public java.lang.String getFeature(java.lang.String name, Configuration config)
name
- the name of the required featureconfig
- the Saxon Configurationpublic void displayLicenseMessage(Configuration config)
config
- the Configurationprotected void loadLicense(Configuration config)
public void loadLicense(java.io.File filename)
filename
- the name of the license filepublic void supplyLicenseKey(java.io.BufferedReader reader)
reader
- A reader that will be used to read the contents of the license file
(for example, a StringReader)java.lang.IllegalArgumentException
- if the key supplied is not a valid OEM license keypublic java.lang.String getSerialNumber()
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- Command line arguments. First argument is the filename of the license
file to be tested.java.lang.Exception
- if any failure occursCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.