Class EnrollConstraint

    • Field Detail

      • mConfigNames

        protected java.util.Vector<java.lang.String> mConfigNames
    • Constructor Detail

      • EnrollConstraint

        public EnrollConstraint()
    • Method Detail

      • getConfigNames

        public java.util.Enumeration<java.lang.String> getConfigNames()
        Description copied from interface: IConfigTemplate
        Returns a list of configuration parameter names.
        Specified by:
        getConfigNames in interface IConfigTemplate
        Returns:
        parameter names
      • addConfigName

        public void addConfigName​(java.lang.String name)
      • getConfigDescriptor

        public IDescriptor getConfigDescriptor​(java.util.Locale locale,
                                               java.lang.String name)
        Description copied from interface: IConfigTemplate
        Returns the descriptors of configuration parameter.
        Specified by:
        getConfigDescriptor in interface IConfigTemplate
        Parameters:
        locale - user locale
        name - configuration parameter name
        Returns:
        descriptor
      • getValueDescriptor

        public IDescriptor getValueDescriptor​(java.util.Locale locale,
                                              java.lang.String name)
      • getLocale

        public java.util.Locale getLocale​(IRequest request)
      • getConfig

        public java.lang.String getConfig​(java.lang.String name)
        Description copied from interface: IConfigTemplate
        Retrieves configuration parameter by name.
        Specified by:
        getConfig in interface IConfigTemplate
        Returns:
        parameter
      • getConfig

        public java.lang.String getConfig​(java.lang.String name,
                                          java.lang.String defval)
        Get constraint parameter in profile configuration.
        Parameters:
        name - parameter name
        defval - default value if parameter does not exist
        Returns:
        parameter value if exists, defval if does not exist, or null if error occured
      • validate

        public abstract void validate​(IRequest request,
                                      X509CertInfo info)
                               throws ERejectException
        Validates the request. The request is not modified during the validation.
        Parameters:
        request - enrollment request
        info - certificate template
        Throws:
        ERejectException - request is rejected due to violation of constraint
      • validate

        public void validate​(IRequest request)
                      throws ERejectException
        Validates the request. The request is not modified during the validation. The current implementation of this method calls into the subclass's validate(request, info) method for validation checking.
        Specified by:
        validate in interface IPolicyConstraint
        Parameters:
        request - request
        Throws:
        ERejectException - request is rejected due to violation of constraint
      • getText

        public java.lang.String getText​(java.util.Locale locale)
        Description copied from interface: IPolicyConstraint
        Returns localized description of this constraint.
        Specified by:
        getText in interface IPolicyConstraint
        Parameters:
        locale - locale of the end-user
        Returns:
        localized description of this constraint
      • getName

        public java.lang.String getName​(java.util.Locale locale)
        Description copied from interface: IPolicyConstraint
        Returns localized name of this constraint.
        Specified by:
        getName in interface IPolicyConstraint
        Parameters:
        locale - locale of the end-user
        Returns:
        localized name of this constraint
      • isOptional

        protected boolean isOptional​(java.lang.String value)
      • getBoolean

        protected boolean getBoolean​(java.lang.String value)
      • getInt

        protected int getInt​(java.lang.String value)
      • getConfigBoolean

        protected boolean getConfigBoolean​(java.lang.String value)
      • getConfigInt

        protected int getConfigInt​(java.lang.String value)
      • isApplicable

        public boolean isApplicable​(IPolicyDefault def)
        Description copied from interface: IPolicyConstraint
        Checks if this constraint is applicable to the given default policy.
        Specified by:
        isApplicable in interface IPolicyConstraint
        Parameters:
        def - default policy to be checked
        Returns:
        true if this constraint can be applied to the given default policy