Class Policy

java.lang.Object
org.zkoss.zkex.license.Policy

public class Policy extends Object
Provides an interface for security policies and implements the default policy.
Version:
$Id$
Author:
Christian Schlichtherle
  • Constructor Details

    • Policy

      protected Policy()
      Only subclasses can instantiate this class.
  • Method Details

    • setCurrent

      public static void setCurrent(Policy current)
      Sets the current policy.
      Parameters:
      current - The new current policy. May be null to cause the default policy implemented by this class to be installed and returned by getCurrent().
    • getCurrent

      public static Policy getCurrent()
      Returns the current policy. If no current policy has been set, the default policy implemented by this class is installed as the current policy and returned.
    • checkPwd

      public void checkPwd(String pwd)
      Checks the given password for compliance to the current password policy.

      The default policy implemented by this class ensures that the password is at least six characters long and consists of letters and digits.

      Throws:
      IllegalPasswordException - If the given password does not comply to the current policy.