Package com.netscape.cmscore.ldap
Class PublisherProcessor
- java.lang.Object
-
- com.netscape.cmscore.ldap.PublisherProcessor
-
- All Implemented Interfaces:
IXcertPublisherProcessor
public abstract class PublisherProcessor extends java.lang.Object implements IXcertPublisherProcessor
Controls the publishing process from the top level. Maintains a collection of Publishers , Mappers, and Publish Rules.
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Logger
logger
protected PublishingConfig
mConfig
protected java.lang.String
mId
protected boolean
mInited
protected IConfigStore
mLdapConfig
protected LdapConnModule
mLdapConnModule
java.util.Hashtable<java.lang.String,MapperProxy>
mMapperInsts
java.util.Hashtable<java.lang.String,MapperPlugin>
mMapperPlugins
java.util.Hashtable<java.lang.String,PublisherProxy>
mPublisherInsts
java.util.Hashtable<java.lang.String,PublisherPlugin>
mPublisherPlugins
java.util.Hashtable<java.lang.String,LdapRule>
mRuleInsts
java.util.Hashtable<java.lang.String,RulePlugin>
mRulePlugins
static java.lang.String
PROP_CLASS
static java.lang.String
PROP_ENABLE
static java.lang.String
PROP_IMPL
static java.lang.String
PROP_INSTANCE
static java.lang.String
PROP_LDAP
static java.lang.String
PROP_LDAP_PUBLISH_SUBSTORE
static java.lang.String
PROP_MAPPER
static java.lang.String
PROP_PLUGIN
static java.lang.String
PROP_PREDICATE
static java.lang.String
PROP_PUBLISHER
static java.lang.String
PROP_QUEUE_PUBLISH_SUBSTORE
static java.lang.String
PROP_TYPE
protected IRequestListener
requestListener
-
Constructor Summary
Constructors Constructor Description PublisherProcessor(java.lang.String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ILdapMapper
getActiveMapperInstance(java.lang.String insName)
Returns ILdapMapper instance that is currently active.ILdapPublisher
getActivePublisherInstance(java.lang.String insName)
Returns ILdapPublisher instance that is currently active.PublishingConfig
getConfigStore()
java.lang.String
getId()
ILdapConnModule
getLdapConnModule()
Returns LdapConnModule belonging to this Processor.java.util.Vector<java.lang.String>
getMapperDefaultParams(java.lang.String implName)
Returns mapper initial default parameters.ILdapMapper
getMapperInstance(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.ILdapPublisher
getPublisherInstance(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.IRequestListener
getRequestListener()
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,LdapRule>
getRuleInsts()
Returns Hashtable of rule instances.java.util.Hashtable<java.lang.String,RulePlugin>
getRulePlugins()
Returns Hashtable of rule plugins.java.util.Enumeration<LdapRule>
getRules(java.lang.String publishingType)
Returns list of rules based on publishing type.java.util.Enumeration<LdapRule>
getRules(java.lang.String publishingType, IRequest req)
Returns list of rules based on publishing type and publishing request.void
init(PublishingConfig config)
boolean
isMapperInstanceEnable(java.lang.String insName)
Returns true if MapperInstance is enabled.boolean
isPublisherInstanceEnable(java.lang.String insName)
Returns true publisher instance is currently enabled.boolean
ldapEnabled()
Return true if Ldap is enabled.void
setId(java.lang.String id)
void
setLdapConnModule(ILdapConnModule m)
Sets the LdapConnModule belonging to this Processor.void
setRequestListener(IRequestListener requestListener)
void
shutdown()
void
startup()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.netscape.certsrv.publish.IXcertPublisherProcessor
publishXCertPair
-
-
-
-
Field Detail
-
logger
public static org.slf4j.Logger logger
-
PROP_LDAP_PUBLISH_SUBSTORE
public static final java.lang.String PROP_LDAP_PUBLISH_SUBSTORE
- See Also:
- Constant Field Values
-
PROP_QUEUE_PUBLISH_SUBSTORE
public static final java.lang.String PROP_QUEUE_PUBLISH_SUBSTORE
- See Also:
- Constant Field Values
-
PROP_CLASS
public static final java.lang.String PROP_CLASS
- See Also:
- Constant Field Values
-
PROP_IMPL
public static final java.lang.String PROP_IMPL
- See Also:
- Constant Field Values
-
PROP_PLUGIN
public static final java.lang.String PROP_PLUGIN
- See Also:
- Constant Field Values
-
PROP_INSTANCE
public static final java.lang.String PROP_INSTANCE
- See Also:
- Constant Field Values
-
PROP_PREDICATE
public static final java.lang.String PROP_PREDICATE
- See Also:
- Constant Field Values
-
PROP_ENABLE
public static final java.lang.String PROP_ENABLE
- See Also:
- Constant Field Values
-
PROP_LDAP
public static final java.lang.String PROP_LDAP
- See Also:
- Constant Field Values
-
PROP_MAPPER
public static final java.lang.String PROP_MAPPER
- See Also:
- Constant Field Values
-
PROP_PUBLISHER
public static final java.lang.String PROP_PUBLISHER
- See Also:
- Constant Field Values
-
PROP_TYPE
public static final java.lang.String PROP_TYPE
- See Also:
- Constant Field Values
-
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,LdapRule> mRuleInsts
-
mLdapConnModule
protected LdapConnModule mLdapConnModule
-
mConfig
protected PublishingConfig mConfig
-
mLdapConfig
protected IConfigStore mLdapConfig
-
mId
protected java.lang.String mId
-
requestListener
protected IRequestListener requestListener
-
mInited
protected boolean mInited
-
-
Method Detail
-
getId
public java.lang.String getId()
-
setId
public void setId(java.lang.String id)
-
getConfigStore
public PublishingConfig getConfigStore()
-
getRequestListener
public IRequestListener getRequestListener()
-
setRequestListener
public void setRequestListener(IRequestListener requestListener)
-
init
public void init(PublishingConfig config) throws EBaseException
- Throws:
EBaseException
-
getLdapConnModule
public ILdapConnModule getLdapConnModule()
Returns LdapConnModule belonging to this Processor.- Returns:
- LdapConnModule.
-
setLdapConnModule
public void setLdapConnModule(ILdapConnModule m)
Sets the LdapConnModule belonging to this Processor.- 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()
Returns Hashtable of rule plugins.
-
getRuleInsts
public java.util.Hashtable<java.lang.String,LdapRule> getRuleInsts()
Returns Hashtable of rule instances.
-
getMapperPlugins
public java.util.Hashtable<java.lang.String,MapperPlugin> getMapperPlugins()
Returns Hashtable of mapper plugins.
-
getPublisherPlugins
public java.util.Hashtable<java.lang.String,PublisherPlugin> getPublisherPlugins()
Returns Hashtable of publisher plugins.
-
getMapperInsts
public java.util.Hashtable<java.lang.String,MapperProxy> getMapperInsts()
Returns Hashtable of rule mapper instances.
-
getPublisherInsts
public java.util.Hashtable<java.lang.String,PublisherProxy> getPublisherInsts()
Returns Hashtable of rule publisher instances.
-
getRules
public java.util.Enumeration<LdapRule> getRules(java.lang.String publishingType)
Returns list of rules based on publishing type. certType can be client,server,ca,crl,smime- Parameters:
publishingType
- Type for which to retrieve rule list.
-
getRules
public java.util.Enumeration<LdapRule> getRules(java.lang.String publishingType, IRequest req)
Returns list of rules based on publishing type and publishing request.- 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 ELdapException
Returns mapper initial default parameters.- Parameters:
implName
- name of MapperPlugin.- Throws:
ELdapException
-
getMapperInstanceParams
public java.util.Vector<java.lang.String> getMapperInstanceParams(java.lang.String insName) throws ELdapException
Returns mapper current instance parameters.- 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 ELdapException
Returns publisher initial default parameters.- Parameters:
implName
- name of PublisherPlugin.- Throws:
ELdapException
- failed due to Ldap error.
-
isMapperInstanceEnable
public boolean isMapperInstanceEnable(java.lang.String insName)
Returns true if MapperInstance is enabled.- Parameters:
insName
- name of MapperProxy.- Returns:
- true if enabled. false if disabled.
-
getActiveMapperInstance
public ILdapMapper getActiveMapperInstance(java.lang.String insName)
Returns ILdapMapper instance that is currently active.- Parameters:
insName
- name of MapperProxy.- Returns:
- instance of ILdapMapper.
-
getMapperInstance
public ILdapMapper getMapperInstance(java.lang.String insName)
Returns ILdapMapper instance based on name of MapperProxy.- Parameters:
insName
- name of MapperProxy.- Returns:
- instance of ILdapMapper.
-
isPublisherInstanceEnable
public boolean isPublisherInstanceEnable(java.lang.String insName)
Returns true publisher instance is currently enabled.- Parameters:
insName
- name of PublisherProxy.- Returns:
- true if enabled.
-
getActivePublisherInstance
public ILdapPublisher getActivePublisherInstance(java.lang.String insName)
Returns ILdapPublisher instance that is currently active.- Parameters:
insName
- name of PublisherProxy.- Returns:
- instance of ILdapPublisher.
-
getPublisherInstance
public ILdapPublisher getPublisherInstance(java.lang.String insName)
Returns ILdapPublisher instance.- Parameters:
insName
- name of PublisherProxy.- Returns:
- instance of ILdapPublisher.
-
getPublisherInstanceParams
public java.util.Vector<java.lang.String> getPublisherInstanceParams(java.lang.String insName) throws ELdapException
Returns Vector of PublisherIntance's current instance parameters.- 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 ELdapException
Returns Vector of RulePlugin's initial default parameters.- 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 ELdapException
Returns Vector of RulePlugin's current instance parameters.- Parameters:
implName
- name of RulePlugin.- Returns:
- Vector of current instance parameters.
- Throws:
ELdapException
- failed due to Ldap error.
-
ldapEnabled
public boolean ldapEnabled()
Return true if Ldap is enabled.- Returns:
- true if Ldap is enabled,otherwise false.
-
-