Package org.zkoss.zkex.license
Class Policy
- java.lang.Object
-
- org.zkoss.zkex.license.Policy
-
public class Policy extends java.lang.ObjectProvides an interface for security policies and implements the default policy.- Version:
- $Id$
- Author:
- Christian Schlichtherle
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPolicy()Only subclasses can instantiate this class.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckPwd(java.lang.String pwd)Checks the given password for compliance to the current password policy.static PolicygetCurrent()Returns the current policy.static voidsetCurrent(Policy current)Sets the current policy.
-
-
-
Method Detail
-
setCurrent
public static void setCurrent(Policy current)
Sets the current policy.- Parameters:
current- The new current policy. May benullto cause the default policy implemented by this class to be installed and returned bygetCurrent().
-
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(java.lang.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.
-
-