Class ValidityConstraint

  • All Implemented Interfaces:
    IConfigTemplate

    public class ValidityConstraint
    extends EnrollConstraint
    This class implements the validity constraint. It checks if the validity in the certificate template satisfies the criteria.
    Version:
    $Revision$, $Date$
    • Field Detail

      • logger

        public static org.slf4j.Logger logger
      • CONFIG_RANGE_UNIT

        public static final java.lang.String CONFIG_RANGE_UNIT
        See Also:
        Constant Field Values
      • CONFIG_NOT_BEFORE_GRACE_PERIOD

        public static final java.lang.String CONFIG_NOT_BEFORE_GRACE_PERIOD
        See Also:
        Constant Field Values
      • CONFIG_CHECK_NOT_BEFORE

        public static final java.lang.String CONFIG_CHECK_NOT_BEFORE
        See Also:
        Constant Field Values
      • CONFIG_CHECK_NOT_AFTER

        public static final java.lang.String CONFIG_CHECK_NOT_AFTER
        See Also:
        Constant Field Values
    • Constructor Detail

      • ValidityConstraint

        public ValidityConstraint()
    • Method Detail

      • convertRangeUnit

        public int convertRangeUnit​(java.lang.String unit)
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • validate

        public void validate​(IRequest request,
                             org.mozilla.jss.netscape.security.x509.X509CertInfo info)
                      throws ERejectException
        Validates the request. The request is not modified during the validation.
        Specified by:
        validate in class EnrollConstraint
        Parameters:
        request - enrollment request
        info - certificate template
        Throws:
        ERejectException - request is rejected due to violation of constraint
      • getText

        public java.lang.String getText​(java.util.Locale locale)
        Description copied from class: PolicyConstraint
        Returns localized description of this constraint.
        Overrides:
        getText in class EnrollConstraint
        Parameters:
        locale - locale of the end-user
        Returns:
        localized description of this constraint
      • isApplicable

        public boolean isApplicable​(PolicyDefault def)
        Description copied from class: PolicyConstraint
        Checks if this constraint is applicable to the given default policy.
        Overrides:
        isApplicable in class EnrollConstraint
        Parameters:
        def - default policy to be checked
        Returns:
        true if this constraint can be applied to the given default policy