common-util

local.tomas.license
Class LicenseValidator

java.lang.Object
  extended by local.tomas.license.LicenseValidator

public class LicenseValidator
extends Object

License validator.

Author:
tomas.teubner

Constructor Summary
LicenseValidator(String certUrl)
          Create license validator from certificate URL.
LicenseValidator(X509Certificate cert)
          Create license validator from certificate.
 
Method Summary
 void validate(License license)
          Validate license.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LicenseValidator

public LicenseValidator(X509Certificate cert)
Create license validator from certificate.

Parameters:
cert - certificate

LicenseValidator

public LicenseValidator(String certUrl)
                 throws LicenseException
Create license validator from certificate URL.

Parameters:
certUrl - URL where certificate can be found. If it starts with res:/// the remainder of the string refers to an internal resource on the classpath.
Throws:
LicenseException
Method Detail

validate

public void validate(License license)
              throws LicenseException
Validate license.

Parameters:
license - the license
Throws:
LicenseException - thrown if validation fails

common-util

Copyright © 2007 Tomas Teubner. All Rights Reserved.