Package org.bedework.carddav.server
Interface SysIntf
- All Superinterfaces:
org.bedework.webdav.servlet.shared.WdSysIntf
- All Known Implementing Classes:
BwSysIntfImpl
public interface SysIntf
extends org.bedework.webdav.servlet.shared.WdSysIntf
All interactions with the underlying calendar system are made via this
interface.
We're using the bedework object classes here. To simplify matters (a little) we don't have distinct event, todo and journal classes. They are all currently the BwEvent class with an entityType defining what the object represents.
- Author:
- Mike Douglass douglm at rpi.edu
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a card.org.bedework.access.CurrentAccesscheckAccess(CarddavCollection ent, int desiredAccess, boolean returnResult) Check the access for the given entity.voidclose()End any transactions.booleancopyMove(Card from, org.bedework.webdav.servlet.shared.WdCollection<?> to, String name, boolean copy, boolean overwrite) Copy or move the given entity to the destination collection with the given name.voidcopyMove(org.bedework.webdav.servlet.shared.WdCollection<?> from, org.bedework.webdav.servlet.shared.WdCollection<?> to, boolean copy, boolean overwrite) Copy or move the collection to another location.booleancopyMoveFile(CarddavResource from, org.bedework.webdav.servlet.shared.WdCollection<?> to, String name, boolean copy, boolean overwrite) Copy or move the given file to the destination collection with the given name.voiddeleteCard(CarddavCardNode card) voiddeleteCollection(org.bedework.webdav.servlet.shared.WdCollection<?> cal) voidDelete a file.Get card given the collection and String name.getCards(CarddavCollection col, Filter filter, GetLimits limits) Return the cards for the current user in the given collection using the supplied filter.getCollection(String path) Get a collection given the pathgetCollections(CarddavCollection col, GetLimits limits) Returns children of the given collection to which the current user has some access.booleanDo we allow browsing of directories?GET a file.voidGet resource content given the resource.getFiles(org.bedework.webdav.servlet.shared.WdCollection<?> coll) Get the files in a collection.The urls should be principal urls. principalUrl can null for the current user.intMax size for an entityorg.bedework.access.AccessPrincipalReturn the current principalorg.bedework.access.AccessPrincipalgetPrincipal(String href) Return principal information for the given href.getPrincipalCollectionSet(String resourceUri) Given a uri returns a Collection of uris that allow search operations on principals for that resource.getPrincipalInfo(org.bedework.access.AccessPrincipal pcpl, boolean getDirInfo) Given a valid principal return the associated information needed for carddav interactions.getPrincipals(String resourceUri, org.bedework.webdav.servlet.shared.PrincipalPropertySearch pps) Given a PrincipalPropertySearch returns a Collection of matching principals.Get a property handlervoidinit(jakarta.servlet.http.HttpServletRequest req, String account, CardDAVConfig conf, CardDAVContextConfig ctxConf) Called before any other method is called to allow initialisation to take place at the first or subsequent requestsbooleanisPrincipal(String val) Does the value appear to represent a valid principal?intmakeCollection(CarddavCollection col, String parentPath) makeHref(org.bedework.access.AccessPrincipal p) voidputFile(org.bedework.webdav.servlet.shared.WdCollection<?> coll, CarddavResource val) PUT a file.voidupdateAccess(CarddavCardNode card, org.bedework.access.Acl acl) voidupdateAccess(CarddavColNode col, org.bedework.access.Acl acl) voidupdateCard(String path, Card card) Update a card.voidupdateCollection(org.bedework.webdav.servlet.shared.WdCollection<?> val) Update a collection.voidupdateFile(CarddavResource val, boolean updateContent) Update a file.Methods inherited from interface org.bedework.webdav.servlet.shared.WdSysIntf
allowsSyncReport, getDefaultContentType, getNotificationURL, getUrlHandler
-
Method Details
-
init
void init(jakarta.servlet.http.HttpServletRequest req, String account, CardDAVConfig conf, CardDAVContextConfig ctxConf) Called before any other method is called to allow initialisation to take place at the first or subsequent requests- Parameters:
req- http requestaccount- user idconf- global service configurationctxConf- per application type configuration
-
getPrincipal
org.bedework.access.AccessPrincipal getPrincipal()Return the current principal- Returns:
- String
-
getPropertyHandler
Get a property handler- Parameters:
ptype-- Returns:
- PropertyHandler
-
isPrincipal
Does the value appear to represent a valid principal?- Parameters:
val- possible id or principal- Returns:
- true if it's a (possible) principal
-
getPrincipal
Return principal information for the given href. Also tests for a valid principal.- Parameters:
href- for principal- Returns:
- AccessPrincipal
-
makeHref
- Parameters:
p- principal- Returns:
- String href
-
getGroups
The urls should be principal urls. principalUrl can null for the current user. The result is a collection of principal urls of which the given url is a member, based upon rootUrl. For example, if rootUrl points to the base of the user principal hierarchy, then the rsult should be at least the current user's principal url, remembering that user principals are themselves groups and the user is considered a member of their own group.- Parameters:
rootUrl- - url to base search on.principalUrl- - url of principal or null for current user- Returns:
- Collection of urls - always non-null
-
getDirectoryBrowsingDisallowed
boolean getDirectoryBrowsingDisallowed()Do we allow browsing of directories?- Returns:
- boolean true if browsing disallowed
- Throws:
org.bedework.webdav.servlet.shared.WebdavException- for errors
-
getPrincipalInfo
SysIntf.PrincipalInfo getPrincipalInfo(org.bedework.access.AccessPrincipal pcpl, boolean getDirInfo) Given a valid principal return the associated information needed for carddav interactions.- Parameters:
pcpl- the principalgetDirInfo- get directory info if true and available.- Returns:
- PrincipalInfo or null
-
getPrincipalCollectionSet
Given a uri returns a Collection of uris that allow search operations on principals for that resource.- Parameters:
resourceUri-- Returns:
- Collection of String
-
addCard
Add a card.- Parameters:
path- to collectioncard- Object to be added
-
updateCard
Update a card.- Parameters:
path- to collectioncard- Object to be updated
-
getCards
Return the cards for the current user in the given collection using the supplied filter.- Parameters:
col- collectionfilter- - if non-null defines a search filterlimits- - applied to this query- Returns:
- Collection populated card objects
-
getCard
Get card given the collection and String name.- Parameters:
path- to collectionname- String possible name- Returns:
- Vcard or null
-
deleteCard
- Parameters:
card-
-
updateAccess
- Parameters:
card-acl-
-
checkAccess
org.bedework.access.CurrentAccess checkAccess(CarddavCollection ent, int desiredAccess, boolean returnResult) Check the access for the given entity. Returns the current access or null or optionally throws a no access exception.- Parameters:
ent-desiredAccess-returnResult-- Returns:
- CurrentAccess
-
updateAccess
- Parameters:
col-acl-
-
makeCollection
- Parameters:
col- Initialised collection objectparentPath-- Returns:
- int status
-
getCollection
Get a collection given the path- Parameters:
path- String path of collection- Returns:
- WdCollection null for unknown collection
-
getCollections
Returns children of the given collection to which the current user has some access.- Parameters:
col- parent collectionlimits-- Returns:
- GetResult with collection of WdCollection
-
getFileContent
Get resource content given the resource. It will be set in the resource object- Parameters:
val- BwResource
-
updateFile
Update a file.- Parameters:
val- BwResourceupdateContent- if true we also update the content
-
deleteFile
Delete a file.- Parameters:
val- BwResource
-
getMaxUserEntitySize
int getMaxUserEntitySize()Max size for an entity- Returns:
- int
-
close
void close()End any transactions.
-