Package tigase.licence
Interface Licence
-
public interface Licence
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
APP_ID_KEY
static java.lang.String
BANNED_KEY
static java.lang.String
DISPLAY_LICENCE_NOTICE_KEY
static java.lang.String
MAX_CLUSTER_NODES_KEY
static java.lang.String
MAX_ONLINE_USERS_KEY
static java.lang.String
SENDING_STATISTICS_KEY
static java.lang.String
SIGNATURE_ALGO
static java.lang.String
VALID_SINCE_KEY
static java.lang.String
VALID_UNTIL_KEY
static java.lang.String
VHOST_NAME_KEY
static java.lang.String
VHOSTS_DIFF_RATIO_KEY
static java.lang.String
VHOSTS_KEY
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LicenceValidator.ValidationResult
check()
byte[]
getBytes()
java.lang.String
getLicenceDigest()
java.lang.Boolean
getPropertyAsBoolean(java.lang.String key)
Searches for the property with the specified key in licence and try to convert property toBoolean
.java.util.Calendar
getPropertyAsCalendar(java.lang.String key)
Searches for the property with the specified key in licence and try to convert property toCalendar
.java.util.Date
getPropertyAsDate(java.lang.String key)
Searches for the property with the specified key in licence and try to convert property toInteger
.java.lang.Double
getPropertyAsDouble(java.lang.String key)
Searches for the property with the specified key in licence and try to convert property toDouble
.java.lang.Integer
getPropertyAsInteger(java.lang.String key)
Searches for the property with the specified key in licence and try to convert property toInteger
.java.lang.String
getPropertyAsString(java.lang.String key)
Searches for the property with the specified key in licence.
-
-
-
Field Detail
-
APP_ID_KEY
static final java.lang.String APP_ID_KEY
- See Also:
- Constant Field Values
-
BANNED_KEY
static final java.lang.String BANNED_KEY
- See Also:
- Constant Field Values
-
DISPLAY_LICENCE_NOTICE_KEY
static final java.lang.String DISPLAY_LICENCE_NOTICE_KEY
- See Also:
- Constant Field Values
-
SENDING_STATISTICS_KEY
static final java.lang.String SENDING_STATISTICS_KEY
- See Also:
- Constant Field Values
-
MAX_ONLINE_USERS_KEY
static final java.lang.String MAX_ONLINE_USERS_KEY
- See Also:
- Constant Field Values
-
MAX_CLUSTER_NODES_KEY
static final java.lang.String MAX_CLUSTER_NODES_KEY
- See Also:
- Constant Field Values
-
SIGNATURE_ALGO
static final java.lang.String SIGNATURE_ALGO
- See Also:
- Constant Field Values
-
VALID_SINCE_KEY
static final java.lang.String VALID_SINCE_KEY
- See Also:
- Constant Field Values
-
VALID_UNTIL_KEY
static final java.lang.String VALID_UNTIL_KEY
- See Also:
- Constant Field Values
-
VHOST_NAME_KEY
static final java.lang.String VHOST_NAME_KEY
- See Also:
- Constant Field Values
-
VHOSTS_KEY
static final java.lang.String VHOSTS_KEY
- See Also:
- Constant Field Values
-
VHOSTS_DIFF_RATIO_KEY
static final java.lang.String VHOSTS_DIFF_RATIO_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
check
LicenceValidator.ValidationResult check() throws java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.SignatureException, java.text.ParseException
- Throws:
java.security.InvalidKeyException
java.security.NoSuchAlgorithmException
java.security.SignatureException
java.text.ParseException
-
getBytes
byte[] getBytes()
-
getLicenceDigest
java.lang.String getLicenceDigest()
-
getPropertyAsBoolean
java.lang.Boolean getPropertyAsBoolean(java.lang.String key)
Searches for the property with the specified key in licence and try to convert property toBoolean
. The method returnsnull
if the property is not found.- Parameters:
key
- the property key.- Returns:
- the value in this licence with the specified key value.
-
getPropertyAsCalendar
java.util.Calendar getPropertyAsCalendar(java.lang.String key) throws java.text.ParseException
Searches for the property with the specified key in licence and try to convert property toCalendar
. The method returnsnull
if the property is not found.- Parameters:
key
- the property key.- Returns:
- the value in this licence with the specified key value.
- Throws:
java.text.ParseException
- if the specified properties cannot be parsed.
-
getPropertyAsDate
java.util.Date getPropertyAsDate(java.lang.String key) throws java.text.ParseException
Searches for the property with the specified key in licence and try to convert property toInteger
. The method returnsnull
if the property is not found.- Parameters:
key
- the property key.- Returns:
- the value in this licence with the specified key value.
- Throws:
java.text.ParseException
- if the specified properties cannot be parsed.
-
getPropertyAsDouble
java.lang.Double getPropertyAsDouble(java.lang.String key)
Searches for the property with the specified key in licence and try to convert property toDouble
. The method returnsnull
if the property is not found.- Parameters:
key
- the property key.- Returns:
- the value in this licence with the specified key value.
-
getPropertyAsInteger
java.lang.Integer getPropertyAsInteger(java.lang.String key)
Searches for the property with the specified key in licence and try to convert property toInteger
. The method returnsnull
if the property is not found.- Parameters:
key
- the property key.- Returns:
- the value in this licence with the specified key value.
-
getPropertyAsString
java.lang.String getPropertyAsString(java.lang.String key)
Searches for the property with the specified key in licence. The method returnsnull
if the property is not found.- Parameters:
key
- the property key.- Returns:
- the value in this licence with the specified key value.
-
-