Package com.netscape.cmscore.ldap
Class PublisherProcessor
- java.lang.Object
-
- com.netscape.cmscore.ldap.PublisherProcessor
-
- All Implemented Interfaces:
IPublisherProcessor,IXcertPublisherProcessor
public class PublisherProcessor extends java.lang.Object implements IPublisherProcessor, IXcertPublisherProcessor
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Loggerloggerprotected ICertAuthoritymAuthorityprotected LdapConnModulemLdapConnModuleprotected PublishRuleSet mRuleSet = null;protected LdapRequestListenermLdapRequestListenerjava.util.Hashtable<java.lang.String,MapperProxy>mMapperInstsjava.util.Hashtable<java.lang.String,MapperPlugin>mMapperPluginsjava.util.Hashtable<java.lang.String,PublisherProxy>mPublisherInstsjava.util.Hashtable<java.lang.String,PublisherPlugin>mPublisherPluginsjava.util.Hashtable<java.lang.String,ILdapRule>mRuleInstsjava.util.Hashtable<java.lang.String,RulePlugin>mRulePlugins-
Fields inherited from interface com.netscape.certsrv.publish.IPublisherProcessor
PROP_CERT_ENABLE, PROP_CERTS, PROP_CLASS, PROP_CRL_ENABLE, PROP_ENABLE, PROP_IMPL, PROP_INSTANCE, PROP_LDAP, PROP_LDAP_PUBLISH_SUBSTORE, PROP_LOCAL_CA, PROP_LOCAL_CRL, PROP_MAPPER, PROP_PLUGIN, PROP_PREDICATE, PROP_PUBLISH_SUBSTORE, PROP_PUBLISHER, PROP_QUEUE_PUBLISH_SUBSTORE, PROP_TYPE, PROP_XCERT
-
-
Constructor Summary
Constructors Constructor Description PublisherProcessor(java.lang.String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ILdapMappergetActiveMapperInstance(java.lang.String insName)Returns ILdapMapper instance that is currently active.ILdapPublishergetActivePublisherInstance(java.lang.String insName)Returns ILdapPublisher instance that is currently active.ISubsystemgetAuthority()Return Authority for which this Processor operates.IConfigStoregetConfigStore()java.lang.StringgetId()ILdapConnModulegetLdapConnModule()Retrieves LDAP connection module.java.util.Vector<java.lang.String>getMapperDefaultParams(java.lang.String implName)public PublishRuleSet getPublishRuleSet() { return mRuleSet; }ILdapMappergetMapperInstance(java.lang.String insName)Returns ILdapMapper instance based on name of MapperProxy.java.util.Vector<java.lang.String>getMapperInstanceParams(java.lang.String insName)Returns mapper current instance parameters.java.util.Hashtable<java.lang.String,MapperProxy>getMapperInsts()Returns Hashtable of rule mapper instances.java.util.Hashtable<java.lang.String,MapperPlugin>getMapperPlugins()Returns Hashtable of mapper plugins.java.util.Vector<java.lang.String>getPublisherDefaultParams(java.lang.String implName)Returns publisher initial default parameters.ILdapPublishergetPublisherInstance(java.lang.String insName)Returns ILdapPublisher instance.java.util.Vector<java.lang.String>getPublisherInstanceParams(java.lang.String insName)Returns Vector of PublisherIntance's current instance parameters.java.util.Hashtable<java.lang.String,PublisherProxy>getPublisherInsts()Returns Hashtable of rule publisher instances.java.util.Hashtable<java.lang.String,PublisherPlugin>getPublisherPlugins()Returns Hashtable of publisher plugins.java.util.Vector<java.lang.String>getRuleDefaultParams(java.lang.String implName)Returns Vector of RulePlugin's initial default parameters.java.util.Vector<java.lang.String>getRuleInstanceParams(java.lang.String implName)Returns Vector of RulePlugin's current instance parameters.java.util.Hashtable<java.lang.String,ILdapRule>getRuleInsts()Returns Hashtable of rule instances.java.util.Hashtable<java.lang.String,RulePlugin>getRulePlugins()Returns Hashtable of rule plugins.java.util.Enumeration<ILdapRule>getRules(java.lang.String publishingType)Returns list of rules based on publishing type.java.util.Enumeration<ILdapRule>getRules(java.lang.String publishingType, IRequest req)Returns list of rules based on publishing type and publishing request.voidinit(ISubsystem authority, IConfigStore config)booleanisCertPublishingEnabled()Return true if Certificate Publishing is enabled.booleanisClone()booleanisCRLPublishingEnabled()Return true if CRL publishing is enabled,booleanisMapperInstanceEnable(java.lang.String insName)Returns true if MapperInstance is enabled.booleanisPublisherInstanceEnable(java.lang.String insName)Returns true publisher instance is currently enabled.booleanldapEnabled()Return true if Ldap is enabled.voidpublishCACert(java.security.cert.X509Certificate cert)Publish ca cert, UpdateDir.java, jobs, request listenersvoidpublishCert(java.security.cert.X509Certificate cert, IRequest req)Publishs regular user certificate based on the criteria set in the request.voidpublishCRL(java.lang.String dn, java.security.cert.X509CRL crl)publishes a crl by mapping the issuer name in the crl to an entry and publishing it there.voidpublishCRL(org.mozilla.jss.netscape.security.x509.X509CRLImpl crl, java.lang.String crlIssuingPointId)publishes a crl by mapping the issuer name in the crl to an entry and publishing it there.voidpublishXCertPair(byte[] pair)Publish crossCertificatePairvoidsetId(java.lang.String id)voidsetLdapConnModule(ILdapConnModule m)Sets the LdapConnModule belonging to this Processor.voidsetPublishedFlag(java.math.BigInteger serialNo, boolean published)set published flag - true when published, false when unpublished.voidshutdown()voidstartup()voidunpublishCACert(java.security.cert.X509Certificate cert)This function is never called.voidunpublishCert(java.security.cert.X509Certificate cert, IRequest req)Unpublish user certificate.
-
-
-
Field Detail
-
logger
public static org.slf4j.Logger logger
-
mPublisherPlugins
public java.util.Hashtable<java.lang.String,PublisherPlugin> mPublisherPlugins
-
mPublisherInsts
public java.util.Hashtable<java.lang.String,PublisherProxy> mPublisherInsts
-
mMapperPlugins
public java.util.Hashtable<java.lang.String,MapperPlugin> mMapperPlugins
-
mMapperInsts
public java.util.Hashtable<java.lang.String,MapperProxy> mMapperInsts
-
mRulePlugins
public java.util.Hashtable<java.lang.String,RulePlugin> mRulePlugins
-
mRuleInsts
public java.util.Hashtable<java.lang.String,ILdapRule> mRuleInsts
-
mLdapConnModule
protected LdapConnModule mLdapConnModule
protected PublishRuleSet mRuleSet = null;
-
mAuthority
protected ICertAuthority mAuthority
-
mLdapRequestListener
protected LdapRequestListener mLdapRequestListener
-
-
Method Detail
-
getId
public java.lang.String getId()
-
setId
public void setId(java.lang.String id)
-
getConfigStore
public IConfigStore getConfigStore()
-
init
public void init(ISubsystem authority, IConfigStore config) throws EBaseException
- Throws:
EBaseException
-
getLdapConnModule
public ILdapConnModule getLdapConnModule()
Retrieves LDAP connection module.- Specified by:
getLdapConnModulein interfaceIPublisherProcessor- Returns:
- LDAP connection instance
-
setLdapConnModule
public void setLdapConnModule(ILdapConnModule m)
Description copied from interface:IPublisherProcessorSets the LdapConnModule belonging to this Processor.- Specified by:
setLdapConnModulein interfaceIPublisherProcessor- Parameters:
m- ILdapConnModule.
-
startup
public void startup() throws EBaseException- Throws:
EBaseException
-
shutdown
public void shutdown()
-
getRulePlugins
public java.util.Hashtable<java.lang.String,RulePlugin> getRulePlugins()
Description copied from interface:IPublisherProcessorReturns Hashtable of rule plugins.- Specified by:
getRulePluginsin interfaceIPublisherProcessor
-
getRuleInsts
public java.util.Hashtable<java.lang.String,ILdapRule> getRuleInsts()
Description copied from interface:IPublisherProcessorReturns Hashtable of rule instances.- Specified by:
getRuleInstsin interfaceIPublisherProcessor
-
getMapperPlugins
public java.util.Hashtable<java.lang.String,MapperPlugin> getMapperPlugins()
Description copied from interface:IPublisherProcessorReturns Hashtable of mapper plugins.- Specified by:
getMapperPluginsin interfaceIPublisherProcessor
-
getPublisherPlugins
public java.util.Hashtable<java.lang.String,PublisherPlugin> getPublisherPlugins()
Description copied from interface:IPublisherProcessorReturns Hashtable of publisher plugins.- Specified by:
getPublisherPluginsin interfaceIPublisherProcessor
-
getMapperInsts
public java.util.Hashtable<java.lang.String,MapperProxy> getMapperInsts()
Description copied from interface:IPublisherProcessorReturns Hashtable of rule mapper instances.- Specified by:
getMapperInstsin interfaceIPublisherProcessor
-
getPublisherInsts
public java.util.Hashtable<java.lang.String,PublisherProxy> getPublisherInsts()
Description copied from interface:IPublisherProcessorReturns Hashtable of rule publisher instances.- Specified by:
getPublisherInstsin interfaceIPublisherProcessor
-
getRules
public java.util.Enumeration<ILdapRule> getRules(java.lang.String publishingType)
Description copied from interface:IPublisherProcessorReturns list of rules based on publishing type.- Specified by:
getRulesin interfaceIPublisherProcessor- Parameters:
publishingType- Type for which to retrieve rule list.
-
getRules
public java.util.Enumeration<ILdapRule> getRules(java.lang.String publishingType, IRequest req)
Description copied from interface:IPublisherProcessorReturns list of rules based on publishing type and publishing request.- Specified by:
getRulesin interfaceIPublisherProcessor- Parameters:
publishingType- Type for which to retrieve rule list.req- Corresponding publish request.
-
getMapperDefaultParams
public java.util.Vector<java.lang.String> getMapperDefaultParams(java.lang.String implName) throws ELdapExceptionpublic PublishRuleSet getPublishRuleSet() { return mRuleSet; }- Specified by:
getMapperDefaultParamsin interfaceIPublisherProcessor- Parameters:
implName- name of MapperPlugin.- Throws:
ELdapException
-
getMapperInstanceParams
public java.util.Vector<java.lang.String> getMapperInstanceParams(java.lang.String insName) throws ELdapExceptionDescription copied from interface:IPublisherProcessorReturns mapper current instance parameters.- Specified by:
getMapperInstanceParamsin interfaceIPublisherProcessor- Parameters:
insName- name of MapperProxy.- Throws:
ELdapException- failed due to Ldap error.
-
getPublisherDefaultParams
public java.util.Vector<java.lang.String> getPublisherDefaultParams(java.lang.String implName) throws ELdapExceptionDescription copied from interface:IPublisherProcessorReturns publisher initial default parameters.- Specified by:
getPublisherDefaultParamsin interfaceIPublisherProcessor- Parameters:
implName- name of PublisherPlugin.- Throws:
ELdapException- failed due to Ldap error.
-
isMapperInstanceEnable
public boolean isMapperInstanceEnable(java.lang.String insName)
Description copied from interface:IPublisherProcessorReturns true if MapperInstance is enabled.- Specified by:
isMapperInstanceEnablein interfaceIPublisherProcessor- Parameters:
insName- name of MapperProxy.- Returns:
- true if enabled. false if disabled.
-
getActiveMapperInstance
public ILdapMapper getActiveMapperInstance(java.lang.String insName)
Description copied from interface:IPublisherProcessorReturns ILdapMapper instance that is currently active.- Specified by:
getActiveMapperInstancein interfaceIPublisherProcessor- Parameters:
insName- name of MapperProxy.- Returns:
- instance of ILdapMapper.
-
getMapperInstance
public ILdapMapper getMapperInstance(java.lang.String insName)
Description copied from interface:IPublisherProcessorReturns ILdapMapper instance based on name of MapperProxy.- Specified by:
getMapperInstancein interfaceIPublisherProcessor- Parameters:
insName- name of MapperProxy.- Returns:
- instance of ILdapMapper.
-
isPublisherInstanceEnable
public boolean isPublisherInstanceEnable(java.lang.String insName)
Description copied from interface:IPublisherProcessorReturns true publisher instance is currently enabled.- Specified by:
isPublisherInstanceEnablein interfaceIPublisherProcessor- Parameters:
insName- name of PublisherProxy.- Returns:
- true if enabled.
-
getActivePublisherInstance
public ILdapPublisher getActivePublisherInstance(java.lang.String insName)
Description copied from interface:IPublisherProcessorReturns ILdapPublisher instance that is currently active.- Specified by:
getActivePublisherInstancein interfaceIPublisherProcessor- Parameters:
insName- name of PublisherProxy.- Returns:
- instance of ILdapPublisher.
-
getPublisherInstance
public ILdapPublisher getPublisherInstance(java.lang.String insName)
Description copied from interface:IPublisherProcessorReturns ILdapPublisher instance.- Specified by:
getPublisherInstancein interfaceIPublisherProcessor- Parameters:
insName- name of PublisherProxy.- Returns:
- instance of ILdapPublisher.
-
getPublisherInstanceParams
public java.util.Vector<java.lang.String> getPublisherInstanceParams(java.lang.String insName) throws ELdapExceptionDescription copied from interface:IPublisherProcessorReturns Vector of PublisherIntance's current instance parameters.- Specified by:
getPublisherInstanceParamsin interfaceIPublisherProcessor- Parameters:
insName- name of PublisherProxy.- Returns:
- Vector of current instance parameters.
- Throws:
ELdapException
-
getRuleDefaultParams
public java.util.Vector<java.lang.String> getRuleDefaultParams(java.lang.String implName) throws ELdapExceptionDescription copied from interface:IPublisherProcessorReturns Vector of RulePlugin's initial default parameters.- Specified by:
getRuleDefaultParamsin interfaceIPublisherProcessor- Parameters:
implName- name of RulePlugin.- Returns:
- Vector of initial default parameters.
- Throws:
ELdapException- failed due to Ldap error.
-
getRuleInstanceParams
public java.util.Vector<java.lang.String> getRuleInstanceParams(java.lang.String implName) throws ELdapExceptionDescription copied from interface:IPublisherProcessorReturns Vector of RulePlugin's current instance parameters.- Specified by:
getRuleInstanceParamsin interfaceIPublisherProcessor- Parameters:
implName- name of RulePlugin.- Returns:
- Vector of current instance parameters.
- Throws:
ELdapException- failed due to Ldap error.
-
setPublishedFlag
public void setPublishedFlag(java.math.BigInteger serialNo, boolean published)set published flag - true when published, false when unpublished. not exist means not published.- Specified by:
setPublishedFlagin interfaceIPublisherProcessor- Parameters:
serialNo- serial number of publishable object.published- true for published, false for not.
-
publishCACert
public void publishCACert(java.security.cert.X509Certificate cert) throws ELdapExceptionPublish ca cert, UpdateDir.java, jobs, request listeners- Specified by:
publishCACertin interfaceIPublisherProcessor- Parameters:
cert- X509 certificate to be published.- Throws:
ELdapException- publish failed due to Ldap error.
-
unpublishCACert
public void unpublishCACert(java.security.cert.X509Certificate cert) throws ELdapExceptionThis function is never called. CMS does not unpublish CA certificate.- Specified by:
unpublishCACertin interfaceIPublisherProcessor- Throws:
ELdapException
-
publishXCertPair
public void publishXCertPair(byte[] pair) throws ELdapExceptionPublish crossCertificatePair- Specified by:
publishXCertPairin interfaceIXcertPublisherProcessor- Parameters:
pair- Byte array representing cert pair.- Throws:
ELdapException
-
publishCert
public void publishCert(java.security.cert.X509Certificate cert, IRequest req) throws ELdapExceptionPublishs regular user certificate based on the criteria set in the request.- Specified by:
publishCertin interfaceIPublisherProcessor- Parameters:
cert- X509 certificate to be published.req- request which provides the criteria- Throws:
ELdapException- publish failed due to Ldap error.
-
unpublishCert
public void unpublishCert(java.security.cert.X509Certificate cert, IRequest req) throws ELdapExceptionUnpublish user certificate. This is used by UnpublishExpiredJob.- Specified by:
unpublishCertin interfaceIPublisherProcessor- Parameters:
cert- X509 certificate to be unpublished.req- request which provides the criteria- Throws:
ELdapException- unpublish failed due to Ldap error.
-
publishCRL
public void publishCRL(org.mozilla.jss.netscape.security.x509.X509CRLImpl crl, java.lang.String crlIssuingPointId) throws ELdapExceptionpublishes 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- Specified by:
publishCRLin interfaceIPublisherProcessor- Parameters:
crl- Certificate Revocation ListcrlIssuingPointId- name of the issuing point.- Throws:
ELdapException
-
publishCRL
public void publishCRL(java.lang.String dn, java.security.cert.X509CRL crl) throws ELdapExceptionpublishes a crl by mapping the issuer name in the crl to an entry and publishing it there. entry must be a certificate authority.- Specified by:
publishCRLin interfaceIPublisherProcessor- Parameters:
dn- Distinguished name to publish.crl- Certificate Revocation List- Throws:
ELdapException- publish failed due to Ldap error.
-
ldapEnabled
public boolean ldapEnabled()
Description copied from interface:IPublisherProcessorReturn true if Ldap is enabled.- Specified by:
ldapEnabledin interfaceIPublisherProcessor- Returns:
- true if Ldap is enabled,otherwise false.
-
isCertPublishingEnabled
public boolean isCertPublishingEnabled()
Description copied from interface:IPublisherProcessorReturn true if Certificate Publishing is enabled.- Specified by:
isCertPublishingEnabledin interfaceIPublisherProcessor- Returns:
- true if enabled, false otherwise
-
isCRLPublishingEnabled
public boolean isCRLPublishingEnabled()
Description copied from interface:IPublisherProcessorReturn true if CRL publishing is enabled,- Specified by:
isCRLPublishingEnabledin interfaceIPublisherProcessor- Returns:
- true if enabled, false otherwise.
-
getAuthority
public ISubsystem getAuthority()
Description copied from interface:IPublisherProcessorReturn Authority for which this Processor operates.- Specified by:
getAuthorityin interfaceIPublisherProcessor- Returns:
- Authority.
-
isClone
public boolean isClone()
-
-