Class PolicyProps

All Implemented Interfaces:
EventListener, IGProp<GProp<?>[]>, IPropCnr, Cloneable
Direct Known Subclasses:
EditorPolicyProps

public class PolicyProps extends PropCnr
Container holding policiy settings. In the server, there are two sets: one for administrators and one for normal users. Typically, policy settings are used for security settings such as passwords, etc.
Author:
Christopher Mindus
  • Field Details

    • PN_ADMIN

      public static final String PN_ADMIN
      The policy type name for an administrator: "$admin".
      See Also:
    • PN_USER

      public static final String PN_USER
      The policy type name for a user: "$user".
      See Also:
    • AN_ADMIN

      public static final Atom AN_ADMIN
      The atom name for "admin".
    • AN_USER

      public static final Atom AN_USER
      The atom name for "user".
    • PN_MIN_LENGTH

      public static final String PN_MIN_LENGTH
      Property name: integer, minimum password length is 4.
      See Also:
    • PN_HAS_DIGIT

      public static final String PN_HAS_DIGIT
      Property name: boolean flag for at least one digit.
      See Also:
    • PN_HAS_Q_SYMBOL

      public static final String PN_HAS_Q_SYMBOL
      Property name: boolean flag for at least one "symbol" character (other than 0-9, a-z, A-Z), default true for admin, false for users.
      See Also:
    • PN_HAS_UPPER_AND_LOWER

      public static final String PN_HAS_UPPER_AND_LOWER
      Property name: flag for at least one lower case and one upper case character, default true for admin, false for users.
      See Also:
    • PN_HAS_ADVANCED_ENTROPY

      public static final String PN_HAS_ADVANCED_ENTROPY
      Property name: check advanced strength: boolean, to use advanced entropy checking, true by default for admin.
      See Also:
    • PN_HISTORY_LENGTH

      public static final String PN_HISTORY_LENGTH
      Property name: History length: integer, default 4 for users and 8 for admin.
      See Also:
    • PN_CHANGE_AT_NEXT_LOGIN

      public static final String PN_CHANGE_AT_NEXT_LOGIN
      Property name: Password must be changed upon next login (requires "noChanges" = false).
      See Also:
    • PN_NO_CHANGES

      public static final String PN_NO_CHANGES
      Property name: Password cannot be changed.
      See Also:
  • Constructor Details

    • PolicyProps

      public PolicyProps()
      Creates the container properties without a name.
    • PolicyProps

      public PolicyProps(Atom atom)
      Creates the container properties with a name.
      Parameters:
      atom - The atom name.
  • Method Details

    • clone

      public PolicyProps clone()
      Clone must be overridden.
      Overrides:
      clone in class PropCnr
    • getDescription

      public String getDescription()
      Gets the description of the Server.
      Returns:
      The description, "Administrator's password policy" or "User's password policy" for default.
    • isAdminPolicy

      public boolean isAdminPolicy()
      Returns if this is a policy for administrators, i.e. has the name "admin".
    • getPasswordMinLength

      public int getPasswordMinLength()
      Property name: integer, minimum password length is 4. Default is 8 for admin and 6 for users.
    • requiresPasswordDigit

      public boolean requiresPasswordDigit()
      Property name: boolean flag for at least one digit, default true for admin, false for users.
    • requiresPasswordQSymbol

      public boolean requiresPasswordQSymbol()
      Property name: boolean flag for at least one "symbol" character (other than 0-9, a-z, A-Z), default true for admin, false for users.
    • requiresPasswordUpperLower

      public boolean requiresPasswordUpperLower()
      Property name: flag for at least one lower case and one upper case character, default true for admin, false for users.
    • setRequireAdvancedEntropyChecking

      public boolean setRequireAdvancedEntropyChecking(boolean on)
      Property name: check advanced strength: boolean, to use advanced entropy checking, false by default.
    • requiredAdvancedEntropyChecking

      public boolean requiredAdvancedEntropyChecking()
      Property name: check advanced strength: boolean, to use advanced entropy checking, false by default.
    • getPasswordHistoryLength

      public int getPasswordHistoryLength()
      Property name: History length: integer, default 0 for users and 8 for admin, zero for disabled.
    • canChangePassword

      public boolean canChangePassword()
      Checks if the password can be changed or not.
      Returns:
      true for changeable, false for fixed.
    • mustChangePassword

      public boolean mustChangePassword()
      Checks if the password must be changed at next login.
      Returns:
      true for must change, false for not required.