com.netscape.certsrv.profile
Interface IPolicyConstraint

All Superinterfaces:
IConfigTemplate
All Known Implementing Classes:
BasicConstraintsExtConstraint, CAEnrollConstraint, CAValidityConstraint, EnrollConstraint, ExtendedKeyUsageExtConstraint, ExtensionConstraint, KeyConstraint, KeyUsageExtConstraint, NoConstraint, NSCertTypeExtConstraint, RenewGracePeriodConstraint, SigningAlgConstraint, SubjectNameConstraint, UniqueKeyConstraint, UniqueSubjectNameConstraint, ValidityConstraint

public interface IPolicyConstraint
extends IConfigTemplate

This represents a constraint policy. A constraint policy validates if the given request conforms to the set rules.

Version:
$Revision: 1211 $, $Date: 2010-08-18 10:15:37 -0700 (Wed, 18 Aug 2010) $

Method Summary
 IConfigStore getConfigStore()
          Returns the corresponding configuration store of this constraint policy.
 java.lang.String getName(java.util.Locale locale)
          Returns localized name of this constraint.
 java.lang.String getText(java.util.Locale locale)
          Returns localized description of this constraint.
 void init(IProfile profile, IConfigStore config)
          Initializes this constraint policy.
 boolean isApplicable(IPolicyDefault def)
          Checks if this constraint is applicable to the given default policy.
 void validate(IRequest request)
          Validates the request.
 
Methods inherited from interface com.netscape.certsrv.property.IConfigTemplate
getConfig, getConfigDescriptor, getConfigNames, setConfig
 

Method Detail

init

void init(IProfile profile,
          IConfigStore config)
          throws EProfileException
Initializes this constraint policy.

Parameters:
profile - owner of this policy
config - configuration store for this constraint
Throws:
EProfileException - failed to initialize

getConfigStore

IConfigStore getConfigStore()
Returns the corresponding configuration store of this constraint policy.

Returns:
config store of this constraint

validate

void validate(IRequest request)
              throws ERejectException
Validates the request. The request is not modified during the validation.

Parameters:
request - request to be validated
Throws:
ERejectException - reject the given request

getText

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

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

boolean isApplicable(IPolicyDefault 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