Enum TermsOfServiceAcceptanceFrequency

    • Method Detail

      • values

        public static TermsOfServiceAcceptanceFrequency[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TermsOfServiceAcceptanceFrequency c : TermsOfServiceAcceptanceFrequency.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TermsOfServiceAcceptanceFrequency valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • isActivated

        public boolean isActivated()
        Indicates if terms of service frequency is activated.
        Returns:
      • isAcceptanceDateExpired

        public boolean isAcceptanceDateExpired​(Date tosAcceptanceDate,
                                               String locale)
        Indicates if the given acceptance date of terms of service is valid compared to the current date.
        Parameters:
        tosAcceptanceDate -
        locale -
        Returns:
      • isAcceptanceDateExpired

        protected boolean isAcceptanceDateExpired​(Date referenceDate,
                                                  Date tosAcceptanceDate,
                                                  String locale)
        Indicates if the given acceptance date of terms of service is valid compared to the reference date.
        Parameters:
        referenceDate -
        tosAcceptanceDate -
        locale -
        Returns:
      • decode

        public static TermsOfServiceAcceptanceFrequency decode​(String tosAcceptanceFrequency)
        Decode from a string value. NEVER by default (even the given value is unknown).
        Parameters:
        tosAcceptanceFrequency -
        Returns: