Class PolicyProps

  • All Implemented Interfaces:
    EventListener, IGProp<GProp<?>[]>, IPropCnr, java.lang.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 Detail

      • PN_ADMIN

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

        public static final java.lang.String PN_USER
        The policy type name for a user: "$user".
        See Also:
        Constant Field Values
      • 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 java.lang.String PN_MIN_LENGTH
        Property name: integer, minimum password length is 4.
        See Also:
        Constant Field Values
      • PN_HAS_DIGIT

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

        public static final java.lang.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:
        Constant Field Values
      • PN_HAS_UPPER_AND_LOWER

        public static final java.lang.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:
        Constant Field Values
      • PN_HAS_ADVANCED_ENTROPY

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

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

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

        public static final java.lang.String PN_NO_CHANGES
        Property name: Password cannot be changed.
        See Also:
        Constant Field Values
    • Constructor Detail

      • 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 Detail

      • getDescription

        public java.lang.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.