Class RenewGracePeriodConstraint
- java.lang.Object
-
- com.netscape.cms.profile.constraint.PolicyConstraint
-
- com.netscape.cms.profile.constraint.EnrollConstraint
-
- com.netscape.cms.profile.constraint.RenewGracePeriodConstraint
-
- All Implemented Interfaces:
com.netscape.certsrv.property.IConfigTemplate
public class RenewGracePeriodConstraint extends EnrollConstraint
This class supports renewal grace period, which has two parameters: graceBefore and graceAfter- Version:
- $Revision$, $Date$
- Author:
- Christina Fu
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONFIG_RENEW_GRACE_AFTER
static java.lang.String
CONFIG_RENEW_GRACE_BEFORE
static org.slf4j.Logger
logger
-
Fields inherited from class com.netscape.cms.profile.constraint.EnrollConstraint
CONFIG_NAME, CONFIG_PARAMS, mConfig, mConfigNames
-
-
Constructor Summary
Constructors Constructor Description RenewGracePeriodConstraint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.netscape.certsrv.property.IDescriptor
getConfigDescriptor(java.util.Locale locale, java.lang.String name)
Returns the descriptors of configuration parameter.java.lang.String
getText(java.util.Locale locale)
Returns localized description of this constraint.boolean
isApplicable(PolicyDefault def)
Checks if this constraint is applicable to the given default policy.void
setConfig(java.lang.String name, java.lang.String value)
Sets configuration parameter.void
validate(com.netscape.certsrv.request.IRequest req, org.mozilla.jss.netscape.security.x509.X509CertInfo info)
Validates the request.-
Methods inherited from class com.netscape.cms.profile.constraint.EnrollConstraint
addConfigName, getBoolean, getConfig, getConfig, getConfigBoolean, getConfigInt, getConfigNames, getConfigStore, getExtension, getInt, getLocale, getName, getValueDescriptor, init, isOptional, validate
-
-
-
-
Field Detail
-
logger
public static org.slf4j.Logger logger
-
CONFIG_RENEW_GRACE_BEFORE
public static final java.lang.String CONFIG_RENEW_GRACE_BEFORE
- See Also:
- Constant Field Values
-
CONFIG_RENEW_GRACE_AFTER
public static final java.lang.String CONFIG_RENEW_GRACE_AFTER
- See Also:
- Constant Field Values
-
-
Method Detail
-
setConfig
public void setConfig(java.lang.String name, java.lang.String value) throws com.netscape.certsrv.property.EPropertyException
Description copied from interface:com.netscape.certsrv.property.IConfigTemplate
Sets configuration parameter.- Specified by:
setConfig
in interfacecom.netscape.certsrv.property.IConfigTemplate
- Overrides:
setConfig
in classEnrollConstraint
- Parameters:
name
- parameter namevalue
- parameter value- Throws:
com.netscape.certsrv.property.EPropertyException
- failed to set parameter
-
getConfigDescriptor
public com.netscape.certsrv.property.IDescriptor getConfigDescriptor(java.util.Locale locale, java.lang.String name)
Description copied from interface:com.netscape.certsrv.property.IConfigTemplate
Returns the descriptors of configuration parameter.- Specified by:
getConfigDescriptor
in interfacecom.netscape.certsrv.property.IConfigTemplate
- Overrides:
getConfigDescriptor
in classEnrollConstraint
- Parameters:
locale
- user localename
- configuration parameter name- Returns:
- descriptor
-
validate
public void validate(com.netscape.certsrv.request.IRequest req, org.mozilla.jss.netscape.security.x509.X509CertInfo info) throws com.netscape.certsrv.profile.ERejectException
Description copied from class:EnrollConstraint
Validates the request. The request is not modified during the validation.- Specified by:
validate
in classEnrollConstraint
- Parameters:
req
- enrollment requestinfo
- certificate template- Throws:
com.netscape.certsrv.profile.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 classEnrollConstraint
- 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 classEnrollConstraint
- Parameters:
def
- default policy to be checked- Returns:
- true if this constraint can be applied to the given default policy
-
-