Package com.netscape.cms.publish.mappers
Class LdapCertCompsMap
- java.lang.Object
-
- com.netscape.cms.publish.mappers.LdapDNCompsMap
-
- com.netscape.cms.publish.mappers.LdapCertCompsMap
-
- All Implemented Interfaces:
IExtendedPluginInfo
,ILdapMapper
,ILdapPlugin
public class LdapCertCompsMap extends LdapDNCompsMap implements ILdapMapper
Maps a X509 certificate to a LDAP entry using AVAs in the certificate's subject name to form the ldap search dn and filter. Takes a optional root search dn. The DN comps are used to form a LDAP entry to begin a subtree search. The filter comps are used to form a search filter for the subtree. If none of the DN comps matched, baseDN is used for the subtree. If the baseDN is null and none of the DN comps matched, it is an error. If none of the DN comps and filter comps matched, it is an error. If just the filter comps is null, a base search is performed.- Version:
- $Revision$, $Date$
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.netscape.cms.publish.mappers.LdapDNCompsMap
LdapDNCompsMap.SearchFilter
-
-
Field Summary
-
Fields inherited from class com.netscape.cms.publish.mappers.LdapDNCompsMap
mBaseDN, mConfig, mDnComps, mFilterComps
-
Fields inherited from interface com.netscape.certsrv.base.IExtendedPluginInfo
HELP_TEXT, HELP_TOKEN
-
-
Constructor Summary
Constructors Constructor Description LdapCertCompsMap()
LdapCertCompsMap(java.lang.String certAttr, java.lang.String baseDN, ObjectIdentifier[] dnComps, ObjectIdentifier[] filterComps)
constructor using non-standard certificate attribute.LdapCertCompsMap(java.lang.String baseDN, ObjectIdentifier[] dnComps, ObjectIdentifier[] filterComps)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Vector<java.lang.String>
getDefaultParams()
Returns the initial default parameters.java.lang.String
getDescription()
Returns the description of this mapper.java.lang.String
getImplName()
Returns implementation name.java.util.Vector<java.lang.String>
getInstanceParams()
Returns the current instance parameters.protected void
init(java.lang.String baseDN, ObjectIdentifier[] dnComps, ObjectIdentifier[] filterComps)
common initialization routine.java.lang.String
map(netscape.ldap.LDAPConnection conn, IRequest req, java.lang.Object obj)
maps a certificate to a LDAP entry.java.lang.String
map(netscape.ldap.LDAPConnection conn, java.lang.Object obj)
Maps a certificate to LDAP entry.-
Methods inherited from class com.netscape.cms.publish.mappers.LdapDNCompsMap
formDNandFilter, getCompsFromString, getConfigStore, getDnComps, getExtendedPluginInfo, getFilterComps, init, map
-
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.ILdapPlugin
getConfigStore, init
-
-
-
-
Constructor Detail
-
LdapCertCompsMap
public LdapCertCompsMap()
-
LdapCertCompsMap
public LdapCertCompsMap(java.lang.String baseDN, ObjectIdentifier[] dnComps, ObjectIdentifier[] filterComps)
Constructor. The DN comps are used to form a LDAP entry to begin a subtree search. The filter comps are used to form a search filter for the subtree. If none of the DN comps matched, baseDN is used for the subtree. If the baseDN is null and none of the DN comps matched, it is an error. If none of the DN comps and filter comps matched, it is an error. If just the filter comps is null, a base search is performed.- Parameters:
baseDN
- The base DN.dnComps
- Components to form the LDAP base dn for search.filterComps
- Components to form the LDAP search filter.
-
LdapCertCompsMap
public LdapCertCompsMap(java.lang.String certAttr, java.lang.String baseDN, ObjectIdentifier[] dnComps, ObjectIdentifier[] filterComps)
constructor using non-standard certificate attribute.
-
-
Method Detail
-
getImplName
public java.lang.String getImplName()
Description copied from interface:ILdapMapper
Returns implementation name.- Specified by:
getImplName
in interfaceILdapMapper
- Overrides:
getImplName
in classLdapDNCompsMap
-
getDescription
public java.lang.String getDescription()
Description copied from interface:ILdapMapper
Returns the description of this mapper.- Specified by:
getDescription
in interfaceILdapMapper
- Overrides:
getDescription
in classLdapDNCompsMap
-
getDefaultParams
public java.util.Vector<java.lang.String> getDefaultParams()
Description copied from interface:ILdapMapper
Returns the initial default parameters.- Specified by:
getDefaultParams
in interfaceILdapMapper
- Overrides:
getDefaultParams
in classLdapDNCompsMap
-
getInstanceParams
public java.util.Vector<java.lang.String> getInstanceParams()
Description copied from interface:ILdapMapper
Returns the current instance parameters.- Specified by:
getInstanceParams
in interfaceILdapMapper
- Overrides:
getInstanceParams
in classLdapDNCompsMap
-
init
protected void init(java.lang.String baseDN, ObjectIdentifier[] dnComps, ObjectIdentifier[] filterComps)
Description copied from class:LdapDNCompsMap
common initialization routine.- Overrides:
init
in classLdapDNCompsMap
-
map
public java.lang.String map(netscape.ldap.LDAPConnection conn, java.lang.Object obj) throws ELdapException
Maps a certificate to LDAP entry. Uses DN components and filter components to form a DN and filter for a LDAP search. If the formed DN is null the baseDN will be used. If the formed DN is null and baseDN is null an error is thrown. If the filter is null a base search is performed. If both are null an error is thrown.- Specified by:
map
in interfaceILdapMapper
- Parameters:
conn
- - the LDAP connection.obj
- - the X509Certificate.- Returns:
- dn indicates whether a mapping was successful
- Throws:
ELdapException
- Map operation failed.
-
map
public java.lang.String map(netscape.ldap.LDAPConnection conn, IRequest req, java.lang.Object obj) throws ELdapException
Description copied from interface:ILdapMapper
maps a certificate to a LDAP entry. returns dn of the mapped LDAP entry.- Specified by:
map
in interfaceILdapMapper
- Parameters:
conn
- the LDAP connectionreq
- the request to mapobj
- the object to map- Returns:
- dn indicates whether a mapping was successful
- Throws:
ELdapException
- Map operation failed.
-
-