diff options
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv/publish')
26 files changed, 281 insertions, 290 deletions
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ECompSyntaxErr.java b/pki/base/common/src/com/netscape/certsrv/publish/ECompSyntaxErr.java index 147bdd200..a3a109900 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/ECompSyntaxErr.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/ECompSyntaxErr.java @@ -17,16 +17,14 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import com.netscape.certsrv.ldap.ELdapException; - /** - * This type of exception is thrown in cases where an parsing - * error is found while evaluating a PKI component. An example + * This type of exception is thrown in cases where an parsing + * error is found while evaluating a PKI component. An example * would be in trying to evaluate a PKI authentication message and * the parsing operation fails due to a missing token. - * + * * @version $Revision$ $Date$ */ public class ECompSyntaxErr extends ELdapException { @@ -37,8 +35,9 @@ public class ECompSyntaxErr extends ELdapException { private static final long serialVersionUID = -2224290038321971845L; /** - * Construct a ECompSyntaxErr - * @param errorString The descriptive error condition. + * Construct a ECompSyntaxErr + * + * @param errorString The descriptive error condition. */ public ECompSyntaxErr(String errorString) { diff --git a/pki/base/common/src/com/netscape/certsrv/publish/EMapperNotFound.java b/pki/base/common/src/com/netscape/certsrv/publish/EMapperNotFound.java index 8c482a4e8..fdf4a1b9f 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/EMapperNotFound.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/EMapperNotFound.java @@ -17,13 +17,11 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import com.netscape.certsrv.ldap.ELdapException; - /** - * Exception for Publish Mapper not found. - * + * Exception for Publish Mapper not found. + * * @version $Revision$ $Date$ */ public class EMapperNotFound extends ELdapException { @@ -35,6 +33,7 @@ public class EMapperNotFound extends ELdapException { /** * Constructs a exception for a missing required mapper + * * @param errorString Detailed error message. */ public EMapperNotFound(String errorString) { diff --git a/pki/base/common/src/com/netscape/certsrv/publish/EMapperPluginNotFound.java b/pki/base/common/src/com/netscape/certsrv/publish/EMapperPluginNotFound.java index d487488b3..f8f18c5ff 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/EMapperPluginNotFound.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/EMapperPluginNotFound.java @@ -17,13 +17,11 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import com.netscape.certsrv.ldap.ELdapException; - /** * Exception for Mapper Plugin not found. - * + * * @version $Revision$ $Date$ */ public class EMapperPluginNotFound extends ELdapException { @@ -35,10 +33,10 @@ public class EMapperPluginNotFound extends ELdapException { /** * Constructs a exception for a missing mapper plugin + * * @param errorString Detailed error message. */ public EMapperPluginNotFound(String errorString) { super(errorString); } } - diff --git a/pki/base/common/src/com/netscape/certsrv/publish/EPublisherNotFound.java b/pki/base/common/src/com/netscape/certsrv/publish/EPublisherNotFound.java index 12054dd15..176001e99 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/EPublisherNotFound.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/EPublisherNotFound.java @@ -17,13 +17,11 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import com.netscape.certsrv.ldap.ELdapException; - /** * Exception for Publisher not found. Required for successful publishing. - * + * * @version $Revision$ $Date$ */ public class EPublisherNotFound extends ELdapException { @@ -35,6 +33,7 @@ public class EPublisherNotFound extends ELdapException { /** * Constructs a exception for a missing required publisher. + * * @param errorString Detailed error message. */ public EPublisherNotFound(String errorString) { diff --git a/pki/base/common/src/com/netscape/certsrv/publish/EPublisherPluginNotFound.java b/pki/base/common/src/com/netscape/certsrv/publish/EPublisherPluginNotFound.java index 0a7fa1caf..56076863a 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/EPublisherPluginNotFound.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/EPublisherPluginNotFound.java @@ -17,13 +17,11 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import com.netscape.certsrv.ldap.ELdapException; - /** - * Exception for Publisher Plugin not found. Plugin implementation is required to actually publish. - * + * Exception for Publisher Plugin not found. Plugin implementation is required to actually publish. + * * @version $Revision$ $Date$ */ public class EPublisherPluginNotFound extends ELdapException { @@ -35,10 +33,10 @@ public class EPublisherPluginNotFound extends ELdapException { /** * Constructs a exception for a missing publisher plugin. + * * @param errorString Detailed error message. */ public EPublisherPluginNotFound(String errorString) { super(errorString); } } - diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ERuleNotFound.java b/pki/base/common/src/com/netscape/certsrv/publish/ERuleNotFound.java index 2094967df..01c9897eb 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/ERuleNotFound.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/ERuleNotFound.java @@ -17,13 +17,11 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import com.netscape.certsrv.ldap.ELdapException; - /** * Exception for Ldap Publishing Rule not found. - * + * * @version $Revision$ $Date$ */ public class ERuleNotFound extends ELdapException { @@ -35,6 +33,7 @@ public class ERuleNotFound extends ELdapException { /** * Constructs a exception for a missing required rule, which links a publisher and mapper. + * * @param errorString Detailed error message. */ public ERuleNotFound(String errorString) { diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ERulePluginNotFound.java b/pki/base/common/src/com/netscape/certsrv/publish/ERulePluginNotFound.java index 24ffa11a0..f619e7f4a 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/ERulePluginNotFound.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/ERulePluginNotFound.java @@ -17,13 +17,11 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import com.netscape.certsrv.ldap.ELdapException; - /** - * Exception for Publisher Rule plugin not found. Plugin required to implement Ldap Rule. - * + * Exception for Publisher Rule plugin not found. Plugin required to implement Ldap Rule. + * * @version $Revision$ $Date$ */ public class ERulePluginNotFound extends ELdapException { @@ -35,10 +33,10 @@ public class ERulePluginNotFound extends ELdapException { /** * Constructs a exception for a missing rule plugin. + * * @param errorString Detailed error message. */ public ERulePluginNotFound(String errorString) { super(errorString); } } - diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ICRLPublisher.java b/pki/base/common/src/com/netscape/certsrv/publish/ICRLPublisher.java index cae75d2f8..cd5763cdb 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/ICRLPublisher.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/ICRLPublisher.java @@ -17,50 +17,48 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import netscape.security.x509.X509CRLImpl; import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.base.IConfigStore; import com.netscape.certsrv.base.ISubsystem; - /** * This interface represents a CRL publisher that is * invoked when CRL publishing is requested by CMS. - * Note that CMS, by default, shipped with a LDAP-based - * CRL publisher that can be configured via + * Note that CMS, by default, shipped with a LDAP-based + * CRL publisher that can be configured via * Certificiate Manager/LDAP Publishing panel. This - * interface provides administrator additional capability + * interface provides administrator additional capability * of publishing CRL to different destinations. - * + * * The CRL publishing frequency is configured via - * Netscape Certificate Server Console's + * Netscape Certificate Server Console's * Certificate Manager/Revocation List panel. - * The CRL publishing may occur either everytime a + * The CRL publishing may occur either everytime a * certificate is revoked or at a pre-defined interval. * * To try out this new CRL publisher mechanism, do * the following: * (1) Write a sample CRL publisher class that implements - * ICRLPublisher interface. For example, + * ICRLPublisher interface. For example, * * <code> * public class CRLPublisher implements ICRLPublisher * { * public void init(ISubsystem owner, IConfigStore config) - * throws EBaseException + * throws EBaseException * { - * log(ILogger.LL_DEBUG, "CRLPublisher: Initialized"); + * log(ILogger.LL_DEBUG, "CRLPublisher: Initialized"); * } - * - * public void publish(String issuingPointId, X509CRLImpl crl) + * + * public void publish(String issuingPointId, X509CRLImpl crl) * throws EBaseException * { * log(ILogger.LL_DEBUG, "CRLPublisher: " + issuingPointId + * " crl=" + crl); * } - * + * * public void log(int level, String msg) * { * Logger.getLogger().log(ILogger.EV_SYSTEM, @@ -69,14 +67,14 @@ import com.netscape.certsrv.base.ISubsystem; * } * } * </code> - * - * (2) Compile the class and place the class into - * <server-root>\bin\cert\classes directory. + * + * (2) Compile the class and place the class into + * <server-root>\bin\cert\classes directory. * (3) Add the following parameter to CMS.cfg - * ca.crlPublisher.class=<implementation class> - * For example, - * ca.crlPublisher.class=myCRLPublisher - * + * ca.crlPublisher.class=<implementation class> + * For example, + * ca.crlPublisher.class=myCRLPublisher + * * @version $Revision$, $Date$ */ public interface ICRLPublisher { @@ -84,26 +82,26 @@ public interface ICRLPublisher { /** * Initializes this CRL publisher. * - * @param owner parent of the publisher. An object of type - * CertificateAuthority. + * @param owner parent of the publisher. An object of type + * CertificateAuthority. * @param config config store for this publisher. If this - * publisher requires configuration parameters for - * initialization, the parameters should be placed - * in CMS.cfg as ca.crlPublisher.<paramType>=<paramValue> + * publisher requires configuration parameters for + * initialization, the parameters should be placed + * in CMS.cfg as ca.crlPublisher.<paramType>=<paramValue> * @exception EBaseException failed to initialize this publisher */ - public void init(ISubsystem owner, IConfigStore config) - throws EBaseException; + public void init(ISubsystem owner, IConfigStore config) + throws EBaseException; /** * Publishes CRL. This method is invoked by CMS based * on the configured CRL publishing frequency. - * - * @param issuingPointId CRL issuing point identifier - * (i.e. MasterCRL) + * + * @param issuingPointId CRL issuing point identifier + * (i.e. MasterCRL) * @param crl CRL that is publishing * @exception EBaseException failed to publish */ - public void publish(String issuingPointId, X509CRLImpl crl) - throws EBaseException; -} + public void publish(String issuingPointId, X509CRLImpl crl) + throws EBaseException; +} diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ILdapCertMapper.java b/pki/base/common/src/com/netscape/certsrv/publish/ILdapCertMapper.java index cd4012a45..7e2e1116c 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/ILdapCertMapper.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/ILdapCertMapper.java @@ -17,7 +17,6 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import java.security.cert.X509Certificate; import java.util.Vector; @@ -25,10 +24,9 @@ import netscape.ldap.LDAPConnection; import com.netscape.certsrv.ldap.ELdapException; - -/** - * Interface for mapping a X509 certificate to a LDAP entry. - * +/** + * Interface for mapping a X509 certificate to a LDAP entry. + * * @version $Revision$ $Date$ */ public interface ILdapCertMapper extends ILdapPlugin { @@ -56,16 +54,17 @@ public interface ILdapCertMapper extends ILdapPlugin { /** * maps a certificate to a LDAP entry. * returns dn of the mapped LDAP entry. + * * @param conn the LDAP connection * @param cert the certificate to map * @param checkForCert whether to check for the presence of the cert - * @exception ELdapException Failed to map. + * @exception ELdapException Failed to map. * @return LdapCertMapResult indicates whether a mapping was successful - * and whether a certificate was found if checkForCert was true. - * If checkForCert was not set the hasCert method in LdapCertMapResult - * should be ignored. + * and whether a certificate was found if checkForCert was true. + * If checkForCert was not set the hasCert method in LdapCertMapResult + * should be ignored. */ - public LdapCertMapResult map(LDAPConnection conn, - X509Certificate cert, boolean checkForCert) - throws ELdapException; + public LdapCertMapResult map(LDAPConnection conn, + X509Certificate cert, boolean checkForCert) + throws ELdapException; } diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ILdapCrlMapper.java b/pki/base/common/src/com/netscape/certsrv/publish/ILdapCrlMapper.java index a15ea0abc..252a09ec3 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/ILdapCrlMapper.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/ILdapCrlMapper.java @@ -17,7 +17,6 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import netscape.ldap.LDAPConnection; import netscape.security.x509.X509CRLImpl; @@ -25,10 +24,9 @@ import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.base.IConfigStore; import com.netscape.certsrv.ldap.ELdapException; - -/** - * Interface for mapping a CRL to a LDAP entry. - * +/** + * Interface for mapping a CRL to a LDAP entry. + * * @version $Revision$ $Date$ */ public interface ILdapCrlMapper { @@ -36,25 +34,27 @@ public interface ILdapCrlMapper { /** * maps a crl to a LDAP entry. * returns dn of the mapped LDAP entry. + * * @param conn the LDAP connection * @param crl the CRL to map * @param checkForCrl whether to check for the presence of the CRL - * @exception ELdapException Failed to map CRL to entry. + * @exception ELdapException Failed to map CRL to entry. * @return LdapCertMapResult indicates whether a mapping was successful - * and whether a certificate was found if checkForCert was true. - * If checkForCert was not set the hasCert method in LdapCertMapResult - * should be ignored. + * and whether a certificate was found if checkForCert was true. + * If checkForCert was not set the hasCert method in LdapCertMapResult + * should be ignored. */ - public LdapCertMapResult - map(LDAPConnection conn, X509CRLImpl crl, boolean checkForCrl) - throws ELdapException; + public LdapCertMapResult + map(LDAPConnection conn, X509CRLImpl crl, boolean checkForCrl) + throws ELdapException; /** * initialize from config store. + * * @param config the configuration store to initialize from. * @exception ELdapException Initialization failed due to Ldap error. * @exception EBaseException Initialization failed. */ public void init(IConfigStore config) - throws ELdapException, EBaseException; + throws ELdapException, EBaseException; } diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ILdapExpression.java b/pki/base/common/src/com/netscape/certsrv/publish/ILdapExpression.java index 26360fe89..4537636c1 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/ILdapExpression.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/ILdapExpression.java @@ -17,15 +17,13 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import com.netscape.certsrv.base.SessionContext; import com.netscape.certsrv.ldap.ELdapException; import com.netscape.certsrv.request.IRequest; - /** * Interface for a Ldap predicate expression. - * + * * @version $Revision$, $Date$ */ public interface ILdapExpression { @@ -44,28 +42,28 @@ public interface ILdapExpression { /** * Evaluate the Expression. - * - * @param sc The SessionContext on which we are applying the condition. - * @return The return value. - * @exception ELdapExeption Failed to evaluate expression. + * + * @param sc The SessionContext on which we are applying the condition. + * @return The return value. + * @exception ELdapExeption Failed to evaluate expression. */ boolean evaluate(SessionContext sc) - throws ELdapException; + throws ELdapException; /** * Evaluate the Expression. - * - * @param req The PKIRequest on which we are applying the condition. - * @return The return value. - * @exception ELdapExeption Failed to evaluate expression. + * + * @param req The PKIRequest on which we are applying the condition. + * @return The return value. + * @exception ELdapExeption Failed to evaluate expression. */ boolean evaluate(IRequest req) - throws ELdapException; + throws ELdapException; /** * Convert to a string. + * * @return String representation of expression. */ public String toString(); } - diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ILdapMapper.java b/pki/base/common/src/com/netscape/certsrv/publish/ILdapMapper.java index c4afd0397..09238421f 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/ILdapMapper.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/ILdapMapper.java @@ -17,7 +17,6 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import java.util.Vector; import netscape.ldap.LDAPConnection; @@ -25,10 +24,9 @@ import netscape.ldap.LDAPConnection; import com.netscape.certsrv.ldap.ELdapException; import com.netscape.certsrv.request.IRequest; - -/** - * Interface for mapping a X509 certificate to a LDAP entry. - * +/** + * Interface for mapping a X509 certificate to a LDAP entry. + * * @version $Revision$ $Date$ */ public interface ILdapMapper extends ILdapPlugin { @@ -56,26 +54,27 @@ public interface ILdapMapper extends ILdapPlugin { /** * maps a certificate to a LDAP entry. * returns dn of the mapped LDAP entry. + * * @param conn the LDAP connection * @param obj the object to map * @return dn indicates whether a mapping was successful * @exception ELdapException Map operation failed. */ - public String - map(LDAPConnection conn, Object obj) - throws ELdapException; + public String + map(LDAPConnection conn, Object obj) + throws ELdapException; /** * maps a certificate to a LDAP entry. * returns dn of the mapped LDAP entry. + * * @param conn the LDAP connection - * @param r the request to map - * @param obj the object to map + * @param r the request to map + * @param obj the object to map * @return dn indicates whether a mapping was successful * @exception ELdapException Map operation failed. */ - public String - map(LDAPConnection conn, IRequest r, Object obj) - throws ELdapException; + public String + map(LDAPConnection conn, IRequest r, Object obj) + throws ELdapException; } - diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ILdapPlugin.java b/pki/base/common/src/com/netscape/certsrv/publish/ILdapPlugin.java index b73b5ae28..b0a9fe73b 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/ILdapPlugin.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/ILdapPlugin.java @@ -17,27 +17,26 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.base.IConfigStore; import com.netscape.certsrv.ldap.ELdapException; - -/** +/** * Interface for any Ldap plugin. - * + * * @version $Revision$ $Date$ */ public interface ILdapPlugin { /** * Initialize from config store. + * * @param config the configuration store to initialize from. * @exception ELdapException initialization failed due to Ldap error. * @exception EBaseException initialization failed. */ public void init(IConfigStore config) - throws EBaseException, ELdapException; + throws EBaseException, ELdapException; /** * Return config store. diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ILdapPluginImpl.java b/pki/base/common/src/com/netscape/certsrv/publish/ILdapPluginImpl.java index e84b62fc1..db52a9106 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/ILdapPluginImpl.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/ILdapPluginImpl.java @@ -17,37 +17,37 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.base.IConfigStore; import com.netscape.certsrv.base.IPluginImpl; import com.netscape.certsrv.base.ISubsystem; import com.netscape.certsrv.ldap.ELdapException; - -/** +/** * Interface for any ldap plugin. Plugin implementation is defined here. - * + * * @version $Revision$ $Date$ */ public interface ILdapPluginImpl extends IPluginImpl { /** * initialize from config store. + * * @param config the configuration store to initialize from. * @exception ELdapException initializtion failed due to Ldap error. * @exception EBaseException initialization failed. */ public void init(ISubsystem sys, IConfigStore config) - throws EBaseException, ELdapException; + throws EBaseException, ELdapException; /** * initialize from config store and Isubsystem. + * * @param config the configuration store to initialize from. * @exception ELdapException initializtion failed due to Ldap error. * @exception EBaseException initialization failed. */ public void init(IConfigStore config) - throws EBaseException, ELdapException; + throws EBaseException, ELdapException; } diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ILdapPublishModule.java b/pki/base/common/src/com/netscape/certsrv/publish/ILdapPublishModule.java index 001d472bc..81e5be952 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/ILdapPublishModule.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/ILdapPublishModule.java @@ -17,14 +17,12 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import com.netscape.certsrv.request.IRequest; import com.netscape.certsrv.request.IRequestListener; - -/** - * Handles requests to perform Ldap publishing. - * +/** + * Handles requests to perform Ldap publishing. + * * @version $Revision$ $Date$ */ public interface ILdapPublishModule extends IRequestListener { @@ -36,10 +34,10 @@ public interface ILdapPublishModule extends IRequestListener { // throws EBaseException, ELdapException; /** - * Accepts completed requests from an authority and + * Accepts completed requests from an authority and * performs ldap publishing. - * @param request The publishing request. + * + * @param request The publishing request. */ public void accept(IRequest request); } - diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ILdapPublisher.java b/pki/base/common/src/com/netscape/certsrv/publish/ILdapPublisher.java index 5a1197dca..398d86453 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/ILdapPublisher.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/ILdapPublisher.java @@ -17,17 +17,15 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import java.util.Vector; import netscape.ldap.LDAPConnection; import com.netscape.certsrv.ldap.ELdapException; - -/** - * Interface for publishing certificate or crl to database store. - * +/** + * Interface for publishing certificate or crl to database store. + * * @version $Revision$ $Date$ */ public interface ILdapPublisher extends ILdapPlugin { @@ -58,30 +56,29 @@ public interface ILdapPublisher extends ILdapPlugin { /** * Publish an object. * - * @param conn a Ldap connection - * (null for non-LDAP publishing) + * @param conn a Ldap connection + * (null for non-LDAP publishing) * @param dn dn of the ldap entry to publish cert - * (null for non-LDAP publishing) + * (null for non-LDAP publishing) * @param object object to publish - * (java.security.cert.X509Certificate or, - * java.security.cert.X509CRL) + * (java.security.cert.X509Certificate or, + * java.security.cert.X509CRL) * @exception ELdapException publish failed. */ public void publish(LDAPConnection conn, String dn, Object object) - throws ELdapException; + throws ELdapException; /** * Unpublish an object. - * + * * @param conn the Ldap connection - * (null for non-LDAP publishing) + * (null for non-LDAP publishing) * @param dn dn of the ldap entry to unpublish cert - * (null for non-LDAP publishing) - * @param object object to unpublish - * (java.security.cert.X509Certificate) + * (null for non-LDAP publishing) + * @param object object to unpublish + * (java.security.cert.X509Certificate) * @exception ELdapException unpublish failed. */ public void unpublish(LDAPConnection conn, String dn, Object object) - throws ELdapException; + throws ELdapException; } - diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ILdapRule.java b/pki/base/common/src/com/netscape/certsrv/publish/ILdapRule.java index 4c5699b1c..7bf19b070 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/ILdapRule.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/ILdapRule.java @@ -17,16 +17,14 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import java.util.Vector; import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.base.IConfigStore; - -/** +/** * Interface for publishing rule which associates a Publisher with a Mapper. - * + * * @version $Revision$ $Date$ */ public interface ILdapRule extends ILdapPlugin { @@ -36,10 +34,11 @@ public interface ILdapRule extends ILdapPlugin { /** * Initialize the plugin. + * * @exception EBaseException Initialization failed. */ public void init(IPublisherProcessor processor, IConfigStore - config) throws EBaseException; + config) throws EBaseException; /** * Returns the implementation name. diff --git a/pki/base/common/src/com/netscape/certsrv/publish/IPublishRuleSet.java b/pki/base/common/src/com/netscape/certsrv/publish/IPublishRuleSet.java index 6ff997a1d..c1af492b8 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/IPublishRuleSet.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/IPublishRuleSet.java @@ -17,7 +17,6 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import java.util.Enumeration; import netscape.ldap.LDAPConnection; @@ -28,22 +27,21 @@ import com.netscape.certsrv.base.ISubsystem; import com.netscape.certsrv.ldap.ELdapException; import com.netscape.certsrv.request.IRequest; - /** * Represents a set of publishing rules. Publishing rules are ordered from - * lowest priority to highest priority. The priority assignment for publishing + * lowest priority to highest priority. The priority assignment for publishing * rules is not enforced by this interface. Various implementation may * use different mechanisms such as a linear ordering of publishing rules * in a configuration file or explicit assignment of priority levels ..etc. - * The publishing rule initialization needs to deal with reading the - * publishing rules, sorting them in increasing order of priority and - * presenting an ordered vector of publishing rules via the IPublishRuleSet + * The publishing rule initialization needs to deal with reading the + * publishing rules, sorting them in increasing order of priority and + * presenting an ordered vector of publishing rules via the IPublishRuleSet * interface. - * When a request comes, the predicates of the publishing rules will be - * checked in the order to find the first matched publishing rule as the + * When a request comes, the predicates of the publishing rules will be + * checked in the order to find the first matched publishing rule as the * mapping rule to (un)publish the object. * <P> - * + * * @version $Revision$, $Date$ */ public interface IPublishRuleSet { @@ -52,7 +50,7 @@ public interface IPublishRuleSet { /** * Returns the name of the publishing rule set. * <P> - * + * * @return The name of the publishing rule set. */ String getName(); @@ -60,6 +58,7 @@ public interface IPublishRuleSet { /** * Returns the no of publishing rules in a set. * <P> + * * @return the no of publishing rules. */ int count(); @@ -67,24 +66,24 @@ public interface IPublishRuleSet { /** * Add a publishing rule * <P> - * - * @param aliasName The name of the publishing rule to be added. - * @param rule rule The publishing rule to be added. + * + * @param aliasName The name of the publishing rule to be added. + * @param rule rule The publishing rule to be added. */ void addRule(String aliasName, ILdapRule rule); /** * Removes a publishing rule identified by the given name. - * - * @param ruleName The name of the publishing rule to be removed. + * + * @param ruleName The name of the publishing rule to be removed. */ void removeRule(String ruleName); /** * Get the publishing rule identified by a given name. * <P> - * - * @param ruleName The name of the publishing rule to be return. + * + * @param ruleName The name of the publishing rule to be return. * @return The publishing rule identified by the given name or null if none exists. */ ILdapRule getRule(String ruleName); @@ -92,8 +91,8 @@ public interface IPublishRuleSet { /** * Get the publishing rule identified by a corresponding request. * <P> - * - * @param req The request from which rule will be identified. + * + * @param req The request from which rule will be identified. * @return The publishing rule or null if none exists. */ ILdapRule getRule(IRequest req); @@ -101,24 +100,23 @@ public interface IPublishRuleSet { /** * Get an enumeration of publishing rules. * <P> - * + * * @return An enumeration of publishing rules. */ Enumeration getRules(); /** - * Apply publishing rules on a request. - * The predicates of the publishing rules will be checked in the order - * to find the first matched publishing rule. - * Use the mapper to find the dn of the LDAP entry and use the publisher + * Apply publishing rules on a request. + * The predicates of the publishing rules will be checked in the order + * to find the first matched publishing rule. + * Use the mapper to find the dn of the LDAP entry and use the publisher * to publish the object in the request. * <P> - * - * @param conn The Ldap connection - * @param req The request to apply policies on. - * @exception ELdapException publish failed due to Ldap error. + * + * @param conn The Ldap connection + * @param req The request to apply policies on. + * @exception ELdapException publish failed due to Ldap error. */ public void publish(LDAPConnection conn, IRequest req) - throws ELdapException; + throws ELdapException; } - diff --git a/pki/base/common/src/com/netscape/certsrv/publish/IPublisherProcessor.java b/pki/base/common/src/com/netscape/certsrv/publish/IPublisherProcessor.java index 1da2f3467..3ed985403 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/IPublisherProcessor.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/IPublisherProcessor.java @@ -17,7 +17,6 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import java.math.BigInteger; import java.security.cert.X509CRL; import java.security.cert.X509Certificate; @@ -32,11 +31,10 @@ import com.netscape.certsrv.ldap.ELdapException; import com.netscape.certsrv.ldap.ILdapConnModule; import com.netscape.certsrv.request.IRequest; - /** - * Controls the publishing process from the top level. Maintains - * a collection of Publishers , Mappers, and Publish Rules. - * + * Controls the publishing process from the top level. Maintains + * a collection of Publishers , Mappers, and Publish Rules. + * * @version $Revision$ $Date$ */ @@ -64,63 +62,66 @@ public interface IPublisherProcessor extends ISubsystem { public static final String PROP_TYPE = "type"; /** - * + * * Returns Hashtable of rule plugins. */ public Hashtable<String, RulePlugin> getRulePlugins(); /** - * - * Returns Hashtable of rule instances. + * + * Returns Hashtable of rule instances. */ public Hashtable<String, ILdapRule> getRuleInsts(); /** - * + * * Returns Hashtable of mapper plugins. */ public Hashtable<String, MapperPlugin> getMapperPlugins(); /** - * + * * Returns Hashtable of publisher plugins. */ public Hashtable<String, PublisherPlugin> getPublisherPlugins(); /** - * + * * Returns Hashtable of rule mapper instances. */ public Hashtable<String, MapperProxy> getMapperInsts(); /** - * + * * Returns Hashtable of rule publisher instances. */ public Hashtable<String, PublisherProxy> getPublisherInsts(); /** - * + * * Returns list of rules based on publishing type. + * * @param publishingType Type for which to retrieve rule list. */ public Enumeration<ILdapRule> getRules(String publishingType); /** - * + * * Returns list of rules based on publishing type and publishing request. + * * @param publishingType Type for which to retrieve rule list. - * @param req Corresponding publish request. + * @param req Corresponding publish request. */ public Enumeration<ILdapRule> getRules(String publishingType, IRequest req); /** - * + * * Returns mapper initial default parameters. + * * @param implName name of MapperPlugin. */ @@ -128,8 +129,9 @@ public interface IPublisherProcessor extends ISubsystem { ELdapException; /** - * - * Returns mapper current instance parameters. + * + * Returns mapper current instance parameters. + * * @param insName name of MapperProxy. * @exception ELdapException failed due to Ldap error. */ @@ -138,8 +140,9 @@ public interface IPublisherProcessor extends ISubsystem { ELdapException; /** - * + * * Returns publisher initial default parameters. + * * @param implName name of PublisherPlugin. * @exception ELdapException failed due to Ldap error. */ @@ -147,8 +150,9 @@ public interface IPublisherProcessor extends ISubsystem { ELdapException; /** - * + * * Returns true if MapperInstance is enabled. + * * @param insName name of MapperProxy. * @return true if enabled. false if disabled. */ @@ -156,48 +160,54 @@ public interface IPublisherProcessor extends ISubsystem { public boolean isMapperInstanceEnable(String insName); /** - * + * * Returns ILdapMapper instance that is currently active. + * * @param insName name of MapperProxy. * @return instance of ILdapMapper. - */ + */ public ILdapMapper getActiveMapperInstance(String insName); /** - * + * * Returns ILdapMapper instance based on name of MapperProxy. + * * @param insName name of MapperProxy. * @return instance of ILdapMapper. */ public ILdapMapper getMapperInstance(String insName); /** - * + * * Returns true publisher instance is currently enabled. + * * @param insName name of PublisherProxy. * @return true if enabled. */ public boolean isPublisherInstanceEnable(String insName); /** - * + * * Returns ILdapPublisher instance that is currently active. + * * @param insName name of PublisherProxy. * @return instance of ILdapPublisher. */ public ILdapPublisher getActivePublisherInstance(String insName); /** - * + * * Returns ILdapPublisher instance. + * * @param insName name of PublisherProxy. * @return instance of ILdapPublisher. */ public ILdapPublisher getPublisherInstance(String insName); /** - * + * * Returns Vector of PublisherIntance's current instance parameters. + * * @param insName name of PublisherProxy. * @return Vector of current instance parameters. */ @@ -205,8 +215,9 @@ public interface IPublisherProcessor extends ISubsystem { ELdapException; /** - * + * * Returns Vector of RulePlugin's initial default parameters. + * * @param implName name of RulePlugin. * @return Vector of initial default parameters. * @exception ELdapException failed due to Ldap error. @@ -215,8 +226,9 @@ public interface IPublisherProcessor extends ISubsystem { ELdapException; /** - * + * * Returns Vector of RulePlugin's current instance parameters. + * * @param implName name of RulePlugin. * @return Vector of current instance parameters. * @exception ELdapException failed due to Ldap error. @@ -225,8 +237,9 @@ public interface IPublisherProcessor extends ISubsystem { ELdapException; /** - * Set published flag - true when published, false when unpublished. - * Not exist means not published. + * Set published flag - true when published, false when unpublished. + * Not exist means not published. + * * @param serialNo serial number of publishable object. * @param published true for published, false for not. */ @@ -234,102 +247,113 @@ public interface IPublisherProcessor extends ISubsystem { /** * Publish ca cert, UpdateDir.java, jobs, request listeners + * * @param cert X509 certificate to be published. * @exception ELdapException publish failed due to Ldap error. */ public void publishCACert(X509Certificate cert) - throws ELdapException; + throws ELdapException; /** * This function is never called. CMS does not unpublish * CA certificate. */ public void unpublishCACert(X509Certificate cert) - throws ELdapException; + throws ELdapException; /** * Publishs regular user certificate based on the criteria * set in the request. + * * @param cert X509 certificate to be published. - * @param req request which provides the criteria + * @param req request which provides the criteria * @exception ELdapException publish failed due to Ldap error. */ public void publishCert(X509Certificate cert, IRequest req) - throws ELdapException; + throws ELdapException; /** - * Unpublish user certificate. This is used by + * Unpublish user certificate. This is used by * UnpublishExpiredJob. + * * @param cert X509 certificate to be unpublished. - * @param req request which provides the criteria + * @param req request which provides the criteria * @exception ELdapException unpublish failed due to Ldap error. */ public void unpublishCert(X509Certificate cert, IRequest req) - throws ELdapException; + throws ELdapException; /** * publishes a crl by mapping the issuer name in the crl to an entry * and publishing it there. entry must be a certificate authority. * Note that this is used by cmsgateway/cert/UpdateDir.java + * * @param crl Certificate Revocation List * @param crlIssuingPointId name of the issuing point. - * @exception ELdapException publish failed due to Ldap error. + * @exception ELdapException publish failed due to Ldap error. */ - public void publishCRL(X509CRLImpl crl,String crlIssuingPointId) - throws ELdapException; + public void publishCRL(X509CRLImpl crl, String crlIssuingPointId) + throws ELdapException; /** * publishes a crl by mapping the issuer name in the crl to an entry * and publishing it there. entry must be a certificate authority. - * @param dn Distinguished name to publish. + * + * @param dn Distinguished name to publish. * @param crl Certificate Revocation List * @exception ELdapException publish failed due to Ldap error. */ - public void publishCRL(String dn, X509CRL crl) - throws ELdapException; + public void publishCRL(String dn, X509CRL crl) + throws ELdapException; /** - * + * * Return true if Ldap is enabled. + * * @return true if Ldap is enabled,otherwise false. */ public boolean ldapEnabled(); /** - * + * * Return true of PublisherProcessor is enabled. + * * @return true if is enabled, otherwise false. - * + * */ public boolean enabled(); /** - * - * Return Authority for which this Processor operates. + * + * Return Authority for which this Processor operates. + * * @return Authority. */ public ISubsystem getAuthority(); /** - * + * * Perform logging function for this Processor. - * @param level Log level to be used for this message - * @param msg Message to be logged. + * + * @param level Log level to be used for this message + * @param msg Message to be logged. */ public void log(int level, String msg); /** - * + * * Returns LdapConnModule belonging to this Processor. + * * @return LdapConnModule. */ public ILdapConnModule getLdapConnModule(); /** * Sets the LdapConnModule belonging to this Processor. + * * @param m ILdapConnModule. */ public void setLdapConnModule(ILdapConnModule m); diff --git a/pki/base/common/src/com/netscape/certsrv/publish/IXcertPublisherProcessor.java b/pki/base/common/src/com/netscape/certsrv/publish/IXcertPublisherProcessor.java index ce72ed8ab..b70a0626d 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/IXcertPublisherProcessor.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/IXcertPublisherProcessor.java @@ -17,23 +17,22 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import com.netscape.certsrv.ldap.ELdapException; - /** * Interface for a publisher that has the capability of publishing * cross certs - * + * * @version $Revision$, $Date$ */ public interface IXcertPublisherProcessor extends IPublisherProcessor { /** * Publish crossCertificatePair. + * * @param pair Byte array representing cert pair. * @exception EldapException publish failed due to Ldap error. */ public void publishXCertPair(byte[] pair) - throws ELdapException; + throws ELdapException; } diff --git a/pki/base/common/src/com/netscape/certsrv/publish/LdapCertMapResult.java b/pki/base/common/src/com/netscape/certsrv/publish/LdapCertMapResult.java index 559cd8c0c..84a866095 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/LdapCertMapResult.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/LdapCertMapResult.java @@ -17,14 +17,11 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - - - -/** +/** * Class that represents the result of a Ldap Mapping operation. - * certificate map result: - * Represented by a mapped entry as a DN and whether entry has the certificate. - * + * certificate map result: + * Represented by a mapped entry as a DN and whether entry has the certificate. + * * @version $Revision$ $Date$ */ public class LdapCertMapResult { @@ -38,9 +35,10 @@ public class LdapCertMapResult { mDn = dn; mHasCert = hasCert; } - + /** * Gets DN from the result. + * * @return Distinguished Name. */ public String getDn() { @@ -49,6 +47,7 @@ public class LdapCertMapResult { /** * Gets whether the ldap entry had a certificate from result. + * * @return true if cert is present, false otherwise. */ public boolean hasCert() { diff --git a/pki/base/common/src/com/netscape/certsrv/publish/MapperPlugin.java b/pki/base/common/src/com/netscape/certsrv/publish/MapperPlugin.java index 282db3cd8..b193e1b5f 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/MapperPlugin.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/MapperPlugin.java @@ -17,25 +17,23 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import com.netscape.certsrv.base.Plugin; - /** * This class represents a registered mapper plugin. * <P> - * + * * @version $Revision$, $Date$ */ public class MapperPlugin extends Plugin { /** * Constructs a MapperPlugin based on a name and a path. + * * @param id Name of plugin. * @param path Classpath of plugin. */ - public MapperPlugin (String id, String path) { + public MapperPlugin(String id, String path) { super(id, path); } } - diff --git a/pki/base/common/src/com/netscape/certsrv/publish/MapperProxy.java b/pki/base/common/src/com/netscape/certsrv/publish/MapperProxy.java index bd8ea7418..95dc98d9c 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/MapperProxy.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/MapperProxy.java @@ -17,13 +17,10 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - - - /** - * - * Class representing a LdapMapper. - * + * + * Class representing a LdapMapper. + * * @version $Revision$ $Date$ */ @@ -32,8 +29,9 @@ public class MapperProxy { private ILdapMapper mMapper; /** - * + * * Contructs MapperProxy . + * * @param enable Enabled or not. * @param mapper Corresponding ILdapMapper object. */ @@ -43,8 +41,9 @@ public class MapperProxy { } /** - * + * * Returns if enabled. + * * @return true if enabled, otherwise false. */ public boolean isEnable() { @@ -52,8 +51,9 @@ public class MapperProxy { } /** - * + * * Returns ILdapMapper object. + * * @return Intance of ILdapMapper object. */ public ILdapMapper getMapper() { diff --git a/pki/base/common/src/com/netscape/certsrv/publish/PublisherPlugin.java b/pki/base/common/src/com/netscape/certsrv/publish/PublisherPlugin.java index d68643268..5a163b80c 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/PublisherPlugin.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/PublisherPlugin.java @@ -17,26 +17,24 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import com.netscape.certsrv.base.Plugin; - /** * This class represents a registered publisher plugin. * <P> - * + * * @version $Revision$, $Date$ */ public class PublisherPlugin extends Plugin { /** - * - * Constructs a PublisherPlugin based on name and classpath. - * @param id name of plugin. - * @param path Classpath of plugin. + * + * Constructs a PublisherPlugin based on name and classpath. + * + * @param id name of plugin. + * @param path Classpath of plugin. */ - public PublisherPlugin (String id, String path) { + public PublisherPlugin(String id, String path) { super(id, path); } } - diff --git a/pki/base/common/src/com/netscape/certsrv/publish/PublisherProxy.java b/pki/base/common/src/com/netscape/certsrv/publish/PublisherProxy.java index 06e08c31e..eb71f3e56 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/PublisherProxy.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/PublisherProxy.java @@ -17,24 +17,21 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - - - /** - * + * * Class representing a proxy for a ILdapPublisher. - * + * * @version $Revision$ $Date$ */ - public class PublisherProxy { private boolean mEnable; private ILdapPublisher mPublisher; /** - * + * * Constructs a PublisherProxy based on a ILdapPublisher object and enabled boolean. + * * @param enable Proxy is enabled or not. * @param publisher Corresponding ILdapPublisher object. */ @@ -45,6 +42,7 @@ public class PublisherProxy { /** * Return if enabled or not. + * * @return true if enabled, otherwise false. */ public boolean isEnable() { @@ -53,6 +51,7 @@ public class PublisherProxy { /** * Return ILdapPublisher object. + * * @return Instance of ILdapPublisher. */ public ILdapPublisher getPublisher() { diff --git a/pki/base/common/src/com/netscape/certsrv/publish/RulePlugin.java b/pki/base/common/src/com/netscape/certsrv/publish/RulePlugin.java index 8e5157262..b37a24d51 100644 --- a/pki/base/common/src/com/netscape/certsrv/publish/RulePlugin.java +++ b/pki/base/common/src/com/netscape/certsrv/publish/RulePlugin.java @@ -17,25 +17,24 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.publish; - import com.netscape.certsrv.base.Plugin; - /** * This class represents a registered Publishing Rule plugin. * <P> - * + * * @version $Revision$, $Date$ */ public class RulePlugin extends Plugin { /** - * + * * Constructs a RulePlugin based on name and classpath. + * * @param id name of RulePlugin. * @param path Classpath of RulePlugin. */ - public RulePlugin (String id, String path) { + public RulePlugin(String id, String path) { super(id, path); } } |