Class PolicyConstraint

  • All Implemented Interfaces:
    com.netscape.certsrv.property.IConfigTemplate
    Direct Known Subclasses:
    EnrollConstraint, NoConstraint

    public abstract class PolicyConstraint
    extends java.lang.Object
    implements com.netscape.certsrv.property.IConfigTemplate
    This represents a constraint policy. A constraint policy validates if the given request conforms to the set rules.

    Version:
    $Revision$, $Date$
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract IConfigStore getConfigStore()
      Returns the corresponding configuration store of this constraint policy.
      abstract java.lang.String getName​(java.util.Locale locale)
      Returns localized name of this constraint.
      abstract java.lang.String getText​(java.util.Locale locale)
      Returns localized description of this constraint.
      abstract void init​(IConfigStore config)
      Initializes this constraint policy.
      abstract boolean isApplicable​(PolicyDefault def)
      Checks if this constraint is applicable to the given default policy.
      abstract void validate​(com.netscape.certsrv.request.IRequest request)
      Validates the request.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.netscape.certsrv.property.IConfigTemplate

        getConfig, getConfigDescriptor, getConfigNames, setConfig
    • Constructor Detail

      • PolicyConstraint

        public PolicyConstraint()
    • Method Detail

      • init

        public abstract void init​(IConfigStore config)
                           throws com.netscape.certsrv.profile.EProfileException
        Initializes this constraint policy.
        Parameters:
        config - configuration store for this constraint
        Throws:
        com.netscape.certsrv.profile.EProfileException - failed to initialize
      • getConfigStore

        public abstract IConfigStore getConfigStore()
        Returns the corresponding configuration store of this constraint policy.
        Returns:
        config store of this constraint
      • validate

        public abstract void validate​(com.netscape.certsrv.request.IRequest request)
                               throws com.netscape.certsrv.profile.ERejectException
        Validates the request. The request is not modified during the validation.
        Parameters:
        request - request to be validated
        Throws:
        com.netscape.certsrv.profile.ERejectException - reject the given request
      • getText

        public abstract java.lang.String getText​(java.util.Locale locale)
        Returns localized description of this constraint.
        Parameters:
        locale - locale of the end-user
        Returns:
        localized description of this constraint
      • getName

        public abstract java.lang.String getName​(java.util.Locale locale)
        Returns localized name of this constraint.
        Parameters:
        locale - locale of the end-user
        Returns:
        localized name of this constraint
      • isApplicable

        public abstract boolean isApplicable​(PolicyDefault def)
        Checks if this constraint is applicable to the given default policy.
        Parameters:
        def - default policy to be checked
        Returns:
        true if this constraint can be applied to the given default policy