Class DbDirHandler
java.lang.Object
org.bedework.carddav.common.AbstractDirHandler
org.bedework.carddav.server.dirHandlers.db.DbDirHandler
- All Implemented Interfaces:
Serializable,org.bedework.access.PrivilegeDefs,DirHandler,org.bedework.util.logging.Logged
- Direct Known Subclasses:
DbAddrBookDirHandler
public abstract class DbDirHandler
extends AbstractDirHandler
implements org.bedework.access.PrivilegeDefs
Provide some common methods for db based directory handlers.
- Author:
- douglm
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.bedework.carddav.common.AbstractDirHandler
AbstractDirHandler.SplitResultNested classes/interfaces inherited from interface org.bedework.carddav.common.DirHandler
DirHandler.CollectionBatcher -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DbDirHandlerConfigprotected TimestampWhen we were created for debuggingprotected org.bedework.database.db.DbSessionCurrent hibernate session - exists only across one user interactionprotected StringFields inherited from class org.bedework.carddav.common.AbstractDirHandler
account, cdConfig, dhConfig, open, principalNotFound, superUser, unknownPrincipalType, urlHandlerFields inherited from interface org.bedework.carddav.common.DirHandler
statusChangeUid, statusCreated, statusDestinationExists, statusDuplicate, statusDuplicateUid, statusIllegal, statusNoAccess, statusOKFields inherited from interface org.bedework.access.PrivilegeDefs
allowed, allowedInherited, denied, deniedInherited, inheritedFlag, oldAllowed, oldDenied, privAll, privAny, privBind, privEncoding, privMaxType, privNone, privRead, privReadAcl, privReadCurrentUserPrivilegeSet, privReadFreeBusy, privSchedule, privScheduleDeliver, privScheduleDeliverInvite, privScheduleDeliverReply, privScheduleFreeBusy, privScheduleQueryFreebusy, privScheduleReply, privScheduleRequest, privScheduleSend, privScheduleSendFreebusy, privScheduleSendInvite, privScheduleSendReply, privUnbind, privUnlock, privWrite, privWriteAcl, privWriteContent, privWriteProperties, unspecified -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected org.bedework.webdav.servlet.access.SharedEntitycheckAccess(org.bedework.webdav.servlet.access.SharedEntity ent, int desiredAccess, boolean alwaysReturnResult) protected voidvoidclose()protected voidprotected voiddeleteDbCard(DbCard dbcard) protected intdeleteDbCollection(String path) protected voidprotected StringensureSlashAtEnd(String val) getCardByUid(String path, String uid) getCollection(String path) getCollections(String path) getCollections(String path, GetLimits limits) protected DbCardprotected DbCardprotected DbCardgetDbCardByUid(String parentPath, String uid) protected DbCollectiongetDbCollection(String path, int access) voidinit(CardDAVConfigI cdConfig, DirHandlerConfig<?> dhConfig, org.bedework.webdav.servlet.shared.UrlHandler urlHandler) protected CarddavCollectionprotected Cardvoidprotected voidprotected voidprotected voidMethods inherited from class org.bedework.carddav.common.AbstractDirHandler
addToPrincipal, addValidUser, ensureEndSlash, exportData, getDirectoryInfo, getGroups, getLogger, getPrincipal, getprincipalHome, getprincipalHome, getToPrincipal, isOpen, isPrincipal, lookupUser, makePrincipalHref, makePrincipalUri, splitUri, verifyPathMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bedework.carddav.common.DirHandler
addCard, copyMove, deleteCard, deleteCollection, getPrincipalCard, makeCollection, rename, updateCard, updateCollectionMethods inherited from interface org.bedework.util.logging.Logged
audit, debug, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, trace, warn
-
Field Details
-
dbConfig
-
userHomeRoot
-
objTimestamp
When we were created for debugging -
sess
protected org.bedework.database.db.DbSession sessCurrent hibernate session - exists only across one user interaction
-
-
Constructor Details
-
DbDirHandler
public DbDirHandler()
-
-
Method Details
-
open
- Specified by:
openin interfaceDirHandler- Overrides:
openin classAbstractDirHandler
-
close
public void close()- Specified by:
closein interfaceDirHandler- Overrides:
closein classAbstractDirHandler
-
getCard
- Specified by:
getCardin interfaceDirHandler
-
getCardByUid
- Specified by:
getCardByUidin interfaceDirHandler
-
getCards
- Specified by:
getCardsin interfaceDirHandler
-
getAll
- Specified by:
getAllin interfaceDirHandler
-
getCollection
- Specified by:
getCollectionin interfaceDirHandler
-
getCollections
- Specified by:
getCollectionsin interfaceDirHandler
-
getCollections
- Specified by:
getCollectionsin interfaceDirHandler- Overrides:
getCollectionsin classAbstractDirHandler
-
updateCollection
-
getDbCard
-
getDbCardByUid
-
getDbCard
-
getDbCollection
-
makeCdCollection
-
deleteDbCollection
-
makeVcard
- Parameters:
dbcard- dbcopy- Returns:
- a Card object
-
deleteDbCard
-
checkOpen
protected void checkOpen() -
openSession
protected void openSession() -
closeSession
protected void closeSession() -
beginTransaction
protected void beginTransaction() -
endTransaction
protected void endTransaction() -
rollbackTransaction
protected void rollbackTransaction() -
ensureSlashAtEnd