|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jp.protection.priv.pro.SerialNumberBase
com.jp.protection.priv.pro.SerialNumber
SerialNumber2 and related classes and methods instead
public class SerialNumber
This class represents simplified license encoded into the textual form
similar to: BUK3X-9AY4Z-O7NM2-D65WG-UKRXC. This simple form
allows licenses to be printed on product boxes etc. This version S/N allows
holding of the following license attributes:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.jp.protection.priv.pro.SerialNumberBase |
|---|
SerialNumberBase.KeyCharsGenerator |
| Field Summary | |
|---|---|
protected static int |
FIELD_INDEX_CRC
Deprecated. |
protected static int |
FIELD_INDEX_LICENSE_NUMBER
Deprecated. |
protected static int |
FIELD_INDEX_LICENSE_OPTIONS
Deprecated. |
protected static int |
FIELD_INDEX_NUMBER_COPIES
Deprecated. |
protected static int |
FIELD_INDEX_PRODUCT
Deprecated. |
protected static int |
FIELD_INDEX_PRODUCT_EDITION
Deprecated. |
protected static int |
FIELD_INDEX_PRODUCT_VERSION
Deprecated. |
protected static int[] |
FIELD_LENGTH_ARRAY
Deprecated. |
protected int |
fLicenseNumber
Deprecated. |
protected int |
fLicenseOptions
Deprecated. |
protected int |
fNumberCopies
Deprecated. |
protected int |
fProduct
Deprecated. |
protected int |
fProductEdition
Deprecated. |
protected int |
fProductVersion
Deprecated. |
protected static java.text.NumberFormat |
INTEGER_FORMAT
Deprecated. |
static int |
MAX_CRC
Deprecated. |
static int |
MAX_LICENSE_NUMBER
Deprecated. |
static int |
MAX_LICENSE_NUMBER_CHARS
Deprecated. |
static int |
MAX_NUMBER_COPIES
Deprecated. |
static int |
MAX_OPTIONS
Deprecated. |
static int |
MAX_PRODUCT
Deprecated. |
static int |
MAX_PRODUCT_EDITION
Deprecated. |
static int |
MAX_PRODUCT_VERSION
Deprecated. |
static int |
OPTION_CHECK_NUMBER_OF_COPIES
Deprecated. |
static int |
OPTION_REQUIRE_ACTIVATION
Deprecated. |
static int |
OPTION_REQUIRE_ACTIVATION_LOCK
Deprecated. |
static int |
OPTION_REQUIRE_USER_INFO
Deprecated. |
protected static java.text.MessageFormat |
SERIAL_NUMBER_FORMAT
Deprecated. |
| Fields inherited from class com.jp.protection.priv.pro.SerialNumberBase |
|---|
fKeyChars, fKeyCharsStartOffset, N_A, PATTERN, PATTERN_CHAR, PATTERN_DELIMITER |
| Constructor Summary | |
|---|---|
SerialNumber()
Deprecated. Creates a new instance of the SerialNumber |
|
SerialNumber(char[] aKeyChars)
Deprecated. Creates a new instance of the SerialNumber and assigns key characters to it |
|
| Method Summary | |
|---|---|
protected void |
checkValue(java.lang.String aProperty,
int aValue,
int aMin,
int aMax)
Deprecated. |
void |
decode(java.lang.String aSerialNumber)
Deprecated. Parses textual representation of the Serial Number |
java.lang.String |
encode()
Deprecated. Generates textual representation of the Serial Number |
protected java.lang.String |
excludeCRC(java.lang.String aValue)
Deprecated. |
int |
getLicenseNumber()
Deprecated. Returns license number |
int |
getLicenseOptions()
Deprecated. Returns license options |
int |
getNumberCopies()
Deprecated. Returns number of copies |
int |
getProduct()
Deprecated. Returns product short indentifer |
int |
getProductEdition()
Deprecated. Returns product edition short indentifer |
int |
getProductVersion()
Deprecated. Returns product version |
protected int[] |
parseFields(java.lang.String aSerialNumber)
Deprecated. |
void |
setLicenseNumber(int aLicenseNumber)
Deprecated. Specifies license number |
void |
setLicenseOptions(int aLicenseOptions)
Deprecated. Specifies license options as any combination of OPTION_ constants |
void |
setNumberCopies(int aNumberCopies)
Deprecated. Specifies number of copies |
void |
setProduct(int aProduct)
Deprecated. Specifies product short indentifer |
void |
setProductEdition(int aProductEdition)
Deprecated. Specifies product edition short indentifer |
void |
setProductVersion(int aProductVersion)
Deprecated. Specifies product version |
protected int |
trancateCRC(long aCRC)
Deprecated. |
| Methods inherited from class com.jp.protection.priv.pro.SerialNumberBase |
|---|
checkValidChars, contains, decode, encode, encode, generateCRC, getKeyChars, getOffset, invalidSerialNumberError, keyCharsNotSpecifiedError, setKeyChars |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_NUMBER_COPIES
public static final int MAX_LICENSE_NUMBER
public static final int MAX_PRODUCT_VERSION
public static final int MAX_PRODUCT_EDITION
public static final int MAX_PRODUCT
public static final int MAX_CRC
public static final int MAX_OPTIONS
public static final int MAX_LICENSE_NUMBER_CHARS
protected int fProduct
protected int fProductEdition
protected int fProductVersion
protected int fLicenseNumber
protected int fLicenseOptions
protected int fNumberCopies
public static final int OPTION_REQUIRE_ACTIVATION
public static final int OPTION_REQUIRE_ACTIVATION_LOCK
public static final int OPTION_CHECK_NUMBER_OF_COPIES
public static final int OPTION_REQUIRE_USER_INFO
protected static java.text.MessageFormat SERIAL_NUMBER_FORMAT
protected static int[] FIELD_LENGTH_ARRAY
protected static final int FIELD_INDEX_CRC
protected static final int FIELD_INDEX_PRODUCT
protected static final int FIELD_INDEX_PRODUCT_EDITION
protected static final int FIELD_INDEX_PRODUCT_VERSION
protected static final int FIELD_INDEX_LICENSE_NUMBER
protected static final int FIELD_INDEX_NUMBER_COPIES
protected static final int FIELD_INDEX_LICENSE_OPTIONS
protected static java.text.NumberFormat INTEGER_FORMAT
| Constructor Detail |
|---|
public SerialNumber()
SerialNumber
public SerialNumber(char[] aKeyChars)
SerialNumber and assigns key characters to it
aKeyChars - key characters| Method Detail |
|---|
public int getProduct()
protected void checkValue(java.lang.String aProperty,
int aValue,
int aMin,
int aMax)
throws SerialNumberException
SerialNumberException
public void setProduct(int aProduct)
throws SerialNumberException
aProduct - product short indentifer
SerialNumberException - if product short indentifer has an invalid valuepublic int getProductEdition()
public void setProductEdition(int aProductEdition)
throws SerialNumberException
aProductEdition - product edition short indentifer
SerialNumberException - if product edition short indentifer has an invalid valuepublic int getProductVersion()
public void setProductVersion(int aProductVersion)
throws SerialNumberException
aProductVersion - product version
SerialNumberException - if product version has an invalid valuepublic int getLicenseNumber()
public void setLicenseNumber(int aLicenseNumber)
throws SerialNumberException
aLicenseNumber - license number
SerialNumberException - if license number has an invalid valuepublic int getNumberCopies()
public void setNumberCopies(int aNumberCopies)
throws SerialNumberException
aNumberCopies - number of copies
SerialNumberException - if number of copies has an invalid valuepublic int getLicenseOptions()
public void setLicenseOptions(int aLicenseOptions)
OPTION_ constants
aLicenseOptions - license options
public java.lang.String encode()
throws SerialNumberException
encode in class SerialNumberBaseSerialNumberException - on any errorsprotected java.lang.String excludeCRC(java.lang.String aValue)
protected int trancateCRC(long aCRC)
public void decode(java.lang.String aSerialNumber)
throws SerialNumberException
decode in class SerialNumberBaseaSerialNumber - textual representation of the Serial Number
SerialNumberException - if provided textual representation of the Serial Number is invalidprotected int[] parseFields(java.lang.String aSerialNumber)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||