Package tigase.licence
Interface Licence
-
public interface Licence
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAPP_ID_KEYstatic java.lang.StringBANNED_KEYstatic java.lang.StringDISPLAY_LICENCE_NOTICE_KEYstatic java.lang.StringMAX_CLUSTER_NODES_KEYstatic java.lang.StringMAX_ONLINE_USERS_KEYstatic java.lang.StringSENDING_STATISTICS_KEYstatic java.lang.StringSIGNATURE_ALGOstatic java.lang.StringVALID_SINCE_KEYstatic java.lang.StringVALID_UNTIL_KEYstatic java.lang.StringVHOST_NAME_KEYstatic java.lang.StringVHOSTS_DIFF_RATIO_KEYstatic java.lang.StringVHOSTS_KEY
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LicenceValidator.ValidationResultcheck()byte[]getBytes()java.lang.StringgetLicenceDigest()java.lang.BooleangetPropertyAsBoolean(java.lang.String key)Searches for the property with the specified key in licence and try to convert property toBoolean.java.util.CalendargetPropertyAsCalendar(java.lang.String key)Searches for the property with the specified key in licence and try to convert property toCalendar.java.util.DategetPropertyAsDate(java.lang.String key)Searches for the property with the specified key in licence and try to convert property toInteger.java.lang.DoublegetPropertyAsDouble(java.lang.String key)Searches for the property with the specified key in licence and try to convert property toDouble.java.lang.IntegergetPropertyAsInteger(java.lang.String key)Searches for the property with the specified key in licence and try to convert property toInteger.java.lang.StringgetPropertyAsString(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.InvalidKeyExceptionjava.security.NoSuchAlgorithmExceptionjava.security.SignatureExceptionjava.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 returnsnullif 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.ParseExceptionSearches for the property with the specified key in licence and try to convert property toCalendar. The method returnsnullif 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.ParseExceptionSearches for the property with the specified key in licence and try to convert property toInteger. The method returnsnullif 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 returnsnullif 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 returnsnullif 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 returnsnullif the property is not found.- Parameters:
key- the property key.- Returns:
- the value in this licence with the specified key value.
-
-