Package org.zkoss.zkex.license
Class Policy
java.lang.Object
org.zkoss.zkex.license.Policy
Provides an interface for security policies and implements the default
policy.
- Version:
- $Id$
- Author:
- Christian Schlichtherle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks the given password for compliance to the current password policy.static PolicyReturns the current policy.static voidsetCurrent(Policy current) Sets the current policy.
-
Constructor Details
-
Policy
protected Policy()Only subclasses can instantiate this class.
-
-
Method Details
-
setCurrent
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
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
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.
-