diff options
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv/policy')
18 files changed, 213 insertions, 251 deletions
diff --git a/pki/base/common/src/com/netscape/certsrv/policy/EPolicyException.java b/pki/base/common/src/com/netscape/certsrv/policy/EPolicyException.java index c8431fcfd..dacbb103d 100644 --- a/pki/base/common/src/com/netscape/certsrv/policy/EPolicyException.java +++ b/pki/base/common/src/com/netscape/certsrv/policy/EPolicyException.java @@ -17,25 +17,23 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.policy; - import java.util.Locale; import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.base.MessageFormatter; - /** - * This class represents Exceptions used by the policy package. - * The policies themselves do not raise exceptions but use them - * to format error messages. - * + * This class represents Exceptions used by the policy package. The policies + * themselves do not raise exceptions but use them to format error messages. + * * Adapted from EBasException * <P> + * * <PRE> * NOTE: The Policy Framework has been replaced by the Profile Framework. * </PRE> * <P> - * + * * @deprecated * @version $Revision$, $Date$ * @see java.text.MessageFormat @@ -49,12 +47,13 @@ public class EPolicyException extends EBaseException { /** * Resource class name. */ - private static final String POLICY_RESOURCES = PolicyResources.class.getName(); + private static final String POLICY_RESOURCES = PolicyResources.class + .getName(); /** * Constructs a base exception. * <P> - * + * * @param msgFormat exception details */ public EPolicyException(String msgFormat) { @@ -64,11 +63,12 @@ public class EPolicyException extends EBaseException { /** * Constructs a base exception with a parameter. For example, + * * <PRE> - * new EPolicyException("failed to load {0}", fileName); + * new EPolicyException("failed to load {0}", fileName); * </PRE> * <P> - * + * * @param msgFormat exception details in message string format * @param param message string parameter */ @@ -81,7 +81,7 @@ public class EPolicyException extends EBaseException { /** * Constructs a base exception with two String parameters. For example, * <P> - * + * * @param msgFormat exception details in message string format * @param param1 message string parameter * @param param2 message string parameter @@ -94,9 +94,9 @@ public class EPolicyException extends EBaseException { } /** - * Constructs a base exception. It can be used to carry - * a system exception that may contain information about - * the context. For example, + * Constructs a base exception. It can be used to carry a system exception + * that may contain information about the context. For example, + * * <PRE> * try { * ... @@ -105,7 +105,7 @@ public class EPolicyException extends EBaseException { * } * </PRE> * <P> - * + * * @param msgFormat exception details in message string format * @param param system exception */ @@ -116,10 +116,10 @@ public class EPolicyException extends EBaseException { } /** - * Constructs a base exception with a list of parameters - * that will be substituted into the message format. + * Constructs a base exception with a list of parameters that will be + * substituted into the message format. * <P> - * + * * @param msgFormat exception details in message string format * @param params list of message format parameters */ @@ -131,7 +131,7 @@ public class EPolicyException extends EBaseException { /** * Returns a list of parameters. * <P> - * + * * @return list of message format parameters */ public Object[] getParameters() { @@ -139,10 +139,10 @@ public class EPolicyException extends EBaseException { } /** - * Returns localized exception string. This method should - * only be called if a localized string is necessary. + * Returns localized exception string. This method should only be called if + * a localized string is necessary. * <P> - * + * * @return details message */ public String toString() { @@ -152,7 +152,7 @@ public class EPolicyException extends EBaseException { /** * Returns the string based on the given locale. * <P> - * + * * @param locale locale * @return details message */ diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IEnrollmentPolicy.java b/pki/base/common/src/com/netscape/certsrv/policy/IEnrollmentPolicy.java index bfd0e7c20..04de34341 100644 --- a/pki/base/common/src/com/netscape/certsrv/policy/IEnrollmentPolicy.java +++ b/pki/base/common/src/com/netscape/certsrv/policy/IEnrollmentPolicy.java @@ -17,20 +17,18 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.policy; - /** - * Interface for an enrollment policy rule. This provides general - * typing for rules so that a policy processor can group rules - * based on a particular type. + * Interface for an enrollment policy rule. This provides general typing for + * rules so that a policy processor can group rules based on a particular type. * <P> + * * <PRE> * NOTE: The Policy Framework has been replaced by the Profile Framework. * </PRE> * <P> - * + * * @deprecated * @version $Revision$, $Date$ */ public interface IEnrollmentPolicy extends IPolicyRule { } - diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IExpression.java b/pki/base/common/src/com/netscape/certsrv/policy/IExpression.java index 6bed58c5d..f66253aad 100644 --- a/pki/base/common/src/com/netscape/certsrv/policy/IExpression.java +++ b/pki/base/common/src/com/netscape/certsrv/policy/IExpression.java @@ -17,18 +17,17 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.policy; - import com.netscape.certsrv.request.IRequest; - /** * Interface for a policy expression. * <P> + * * <PRE> * NOTE: The Policy Framework has been replaced by the Profile Framework. * </PRE> * <P> - * + * * @deprecated * @version $Revision$, $Date$ */ @@ -48,12 +47,11 @@ public interface IExpression { /** * Evaluate the Expression. - * - * @param req The PKIRequest on which we are applying the condition. - * @return The return value. + * + * @param req The PKIRequest on which we are applying the condition. + * @return The return value. */ - boolean evaluate(IRequest req) - throws EPolicyException; + boolean evaluate(IRequest req) throws EPolicyException; /** * Convert to a string. diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameAsConstraintsConfig.java b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameAsConstraintsConfig.java index ff30dc11b..33eaa2983 100644 --- a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameAsConstraintsConfig.java +++ b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameAsConstraintsConfig.java @@ -17,21 +17,20 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.policy; - import java.util.Vector; import netscape.security.x509.GeneralName; - -/** - * Class that can be used to form general names from configuration file. - * Used by policies and extension commands. +/** + * Class that can be used to form general names from configuration file. Used by + * policies and extension commands. * <P> + * * <PRE> * NOTE: The Policy Framework has been replaced by the Profile Framework. * </PRE> * <P> - * + * * @deprecated * @version $Revision$, $Date$ */ @@ -39,14 +38,14 @@ public interface IGeneralNameAsConstraintsConfig { /** * Retrieves instance parameters. - * + * * @param params parameters */ public void getInstanceParams(Vector params); /** * Retrieves the general name. - * + * * @return general name */ public GeneralName getGeneralName(); diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameConfig.java b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameConfig.java index 1f93719d3..06badb548 100644 --- a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameConfig.java +++ b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameConfig.java @@ -17,23 +17,22 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.policy; - import java.util.Vector; import netscape.security.x509.GeneralName; import com.netscape.certsrv.base.EBaseException; - -/** - * Class that can be used to form general names from configuration file. - * Used by policies and extension commands. +/** + * Class that can be used to form general names from configuration file. Used by + * policies and extension commands. * <P> + * * <PRE> * NOTE: The Policy Framework has been replaced by the Profile Framework. * </PRE> * <P> - * + * * @deprecated * @version $Revision$, $Date$ */ @@ -41,27 +40,25 @@ public interface IGeneralNameConfig { /** * Forms a general name from string. - * + * * @param value general name in string * @return general name object * @exception EBaseException failed to form general name */ - public GeneralName formGeneralName(String value) - throws EBaseException; + public GeneralName formGeneralName(String value) throws EBaseException; /** * Forms general names from the given value. - * + * * @param value general name in string * @return a vector of general names * @exception EBaseException failed to form general name */ - public Vector formGeneralNames(Object value) - throws EBaseException; + public Vector formGeneralNames(Object value) throws EBaseException; /** * Retrieves the instance parameters. - * + * * @param params parameters */ public void getInstanceParams(Vector params); diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameUtil.java b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameUtil.java index c1526284a..7987dd2c3 100644 --- a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameUtil.java +++ b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameUtil.java @@ -17,16 +17,16 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.policy; - -/** - * Class that can be used to form general names from configuration file. - * Used by policies and extension commands. +/** + * Class that can be used to form general names from configuration file. Used by + * policies and extension commands. * <P> + * * <PRE> * NOTE: The Policy Framework has been replaced by the Profile Framework. * </PRE> * <P> - * + * * @deprecated * @version $Revision$, $Date$ */ @@ -51,30 +51,27 @@ public interface IGeneralNameUtil { */ public static final int DEF_NUM_GENERALNAMES = 8; - /** + /** * Default extended plugin info. */ - public static String - NUM_GENERALNAMES_INFO = "number;The total number of alternative names or identities permitted in the extension."; - public static String GENNAME_CHOICE_INFO = - "choice(" + - IGeneralNameUtil.GENNAME_CHOICE_RFC822NAME + "," + - IGeneralNameUtil.GENNAME_CHOICE_DIRECTORYNAME + "," + - IGeneralNameUtil.GENNAME_CHOICE_DNSNAME + "," + - IGeneralNameUtil.GENNAME_CHOICE_EDIPARTYNAME + "," + - IGeneralNameUtil.GENNAME_CHOICE_URL + "," + - IGeneralNameUtil.GENNAME_CHOICE_IPADDRESS + "," + - IGeneralNameUtil.GENNAME_CHOICE_REGISTEREDID + "," + - IGeneralNameUtil.GENNAME_CHOICE_OTHERNAME + ");" + - "GeneralName choice. See RFC 2459 appendix B2 on GeneralName."; - public static String GENNAME_VALUE_INFO = - "string;Value according to the GeneralName choice."; + public static String NUM_GENERALNAMES_INFO = "number;The total number of alternative names or identities permitted in the extension."; + public static String GENNAME_CHOICE_INFO = "choice(" + + IGeneralNameUtil.GENNAME_CHOICE_RFC822NAME + "," + + IGeneralNameUtil.GENNAME_CHOICE_DIRECTORYNAME + "," + + IGeneralNameUtil.GENNAME_CHOICE_DNSNAME + "," + + IGeneralNameUtil.GENNAME_CHOICE_EDIPARTYNAME + "," + + IGeneralNameUtil.GENNAME_CHOICE_URL + "," + + IGeneralNameUtil.GENNAME_CHOICE_IPADDRESS + "," + + IGeneralNameUtil.GENNAME_CHOICE_REGISTEREDID + "," + + IGeneralNameUtil.GENNAME_CHOICE_OTHERNAME + ");" + + "GeneralName choice. See RFC 2459 appendix B2 on GeneralName."; + public static String GENNAME_VALUE_INFO = "string;Value according to the GeneralName choice."; - public static String - PROP_NUM_GENERALNAMES_INFO = PROP_NUM_GENERALNAMES + ";" + NUM_GENERALNAMES_INFO; - public static String - PROP_GENNAME_CHOICE_INFO = PROP_GENNAME_CHOICE + ";" + GENNAME_CHOICE_INFO; - public static String - PROP_GENNAME_VALUE_INFO = PROP_GENNAME_VALUE + ";" + GENNAME_VALUE_INFO; + public static String PROP_NUM_GENERALNAMES_INFO = PROP_NUM_GENERALNAMES + + ";" + NUM_GENERALNAMES_INFO; + public static String PROP_GENNAME_CHOICE_INFO = PROP_GENNAME_CHOICE + ";" + + GENNAME_CHOICE_INFO; + public static String PROP_GENNAME_VALUE_INFO = PROP_GENNAME_VALUE + ";" + + GENNAME_VALUE_INFO; } diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNamesAsConstraintsConfig.java b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNamesAsConstraintsConfig.java index e64187b86..75c21f2bd 100644 --- a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNamesAsConstraintsConfig.java +++ b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNamesAsConstraintsConfig.java @@ -17,21 +17,20 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.policy; - import java.util.Vector; import netscape.security.x509.GeneralNames; - -/** - * Class that can be used to form general names from configuration file. - * Used by policies and extension commands. +/** + * Class that can be used to form general names from configuration file. Used by + * policies and extension commands. * <P> + * * <PRE> * NOTE: The Policy Framework has been replaced by the Profile Framework. * </PRE> * <P> - * + * * @deprecated * @version $Revision$, $Date$ */ @@ -39,14 +38,14 @@ public interface IGeneralNamesAsConstraintsConfig { /** * Retrieves a list of configured general names. - * + * * @return a list of general names */ public GeneralNames getGeneralNames(); /** * Retrieves instance parameters. - * + * * @param params instance parameters */ public void getInstanceParams(Vector params); diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNamesConfig.java b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNamesConfig.java index 644258567..197a25317 100644 --- a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNamesConfig.java +++ b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNamesConfig.java @@ -17,21 +17,20 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.policy; - import java.util.Vector; import netscape.security.x509.GeneralNames; - -/** - * Class that can be used to form general names from configuration file. - * Used by policies and extension commands. +/** + * Class that can be used to form general names from configuration file. Used by + * policies and extension commands. * <P> + * * <PRE> * NOTE: The Policy Framework has been replaced by the Profile Framework. * </PRE> * <P> - * + * * @deprecated * @version $Revision$, $Date$ */ @@ -39,14 +38,14 @@ public interface IGeneralNamesConfig { /** * Retrieves a list of configured general names. - * + * * @return general names */ public GeneralNames getGeneralNames(); /** * Retrieves the instance parameters. - * + * * @param params instance parameters */ public void getInstanceParams(Vector params); diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IKeyArchivalPolicy.java b/pki/base/common/src/com/netscape/certsrv/policy/IKeyArchivalPolicy.java index 13ba5f616..14a29256f 100644 --- a/pki/base/common/src/com/netscape/certsrv/policy/IKeyArchivalPolicy.java +++ b/pki/base/common/src/com/netscape/certsrv/policy/IKeyArchivalPolicy.java @@ -17,18 +17,17 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.policy; - /** * Interface for a key recovery policy rule. * <P> + * * <PRE> * NOTE: The Policy Framework has been replaced by the Profile Framework. * </PRE> * <P> - * + * * @deprecated * @version $Revision$, $Date$ */ public interface IKeyArchivalPolicy extends IPolicyRule { } - diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IKeyRecoveryPolicy.java b/pki/base/common/src/com/netscape/certsrv/policy/IKeyRecoveryPolicy.java index 1d173f28f..6de615673 100644 --- a/pki/base/common/src/com/netscape/certsrv/policy/IKeyRecoveryPolicy.java +++ b/pki/base/common/src/com/netscape/certsrv/policy/IKeyRecoveryPolicy.java @@ -17,18 +17,17 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.policy; - /** * Interface for a key recovery policy rule. * <P> + * * <PRE> * NOTE: The Policy Framework has been replaced by the Profile Framework. * </PRE> * <P> - * + * * @deprecated * @version $Revision$, $Date$ */ public interface IKeyRecoveryPolicy extends IPolicyRule { } - diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IPolicyPredicateParser.java b/pki/base/common/src/com/netscape/certsrv/policy/IPolicyPredicateParser.java index 7b5f44650..641932faa 100644 --- a/pki/base/common/src/com/netscape/certsrv/policy/IPolicyPredicateParser.java +++ b/pki/base/common/src/com/netscape/certsrv/policy/IPolicyPredicateParser.java @@ -17,15 +17,15 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.policy; - /** * Interface for policy predicate parsers. * <P> + * * <PRE> * NOTE: The Policy Framework has been replaced by the Profile Framework. * </PRE> * <P> - * + * * @deprecated * @version $Revision$, $Date$ */ @@ -33,11 +33,10 @@ public interface IPolicyPredicateParser { /** * Parse the predicate expression and return a vector of expressions. - * - * @param predicateExpression The predicate expression as read from the - * config file. - * @return expVector The vector of expressions. + * + * @param predicateExpression The predicate expression as read from the + * config file. + * @return expVector The vector of expressions. */ - IExpression parse(String predicateExpression) - throws EPolicyException; + IExpression parse(String predicateExpression) throws EPolicyException; } diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IPolicyProcessor.java b/pki/base/common/src/com/netscape/certsrv/policy/IPolicyProcessor.java index 834d462e0..5e2d297f9 100644 --- a/pki/base/common/src/com/netscape/certsrv/policy/IPolicyProcessor.java +++ b/pki/base/common/src/com/netscape/certsrv/policy/IPolicyProcessor.java @@ -17,7 +17,6 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.policy; - import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector; @@ -25,22 +24,22 @@ import java.util.Vector; import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.base.ISubsystem; - /** - * A generic interface for a policy processor. By making a processor - * extend the policy interface, we make even the processor a rule - - * which makes sense because a processor may be based on some rule - * such as evaluate all policies before returning the final result or - * return as soon as one of the policies return a failure and so on. - * - * By making both processor and policy rules implement a common - * interface, one can write rules that are processors as well. + * A generic interface for a policy processor. By making a processor extend the + * policy interface, we make even the processor a rule - which makes sense + * because a processor may be based on some rule such as evaluate all policies + * before returning the final result or return as soon as one of the policies + * return a failure and so on. + * + * By making both processor and policy rules implement a common interface, one + * can write rules that are processors as well. * <P> + * * <PRE> * NOTE: The Policy Framework has been replaced by the Profile Framework. * </PRE> * <P> - * + * * @deprecated * @version $Revision$, $Date$ */ @@ -61,42 +60,40 @@ public interface IPolicyProcessor extends ISubsystem, /** * Returns the policy substore id. - * - * @return storeID The policy store id used by this processor. + * + * @return storeID The policy store id used by this processor. */ String getPolicySubstoreId(); /** * Returns information on Policy impls. - * - * @return An enumeration of strings describing the information - * about policy implementations. Currently only the - * the implementation id is expected. + * + * @return An enumeration of strings describing the information about policy + * implementations. Currently only the the implementation id is + * expected. */ Enumeration getPolicyImplsInfo(); /** * Returns the rule implementations registered with this processor. - * - * @return An Enumeration of uninitialized IPolicyRule - * objects. + * + * @return An Enumeration of uninitialized IPolicyRule objects. */ Enumeration getPolicyImpls(); /** * Returns an implementation identified by a given id. - * - * @param id The implementation id. + * + * @param id The implementation id. * @return The uninitialized instance of the policy rule. */ IPolicyRule getPolicyImpl(String id); /** - * Returns configuration for an implmentation. - * - * @param id The implementation id. - * @return A vector of name/value pairs in the form of - * name=value. + * Returns configuration for an implmentation. + * + * @param id The implementation id. + * @return A vector of name/value pairs in the form of name=value. */ Vector getPolicyImplConfig(String id); @@ -104,53 +101,48 @@ public interface IPolicyProcessor extends ISubsystem, * Deletes a policy implementation identified by an impl id. * * - * @param id The impl id of the policy to be deleted. - * There shouldn't be any active instance for this - * implementation. + * @param id The impl id of the policy to be deleted. There shouldn't be any + * active instance for this implementation. * @exception EBaseException is thrown if an error occurs in deletion. */ - void deletePolicyImpl(String id) - throws EBaseException; + void deletePolicyImpl(String id) throws EBaseException; /** * Adds a policy implementation identified by an impl id. * - * @param id The impl id of the policy to be added. - * The id should be unique. - * @param classPath The fully qualified path for the implementation. + * @param id The impl id of the policy to be added. The id should be unique. + * @param classPath The fully qualified path for the implementation. * @exception EBaseException is thrown if an error occurs in addition. */ - void addPolicyImpl(String id, String classPath) - throws EBaseException; + void addPolicyImpl(String id, String classPath) throws EBaseException; /** * Returns information on Policy instances. - * - * @return An Enumeration of Strings describing the information - * about policy rule instances. + * + * @return An Enumeration of Strings describing the information about policy + * rule instances. */ Enumeration getPolicyInstancesInfo(); /** * Returns policy instances registered with this processor. - * + * * @return An Enumeration of policy instances. */ Enumeration getPolicyInstances(); /** * Returns instance configuration for a given instance id. - * - * @param id The rule id. - * @return A vector of name/value pairs in the form of - * name=value. + * + * @param id The rule id. + * @return A vector of name/value pairs in the form of name=value. */ Vector getPolicyInstanceConfig(String id); /** * Returns instance configuration for a given instance id. - * - * @param id The rule id. + * + * @param id The rule id. * @return the policy instance identified by the id. */ IPolicyRule getPolicyInstance(String id); @@ -158,41 +150,36 @@ public interface IPolicyProcessor extends ISubsystem, /** * Deletes a policy instance identified by an instance id. * - * @param id The instance id of the policy to be deleted. + * @param id The instance id of the policy to be deleted. * @exception EBaseException is thrown if an error occurs in deletion. */ - void deletePolicyInstance(String id) - throws EBaseException; + void deletePolicyInstance(String id) throws EBaseException; /** - * Adds a policy instance + * Adds a policy instance * - * @param id The impl id of the policy to be added. - * The id should be unique. + * @param id The impl id of the policy to be added. The id should be unique. * @param ht a Hashtable of config params. * @exception EBaseException is thrown if an error occurs in addition. */ - void addPolicyInstance(String id, Hashtable ht) - throws EBaseException; + void addPolicyInstance(String id, Hashtable ht) throws EBaseException; /** - * Modifies a policy instance + * Modifies a policy instance * - * @param id The impl id of the policy to be modified. - * The policy instance with this id should be present. + * @param id The impl id of the policy to be modified. The policy instance + * with this id should be present. * @param ht a Hashtable of config params. * @exception EBaseException is thrown if an error occurs in addition. */ - void modifyPolicyInstance(String id, Hashtable ht) - throws EBaseException; + void modifyPolicyInstance(String id, Hashtable ht) throws EBaseException; /** * Modifies policy ordering. - * + * * @param policyOrderStr The comma separated list of instance ids. - * + * */ void changePolicyInstanceOrdering(String policyOrderStr) - throws EBaseException; + throws EBaseException; } - diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IPolicyRule.java b/pki/base/common/src/com/netscape/certsrv/policy/IPolicyRule.java index d80a0d0c2..aa4dcde84 100644 --- a/pki/base/common/src/com/netscape/certsrv/policy/IPolicyRule.java +++ b/pki/base/common/src/com/netscape/certsrv/policy/IPolicyRule.java @@ -17,7 +17,6 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.policy; - import java.util.Vector; import com.netscape.certsrv.base.EBaseException; @@ -26,20 +25,19 @@ import com.netscape.certsrv.base.ISubsystem; import com.netscape.certsrv.request.IRequest; import com.netscape.certsrv.request.PolicyResult; - /** * Interface for a policy rule. * <P> + * * <PRE> * NOTE: The Policy Framework has been replaced by the Profile Framework. * </PRE> * <P> - * + * * @deprecated * @version $Revision$, $Date$ */ -public interface IPolicyRule - extends com.netscape.certsrv.request.IPolicy { +public interface IPolicyRule extends com.netscape.certsrv.request.IPolicy { public static final String PROP_ENABLE = "enable"; public static final String PROP_PREDICATE = "predicate"; public static final String PROP_IMPLNAME = "implName"; @@ -47,15 +45,15 @@ public interface IPolicyRule /** * Initializes the policy rule. * <P> - * + * * @param config The config store reference */ - void init(ISubsystem owner, IConfigStore config) - throws EBaseException; + void init(ISubsystem owner, IConfigStore config) throws EBaseException; /** * Gets the description for this policy rule. * <P> + * * @return The Description for this rule. */ String getDescription(); @@ -63,7 +61,7 @@ public interface IPolicyRule /** * Returns the name of the policy rule class. * <P> - * + * * @return The name of the policy class. */ String getName(); @@ -71,52 +69,52 @@ public interface IPolicyRule /** * Returns the name of the policy rule instance. * <P> - * - * @return The name of the policy rule instance. If none - * is set the name of the implementation will be returned. - * + * + * @return The name of the policy rule instance. If none is set the name of + * the implementation will be returned. + * */ String getInstanceName(); /** * Sets a predicate expression for rule matching. * <P> - * - * @param exp The predicate expression for the rule. + * + * @param exp The predicate expression for the rule. */ void setPredicate(IExpression exp); /** * Returns the predicate expression for the rule. * <P> - * + * * @return The predicate expression for the rule. */ IExpression getPredicate(); /** - * Applies the policy on the given Request. This may modify - * the request appropriately. + * Applies the policy on the given Request. This may modify the request + * appropriately. * <P> - * - * @param req The request on which to apply policy. + * + * @param req The request on which to apply policy. * @return The PolicyResult object. */ PolicyResult apply(IRequest req); /** * Return configured parameters for a policy rule instance. - * - * @return nvPairs A Vector of name/value pairs. Each name/value - * pair is constructed as a String in name=value format. + * + * @return nvPairs A Vector of name/value pairs. Each name/value pair is + * constructed as a String in name=value format. */ public Vector getInstanceParams(); /** * Return default parameters for a policy implementation. - * - * @return nvPairs A Vector of name/value pairs. Each name/value - * pair is constructed as a String in name=value. + * + * @return nvPairs A Vector of name/value pairs. Each name/value pair is + * constructed as a String in name=value. */ public Vector getDefaultParams(); @@ -126,4 +124,3 @@ public interface IPolicyRule public void setPolicyException(IRequest req, EBaseException ex); } - diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IPolicySet.java b/pki/base/common/src/com/netscape/certsrv/policy/IPolicySet.java index ea12f4b1b..0218cd476 100644 --- a/pki/base/common/src/com/netscape/certsrv/policy/IPolicySet.java +++ b/pki/base/common/src/com/netscape/certsrv/policy/IPolicySet.java @@ -17,28 +17,27 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.policy; - import java.util.Enumeration; import com.netscape.certsrv.request.IRequest; import com.netscape.certsrv.request.PolicyResult; - /** - * Represents a set of policy rules. Policy rules are ordered from - * lowest priority to highest priority. The priority assignment for rules - * is not enforced by this interface. Various implementation may - * use different mechanisms such as a linear ordering of rules - * in a configuration file or explicit assignment of priority levels ..etc. - * The policy system initialization needs to deal with reading the rules, sorting - * them in increasing order of priority and presenting an ordered vector of rules - * via the IPolicySet interface. + * Represents a set of policy rules. Policy rules are ordered from lowest + * priority to highest priority. The priority assignment for rules is not + * enforced by this interface. Various implementation may use different + * mechanisms such as a linear ordering of rules in a configuration file or + * explicit assignment of priority levels ..etc. The policy system + * initialization needs to deal with reading the rules, sorting them in + * increasing order of priority and presenting an ordered vector of rules via + * the IPolicySet interface. * <P> + * * <PRE> * NOTE: The Policy Framework has been replaced by the Profile Framework. * </PRE> * <P> - * + * * @deprecated * @version $Revision$, $Date$ */ @@ -47,7 +46,7 @@ public interface IPolicySet { /** * Returns the name of the rule set. * <P> - * + * * @return The name of the rule set. */ String getName(); @@ -55,6 +54,7 @@ public interface IPolicySet { /** * Returns the no of rules in a set. * <P> + * * @return the no of rules. */ int count(); @@ -62,24 +62,24 @@ public interface IPolicySet { /** * Add a policy rule. * <P> - * + * * @param ruleName The name of the rule to be added. - * @param rule The rule to be added. + * @param rule The rule to be added. */ void addRule(String ruleName, IPolicyRule rule); /** * Removes a policy rule identified by the given name. - * - * @param ruleName The name of the rule to be removed. + * + * @param ruleName The name of the rule to be removed. */ void removeRule(String ruleName); /** * Returns the rule identified by a given name. * <P> - * - * @param ruleName The name of the rule to be return. + * + * @param ruleName The name of the rule to be return. * @return The rule identified by the given name or null if none exists. */ IPolicyRule getRule(String ruleName); @@ -87,20 +87,19 @@ public interface IPolicySet { /** * Returns an enumeration of rules. * <P> - * + * * @return An enumeration of rules. */ Enumeration getRules(); /** - * Apply policy rules on a request. This call may modify - * the request content. - * - * @param req The request to apply policies on. - * - * <P> + * Apply policy rules on a request. This call may modify the request + * content. + * + * @param req The request to apply policies on. + * + * <P> * @return The policy result. */ PolicyResult apply(IRequest req); } - diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IRenewalPolicy.java b/pki/base/common/src/com/netscape/certsrv/policy/IRenewalPolicy.java index 7bf2026e2..28f56fe73 100644 --- a/pki/base/common/src/com/netscape/certsrv/policy/IRenewalPolicy.java +++ b/pki/base/common/src/com/netscape/certsrv/policy/IRenewalPolicy.java @@ -17,18 +17,17 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.policy; - /** * Interface for a renewal policy rule. * <P> + * * <PRE> * NOTE: The Policy Framework has been replaced by the Profile Framework. * </PRE> * <P> - * + * * @deprecated * @version $Revision$, $Date$ */ public interface IRenewalPolicy extends IPolicyRule { } - diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IRevocationPolicy.java b/pki/base/common/src/com/netscape/certsrv/policy/IRevocationPolicy.java index e0ecfb16f..7e6084c76 100644 --- a/pki/base/common/src/com/netscape/certsrv/policy/IRevocationPolicy.java +++ b/pki/base/common/src/com/netscape/certsrv/policy/IRevocationPolicy.java @@ -17,18 +17,17 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.policy; - /** * Interface for a revocation policy rule. * <P> + * * <PRE> * NOTE: The Policy Framework has been replaced by the Profile Framework. * </PRE> * <P> - * + * * @deprecated * @version $Revision$, $Date$ */ public interface IRevocationPolicy extends IPolicyRule { } - diff --git a/pki/base/common/src/com/netscape/certsrv/policy/ISubjAltNameConfig.java b/pki/base/common/src/com/netscape/certsrv/policy/ISubjAltNameConfig.java index 75df22de1..388bd4056 100644 --- a/pki/base/common/src/com/netscape/certsrv/policy/ISubjAltNameConfig.java +++ b/pki/base/common/src/com/netscape/certsrv/policy/ISubjAltNameConfig.java @@ -17,18 +17,16 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.policy; - - - -/** - * Class that can be used to form general names from configuration file. - * Used by policies and extension commands. +/** + * Class that can be used to form general names from configuration file. Used by + * policies and extension commands. * <P> + * * <PRE> * NOTE: The Policy Framework has been replaced by the Profile Framework. * </PRE> * <P> - * + * * @deprecated * @version $Revision$, $Date$ */ @@ -36,14 +34,14 @@ public interface ISubjAltNameConfig extends IGeneralNameConfig { /** * Retrieves configuration prefix. - * + * * @return prefix */ public String getPfx(); /** * Retrieves configuration attribute. - * + * * @return attribute */ public String getAttr(); diff --git a/pki/base/common/src/com/netscape/certsrv/policy/PolicyResources.java b/pki/base/common/src/com/netscape/certsrv/policy/PolicyResources.java index c8bcec2ce..d330b719f 100644 --- a/pki/base/common/src/com/netscape/certsrv/policy/PolicyResources.java +++ b/pki/base/common/src/com/netscape/certsrv/policy/PolicyResources.java @@ -17,18 +17,17 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.policy; - import java.util.ListResourceBundle; - /** * Error messages for Policies. * <P> + * * <PRE> * NOTE: The Policy Framework has been replaced by the Profile Framework. * </PRE> * <P> - * + * * @deprecated * @version $Revision$, $Date$ * @see java.util.ListResourceBundle |