Class LdapDirHandler
- java.lang.Object
-
- org.bedework.carddav.common.AbstractDirHandler
-
- org.bedework.carddav.server.dirHandlers.ldap.LdapDirHandler
-
- All Implemented Interfaces:
DirHandler,org.bedework.util.logging.Logged
- Direct Known Subclasses:
LdapAddrBookDirHandler,LdapPrincipalDirHandler
public abstract class LdapDirHandler extends AbstractDirHandler
Provide some common methods for ldap based directory handlers.- Author:
- douglm
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLdapDirHandler.LdapObject-
Nested classes/interfaces inherited from class org.bedework.carddav.common.AbstractDirHandler
AbstractDirHandler.SplitResult
-
Nested classes/interfaces inherited from interface org.bedework.carddav.common.DirHandler
DirHandler.CollectionBatcher
-
-
Field Summary
Fields Modifier and Type Field Description protected DirContextctxprotected LdapDirHandlerConfigldapConfig-
Fields inherited from class org.bedework.carddav.common.AbstractDirHandler
account, cdConfig, dhConfig, open, principalNotFound, superUser, unknownPrincipalType, urlHandler
-
Fields inherited from interface org.bedework.carddav.common.DirHandler
statusChangeUid, statusCreated, statusDestinationExists, statusDuplicate, statusDuplicateUid, statusIllegal, statusNoAccess, statusOK
-
-
Constructor Summary
Constructors Constructor Description LdapDirHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcloseContext()protected StringdnEscape(String val)protected String[]getAttrIdList()CardgetCard(String path, String name)CardgetCardByUid(String path, String uid)GetResultgetCards(String path, Filter filter, GetLimits limits)CarddavCollectiongetCollection(String path)GetResultgetCollections(String path, GetLimits limits)protected LdapDirHandler.LdapObjectgetObject(String path, boolean isCollection)voidinit(CardDAVConfigI cdConfig, DirHandlerConfig dhConfig, org.bedework.webdav.servlet.shared.UrlHandler urlHandler)protected StringmakeAddrbookDn(String path, boolean isCollection)protected CarddavCollectionmakeCdCollection(String path, boolean fullPath, Attributes attrs)protected StringmakePrincipalDn(String account)protected CardmakeVcard(String path, boolean fullPath, Attributes attrs, String dn)protected org.bedework.carddav.server.dirHandlers.ldap.LdapDirHandler.CardObjectnextCard(String path, boolean fullPath)protected org.bedework.carddav.server.dirHandlers.ldap.LdapDirHandler.CollectionObjectnextCdCollection(String path, boolean fullPath)protected voidopenContext()protected GetResultsearch(String base, String filter, GetLimits limits, int scope)protected GetResultsearchChildren(String path, String filter, GetLimits limits, boolean cards)-
Methods inherited from class org.bedework.carddav.common.AbstractDirHandler
addToPrincipal, addValidUser, close, ensureEndSlash, exportData, getCollections, getDirectoryInfo, getGroups, getLogger, getPrincipal, getprincipalHome, getprincipalHome, getToPrincipal, isOpen, isPrincipal, lookupUser, makePrincipalHref, makePrincipalUri, open, splitUri, verifyPath
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.bedework.carddav.common.DirHandler
addCard, copyMove, deleteCard, deleteCollection, getAll, getPrincipalCard, makeCollection, rename, updateCard, updateCollection
-
Methods inherited from interface org.bedework.util.logging.Logged
audit, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, setLogLevel, trace, trace, warn
-
-
-
-
Field Detail
-
ldapConfig
protected LdapDirHandlerConfig ldapConfig
-
ctx
protected DirContext ctx
-
-
Method Detail
-
init
public void init(CardDAVConfigI cdConfig, DirHandlerConfig dhConfig, org.bedework.webdav.servlet.shared.UrlHandler urlHandler) throws org.bedework.webdav.servlet.shared.WebdavException
- Specified by:
initin interfaceDirHandler- Overrides:
initin classAbstractDirHandler- Throws:
org.bedework.webdav.servlet.shared.WebdavException
-
getCard
public Card getCard(String path, String name) throws org.bedework.webdav.servlet.shared.WebdavException
- Throws:
org.bedework.webdav.servlet.shared.WebdavException
-
getCardByUid
public Card getCardByUid(String path, String uid) throws org.bedework.webdav.servlet.shared.WebdavException
- Throws:
org.bedework.webdav.servlet.shared.WebdavException
-
getCards
public GetResult getCards(String path, Filter filter, GetLimits limits) throws org.bedework.webdav.servlet.shared.WebdavException
- Throws:
org.bedework.webdav.servlet.shared.WebdavException
-
getCollection
public CarddavCollection getCollection(String path) throws org.bedework.webdav.servlet.shared.WebdavException
- Throws:
org.bedework.webdav.servlet.shared.WebdavException
-
getCollections
public GetResult getCollections(String path, GetLimits limits) throws org.bedework.webdav.servlet.shared.WebdavException
- Throws:
org.bedework.webdav.servlet.shared.WebdavException
-
search
protected GetResult search(String base, String filter, GetLimits limits, int scope) throws org.bedework.webdav.servlet.shared.WebdavException
- Throws:
org.bedework.webdav.servlet.shared.WebdavException
-
nextCard
protected org.bedework.carddav.server.dirHandlers.ldap.LdapDirHandler.CardObject nextCard(String path, boolean fullPath) throws org.bedework.webdav.servlet.shared.WebdavException
- Throws:
org.bedework.webdav.servlet.shared.WebdavException
-
nextCdCollection
protected org.bedework.carddav.server.dirHandlers.ldap.LdapDirHandler.CollectionObject nextCdCollection(String path, boolean fullPath) throws org.bedework.webdav.servlet.shared.WebdavException
- Throws:
org.bedework.webdav.servlet.shared.WebdavException
-
makeCdCollection
protected CarddavCollection makeCdCollection(String path, boolean fullPath, Attributes attrs) throws org.bedework.webdav.servlet.shared.WebdavException
- Throws:
org.bedework.webdav.servlet.shared.WebdavException
-
makeVcard
protected Card makeVcard(String path, boolean fullPath, Attributes attrs, String dn) throws org.bedework.webdav.servlet.shared.WebdavException
- Parameters:
path- path to this cardfullPath- - path includes card nameattrs- attributes for the entry- Returns:
- a card
- Throws:
org.bedework.webdav.servlet.shared.WebdavException
-
getObject
protected LdapDirHandler.LdapObject getObject(String path, boolean isCollection) throws org.bedework.webdav.servlet.shared.WebdavException
- Throws:
org.bedework.webdav.servlet.shared.WebdavException
-
searchChildren
protected GetResult searchChildren(String path, String filter, GetLimits limits, boolean cards) throws org.bedework.webdav.servlet.shared.WebdavException
- Throws:
org.bedework.webdav.servlet.shared.WebdavException
-
makeAddrbookDn
protected String makeAddrbookDn(String path, boolean isCollection) throws org.bedework.webdav.servlet.shared.WebdavException
- Throws:
org.bedework.webdav.servlet.shared.WebdavException
-
openContext
protected void openContext() throws org.bedework.webdav.servlet.shared.WebdavException- Throws:
org.bedework.webdav.servlet.shared.WebdavException
-
closeContext
protected void closeContext()
-
getAttrIdList
protected String[] getAttrIdList()
-
-