Class RWClientImpl
- All Implemented Interfaces:
Serializable,Client,RWClient,org.bedework.util.logging.Logged
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bedework.client.rw.RWClient
RWClient.DeleteReffedEntityResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.bedework.caldav.util.filter.FilterBaseprotected booleanFields inherited from class org.bedework.appcommon.client.ROClientImpl
adminGroupsInfo, appType, calSuite, calsuiteAdminGroupsInfo, calSuiteName, calSuiteOwner, conf, currentPrincipal, id, lastAdminGroupsInfoRefresh, lastUpdate, mapper, pars, publicAdmin, publicView, requestEnd, superUser, svci, tryLastLocaleFields inherited from interface org.bedework.appcommon.client.Client
gridViewMode, listViewMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRWClientImpl(ConfigCommon conf, String id) RWClientImpl(ConfigCommon conf, String id, String authUser, String runAsUser, String appType) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddCategory(org.bedework.calfacade.BwCategory val) Add the given category.org.bedework.calfacade.BwCalendaraddCollection(org.bedework.calfacade.BwCalendar val, String parentPath) Add a calendar collectionvoidaddContact(org.bedework.calfacade.BwContact val) Add the contactorg.bedework.calfacade.svc.EventInfo.UpdateResultaddEvent(org.bedework.calfacade.svc.EventInfo ei, boolean noInvites, boolean rollbackOnError) Add an event and ensure its location and contact exist.voidaddFilter(org.bedework.calfacade.BwFilterDef val) Validate and persist a new filter definitionbooleanaddLocation(org.bedework.calfacade.BwLocation val) Add the locationbooleanaddView(org.bedework.calfacade.svc.BwView val, boolean makeDefault) Add a view.booleanaddViewCollection(String name, String path) Add a collection path to the named view.org.bedework.calsvci.SchedulingI.FbResponsesaggregateFreeBusy(org.bedework.calfacade.ScheduleResult sr, org.bedework.calfacade.BwDateTime start, org.bedework.calfacade.BwDateTime end, org.bedework.calfacade.BwDuration granularity) Get aggregated free busy for a ScheduleResult.voidchangeAccess(org.bedework.calfacade.base.ShareableEntity ent, Collection<org.bedework.access.Ace> aces, boolean replaceAll) Change the access to the given calendar entity.voidclaimEvent(org.bedework.calfacade.BwEvent ev) Claim ownership of this eventdeleteCategory(org.bedework.calfacade.BwCategory val) Delete a categorybooleandeleteCollection(org.bedework.calfacade.BwCalendar val, boolean emptyIt) Delete a collection.deleteContact(org.bedework.calfacade.BwContact val) Delete a contactorg.bedework.base.response.ResponsedeleteEvent(org.bedework.calfacade.svc.EventInfo ei, boolean sendSchedulingMessage) Delete an event.voiddeleteFilter(String name) Delete a filter given the namedeleteLocation(org.bedework.calfacade.BwLocation val) Delete a locationorg.bedework.calfacade.svc.EnsureEntityExistsResult<org.bedework.calfacade.BwContact>ensureContactExists(org.bedework.calfacade.BwContact val, String ownerHref) Ensure a contact exists.org.bedework.calfacade.svc.EnsureEntityExistsResult<org.bedework.calfacade.BwLocation>ensureLocationExists(org.bedework.calfacade.BwLocation val, String ownerHref) Ensure a location exists.org.bedework.caldav.util.notifications.NotificationTypefindNotification(String name) Find a notification in the notification collection for the current principal with the given name.org.bedework.calfacade.ParticipantfindUserAttendee(org.bedework.calfacade.svc.EventInfo ei) Find the attendee in this event which corresponds to the current userCollection<org.bedework.calfacade.BwCalendar>Return a list of calendars in which calendar objects can be placed by the current user.List<org.bedework.calfacade.BwResource>getAllResources(String path) Get resources to which this user has access - content is not fetched.org.bedework.calfacade.BwCalendargetCollection(String path) protected org.bedework.caldav.util.filter.FilterBaseorg.bedework.calfacade.BwEventgetFreeBusy(Collection<org.bedework.calfacade.BwCalendar> fbset, org.bedework.calfacade.BwPrincipal<?> who, org.bedework.calfacade.BwDateTime start, org.bedework.calfacade.BwDateTime end, org.bedework.calfacade.BwOrganizer org, String uid, String exceptUid) Get the free busy for the given principal as a list of busy periods.org.bedework.calfacade.BwPrincipal<?>getOwner()org.bedework.calfacade.BwCategoryorg.bedework.calfacade.BwContactGet the contact with the given uid.org.bedework.calfacade.BwLocationGet the location with the given uid.org.bedework.calfacade.BwResourcegetResource(String path) Get a resource given the path - does not getResource contentbooleangetResourceContent(org.bedework.calfacade.BwResource val) Retrieve resource content given the resource.List<org.bedework.calfacade.BwResource>getResources(String path, int count) Get resources to which this user has access - content is not fetched.org.bedework.calfacade.svc.EventInfogetStoredMeeting(org.bedework.calfacade.BwEvent ev) Return the users copy of the active meeting with the same uid as that given.org.bedework.calfacade.synch.BwSynchInfoReturns the synch service information.booleanbooleanisGuest()voidmarkDeleted(org.bedework.calfacade.BwEvent event) For an event to which we have write access we simply mark it deleted.voidmoveCollection(org.bedework.calfacade.BwCalendar val, org.bedework.calfacade.BwCalendar newParent) Move a calendar object from one parent to anothervoidmoveContents(org.bedework.calfacade.BwCalendar cal, org.bedework.calfacade.BwCalendar newCal) Move the contents of one collection to anotherorg.bedework.base.response.ResponseMove the event to the collection specified in newPath.voidpostMessage(org.bedework.calfacade.mail.Message val) voidpublish(org.bedework.calfacade.BwCalendar col) Publish the collection - that is make it available for subscriptions.org.bedework.calfacade.svc.RealiasResultreAlias(org.bedework.calfacade.BwEvent ev) Realias the event - set categories according to the set of aliasesorg.bedework.base.response.ResponserefreshSubscription(org.bedework.calfacade.BwCalendar val) Refresh a subscription represented by this calendar objectvoidvoidremoveAllNotifications(String principalHref) Remove all notifications for given principalvoidremoveNotification(String name) Remove the given notification from the notification collection for the current calendar user.voidremoveNotification(org.bedework.caldav.util.notifications.NotificationType val) Remove the given notification from the notification collection for the current calendar user.booleanremoveView(org.bedework.calfacade.svc.BwView val) Remove the view for the owner of the object.booleanremoveViewCollection(String name, String path) Remove a collection path from the named view.org.bedework.calfacade.ScheduleResultrequestRefresh(org.bedework.calfacade.svc.EventInfo ei, String comment) Attendee wants a refreshvoidsaveResource(org.bedework.calfacade.BwResource val) Save a resource at the given collection path.org.bedework.calfacade.ScheduleResultschedule(org.bedework.calfacade.svc.EventInfo ei, String recipient, String fromAttUri, boolean iSchedule) Schedule a meeting or publish an event.voidsetResourceValue(org.bedework.calfacade.BwResource val, byte[] content) voidsetResourceValue(org.bedework.calfacade.BwResource val, InputStream content, long length) voidsetResourceValue(org.bedework.calfacade.BwResource val, String content) org.bedework.caldav.util.sharing.ShareResultTypeshare(String principalHref, org.bedework.calfacade.BwCalendar col, org.bedework.caldav.util.sharing.ShareType share) org.bedework.calfacade.svc.SharingReplyResultsharingReply(org.bedework.caldav.util.sharing.InviteReplyType reply) org.bedework.calfacade.svc.SubscribeResultSubscribe to the collection - must be a published collection.voidorg.bedework.calfacade.svc.SubscribeResultsubscribeExternal(String extUrl, String subscribedName, int refresh, String remoteId, String remotePw) Subscribe to an external url.voidvoidunpublish(org.bedework.calfacade.BwCalendar col) Unpublish the collection - that is make it unavailable for subscriptions and remove any existing subscriptions.voidunsubscribe(String principalHref, List<String> emails) voidupdateCategory(org.bedework.calfacade.BwCategory val) Update a category.voidupdateCollection(org.bedework.calfacade.BwCalendar col) Update the given collectionvoidupdateContact(org.bedework.calfacade.BwContact val) Update the contactorg.bedework.calfacade.svc.EventInfo.UpdateResultupdateEvent(org.bedework.calfacade.svc.EventInfo ei, boolean noInvites, String fromAttUri, boolean alwaysWrite) Update an event in response to an attendee.voidupdateLocation(org.bedework.calfacade.BwLocation val) Update the locationvoidupdatePreferences(org.bedework.calfacade.svc.BwPreferences val) voidupdateResource(org.bedework.calfacade.BwResource val, boolean updateContent) Update a resource.voidvalidateFilter(String val) Validate a filter definition.Methods inherited from class org.bedework.appcommon.client.ROClientImpl
calAddrToPrincipal, checkResponse, checkUpdate, clearSearch, clearSearchEntries, close, collectionExists, copyCommon, decomposeVirtualPath, fetchLocationByCombined, fetchLocationByKey, findContact, findLocation, flushAll, flushCached, flushState, getAdminGroups, getAllFilters, getAllViews, getAppType, getAuthPrincipal, getAuthProperties, getCalendarAddress, getCalendarCollator, getCalSuite, getCalSuite, getCalsuitePreferences, getCalsuitePreferences, getCategories, getCategory, getCategoryByName, getCategoryByUid, getChildren, getConf, getContactByUid, getContacts, getContacts, getContextCalSuites, getCSResourcesPath, getCurrentCalendarAddress, getCurrentCalSuiteOwner, getCurrentChangeToken, getCurrentPrincipal, getCurrentPrincipalHref, getDefaultPublicCategoryUids, getDirectoryInfo, getEditableCategories, getEditableContacts, getEditableLocations, getEvent, getEvent, getEventByUid, getEvents, getFilter, getHome, getHome, getIndexer, getLocationByUid, getLocations, getLocations, getLogger, getPreferences, getPreferences, getPreferredCollectionPath, getPrimaryPublicPath, getPrincipal, getPublicAdmin, getPublicAuth, getPublicCalendars, getPublicCalendarsRootPath, getPublicCategories, getPublicContacts, getPublicLocations, getSearchParams, getSearchResult, getSearchResult, getSpecial, getSynchStatus, getSystemProperties, getUser, getUserLocale, getUserMaxEntitySize, getView, getViewMode, getWebSubmit, isDefaultIndexPublic, isOpen, isPrincipal, isSuperUser, makeLocale, makePrincipalUri, outputJson, parseFilter, parseSort, postNotification, refreshAdminGroupInfo, reinit, requestIn, requestOut, resetIndexers, resolveAlias, rollback, search, setViewMode, update, updated, uriToCaladdr, validPrincipal, writeJsonMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bedework.appcommon.client.Client
calAddrToPrincipal, clearSearch, clearSearchEntries, close, collectionExists, decomposeVirtualPath, fetchLocationByCombined, fetchLocationByKey, findContact, findLocation, flushAll, flushCached, flushState, getAdminGroups, getAllFilters, getAllViews, getAppType, getAuthPrincipal, getAuthProperties, getCalendarAddress, getCalSuite, getCalSuite, getCalsuitePreferences, getCategories, getCategory, getCategoryByName, getCategoryByUid, getChildren, getConf, getContactByUid, getContacts, getContacts, getContextCalSuites, getCurrentCalendarAddress, getCurrentChangeToken, getCurrentPrincipal, getCurrentPrincipalHref, getDefaultPublicCategoryUids, getDirectoryInfo, getEditableCategories, getEditableContacts, getEditableLocations, getEvent, getEvent, getEventByUid, getEvents, getFilter, getHome, getHome, getLocationByUid, getLocations, getLocations, getPreferences, getPreferences, getPreferredCollectionPath, getPrimaryPublicPath, getPrincipal, getPublicAdmin, getPublicAuth, getPublicCalendars, getPublicCalendarsRootPath, getPublicCategories, getPublicContacts, getPublicLocations, getSearchParams, getSearchResult, getSearchResult, getSpecial, getSynchStatus, getSystemProperties, getUser, getUserLocale, getUserMaxEntitySize, getView, getViewMode, getWebSubmit, isDefaultIndexPublic, isOpen, isPrincipal, isSuperUser, makePrincipalUri, outputJson, parseFilter, parseSort, postNotification, requestIn, requestOut, resolveAlias, rollback, search, setViewMode, uriToCaladdr, validPrincipal, writeJsonMethods 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
-
defaultFilterContextSet
protected boolean defaultFilterContextSet -
defaultFilterContext
protected org.bedework.caldav.util.filter.FilterBase defaultFilterContext
-
-
Constructor Details
-
RWClientImpl
public RWClientImpl(ConfigCommon conf, String id, String authUser, String runAsUser, String appType) -
RWClientImpl
-
-
Method Details
-
reinit
-
copy
- Specified by:
copyin interfaceClient- Overrides:
copyin classROClientImpl
-
getWebUser
public boolean getWebUser()- Specified by:
getWebUserin interfaceRWClient- Returns:
- true if we are the web user client.
-
unindex
-
isGuest
public boolean isGuest()- Specified by:
isGuestin interfaceClient- Overrides:
isGuestin classROClientImpl
-
getOwner
public org.bedework.calfacade.BwPrincipal<?> getOwner()- Specified by:
getOwnerin interfaceClient- Overrides:
getOwnerin classROClientImpl
-
updatePreferences
public void updatePreferences(org.bedework.calfacade.svc.BwPreferences val) - Specified by:
updatePreferencesin interfaceClient- Overrides:
updatePreferencesin classROClientImpl
-
getCollection
- Specified by:
getCollectionin interfaceClient- Overrides:
getCollectionin classROClientImpl
-
addCollection
public org.bedework.calfacade.BwCalendar addCollection(org.bedework.calfacade.BwCalendar val, String parentPath) Description copied from interface:RWClientAdd a calendar collectionThe new collection object will be added to the db. If the indicated parent is null it will be added as a root level collection.
Certain restrictions apply, mostly because of interoperability issues. A collection cannot be added to another collection which already contains entities, e.g. events etc.
Names cannot contain certain characters - (complete this)
Name must be unique at this level, i.e. all paths must be unique
- Specified by:
addCollectionin interfaceRWClient- Parameters:
val- BwCalendar new objectparentPath- String path to parent.- Returns:
- BwCalendar object as added. Parameter val MUST be discarded
-
updateCollection
public void updateCollection(org.bedework.calfacade.BwCalendar col) Description copied from interface:RWClientUpdate the given collection- Specified by:
updateCollectionin interfaceRWClient- Parameters:
col- the collection
-
deleteCollection
public boolean deleteCollection(org.bedework.calfacade.BwCalendar val, boolean emptyIt) Description copied from interface:RWClientDelete a collection. Also remove it from the current user preferences (if any).- Specified by:
deleteCollectionin interfaceRWClient- Parameters:
val- BwCalendar collectionemptyIt- true to delete contents- Returns:
- boolean true if it was deleted. false if it didn't exist
-
moveCollection
public void moveCollection(org.bedework.calfacade.BwCalendar val, org.bedework.calfacade.BwCalendar newParent) Description copied from interface:RWClientMove a calendar object from one parent to another- Specified by:
moveCollectionin interfaceRWClient- Parameters:
val- BwCalendar objectnewParent- BwCalendar potential parent
-
refreshSubscription
public org.bedework.base.response.Response refreshSubscription(org.bedework.calfacade.BwCalendar val) Description copied from interface:RWClientRefresh a subscription represented by this calendar object- Specified by:
refreshSubscriptionin interfaceRWClient- Parameters:
val- BwCalendar object
-
getAddContentCollections
Description copied from interface:RWClientReturn a list of calendars in which calendar objects can be placed by the current user.Caldav does not allow collections inside collections so that calendar collections are the leaf nodes only.
- Specified by:
getAddContentCollectionsin interfaceRWClient- Returns:
- Set of BwCalendar
-
getPersistentCategory
- Specified by:
getPersistentCategoryin interfaceRWClient- Parameters:
uid- of the category- Returns:
- category entity or null.
-
addCategory
public boolean addCategory(org.bedework.calfacade.BwCategory val) Description copied from interface:RWClientAdd the given category.- Specified by:
addCategoryin interfaceRWClient- Parameters:
val- category- Returns:
- false if not added because already exists
-
updateCategory
public void updateCategory(org.bedework.calfacade.BwCategory val) Description copied from interface:RWClientUpdate a category.- Specified by:
updateCategoryin interfaceRWClient- Parameters:
val- category object to be updated
-
deleteCategory
Description copied from interface:RWClientDelete a category- Specified by:
deleteCategoryin interfaceRWClient- Parameters:
val- BwEventProperty object to be deleted- Returns:
- result indicating what happened - null for not there
-
getPersistentContact
Description copied from interface:RWClientGet the contact with the given uid.- Specified by:
getPersistentContactin interfaceRWClient- Parameters:
uid- of contact- Returns:
- contact object
-
addContact
public void addContact(org.bedework.calfacade.BwContact val) Description copied from interface:RWClientAdd the contact- Specified by:
addContactin interfaceRWClient- Parameters:
val- contact
-
updateContact
public void updateContact(org.bedework.calfacade.BwContact val) Description copied from interface:RWClientUpdate the contact- Specified by:
updateContactin interfaceRWClient- Parameters:
val- contact
-
deleteContact
Description copied from interface:RWClientDelete a contact- Specified by:
deleteContactin interfaceRWClient- Parameters:
val- contact to be deleted- Returns:
- result indicating what happened - null for not there
-
ensureContactExists
public org.bedework.calfacade.svc.EnsureEntityExistsResult<org.bedework.calfacade.BwContact> ensureContactExists(org.bedework.calfacade.BwContact val, String ownerHref) Description copied from interface:RWClientEnsure a contact exists. If it already does returns the object. If not creates the entity.- Specified by:
ensureContactExistsin interfaceRWClient- Parameters:
val- contact object.ownerHref- String principal href, null for current user- Returns:
- response object.
-
getPersistentLocation
Description copied from interface:RWClientGet the location with the given uid.- Specified by:
getPersistentLocationin interfaceRWClient- Parameters:
uid- of location- Returns:
- Location object
-
addLocation
public boolean addLocation(org.bedework.calfacade.BwLocation val) Description copied from interface:RWClientAdd the location- Specified by:
addLocationin interfaceRWClient- Parameters:
val- a location- Returns:
- true if added
-
updateLocation
public void updateLocation(org.bedework.calfacade.BwLocation val) Description copied from interface:RWClientUpdate the location- Specified by:
updateLocationin interfaceRWClient- Parameters:
val- a location
-
deleteLocation
Description copied from interface:RWClientDelete a location- Specified by:
deleteLocationin interfaceRWClient- Parameters:
val- location to be deleted- Returns:
- result indicating what happened - null for not there
-
ensureLocationExists
public org.bedework.calfacade.svc.EnsureEntityExistsResult<org.bedework.calfacade.BwLocation> ensureLocationExists(org.bedework.calfacade.BwLocation val, String ownerHref) Description copied from interface:RWClientEnsure a location exists. If it already does returns the object. If not creates the entity.- Specified by:
ensureLocationExistsin interfaceRWClient- Parameters:
val- location object.ownerHref- String principal href, null for current user- Returns:
- response object.
-
claimEvent
public void claimEvent(org.bedework.calfacade.BwEvent ev) Description copied from interface:RWClientClaim ownership of this event- Specified by:
claimEventin interfaceRWClient- Parameters:
ev- event
-
reAlias
public org.bedework.calfacade.svc.RealiasResult reAlias(org.bedework.calfacade.BwEvent ev) Description copied from interface:RWClientRealias the event - set categories according to the set of aliases -
addEvent
public org.bedework.calfacade.svc.EventInfo.UpdateResult addEvent(org.bedework.calfacade.svc.EventInfo ei, boolean noInvites, boolean rollbackOnError) Description copied from interface:RWClientAdd an event and ensure its location and contact exist. The calendar path must be set in the event.For public events some calendar implementors choose to allow the dynamic creation of locations and contacts. For each of those, if we have an id, then the object represents a preexisting database item.
Otherwise the client has provided information which will be used to locate an already existing location or contact. Failing that we use the information to create a new entry.
For user clients, we generally assume no contact and the location is optional. However, both conditions are enforced at the application level.
On return the event object will have been updated. In addition the location and contact may have been updated.
If this is a scheduling event and noInvites is set to false then invitations wil be sent out to the attendees.
The event to be added may be a reference to another event. In this case a number of fields should have been copied from that event. Other fields will come from the target.
-
updateEvent
public org.bedework.calfacade.svc.EventInfo.UpdateResult updateEvent(org.bedework.calfacade.svc.EventInfo ei, boolean noInvites, String fromAttUri, boolean alwaysWrite) Description copied from interface:RWClientUpdate an event in response to an attendee. Exactly as normal update if fromAtt is null. Otherwise no status update is sent to the given attendeeAny changeset should be embedded in the event info object.
- Specified by:
updateEventin interfaceRWClient- Parameters:
ei- EventInfo object to be addednoInvites- True for don't send invitations.fromAttUri- attendee respondingalwaysWrite- write and reindex whatever changetable says- Returns:
- UpdateResult Counts of changes.
-
moveEvent
public org.bedework.base.response.Response moveEvent(org.bedework.calfacade.svc.EventInfo ei, String newPath) Description copied from interface:RWClientMove the event to the collection specified in newPath. There must be no event with the same uid in the destination. -
deleteEvent
public org.bedework.base.response.Response deleteEvent(org.bedework.calfacade.svc.EventInfo ei, boolean sendSchedulingMessage) Description copied from interface:RWClientDelete an event.- Specified by:
deleteEventin interfaceRWClient- Parameters:
ei- BwEvent object to be deletedsendSchedulingMessage- Send a declined or cancel scheduling message- Returns:
- Response with status ok if event deleted
-
markDeleted
public void markDeleted(org.bedework.calfacade.BwEvent event) Description copied from interface:RWClientFor an event to which we have write access we simply mark it deleted.Otherwise we add an annotation maarking the event as deleted.
- Specified by:
markDeletedin interfaceRWClient- Parameters:
event- to delete
-
findNotification
Description copied from interface:RWClientFind a notification in the notification collection for the current principal with the given name.- Specified by:
findNotificationin interfaceRWClient- Parameters:
name- - of the notification- Returns:
- null for no notification or the notification with that name
-
removeNotification
Description copied from interface:RWClientRemove the given notification from the notification collection for the current calendar user.- Specified by:
removeNotificationin interfaceRWClient- Parameters:
name- of notification to remove
-
removeNotification
public void removeNotification(org.bedework.caldav.util.notifications.NotificationType val) Description copied from interface:RWClientRemove the given notification from the notification collection for the current calendar user.- Specified by:
removeNotificationin interfaceRWClient- Parameters:
val- notification to remove
-
removeAllNotifications
Description copied from interface:RWClientRemove all notifications for given principal- Specified by:
removeAllNotificationsin interfaceRWClient- Parameters:
principalHref- principal to clean
-
subscribe
-
unsubscribe
- Specified by:
unsubscribein interfaceRWClient
-
getResource
Description copied from interface:RWClientGet a resource given the path - does not getResource content- Specified by:
getResourcein interfaceRWClient- Parameters:
path- String path to resource- Returns:
- BwResource null for unknown resource
-
getResourceContent
public boolean getResourceContent(org.bedework.calfacade.BwResource val) Description copied from interface:RWClientRetrieve resource content given the resource. It will be set in the resource object- Specified by:
getResourceContentin interfaceRWClient- Parameters:
val- BwResource- Returns:
- false if content missing
-
getAllResources
Description copied from interface:RWClientGet resources to which this user has access - content is not fetched.- Specified by:
getAllResourcesin interfaceRWClient- Parameters:
path- String path to containing collection- Returns:
- List of BwResource
-
getResources
Description copied from interface:RWClientGet resources to which this user has access - content is not fetched.- Specified by:
getResourcesin interfaceRWClient- Parameters:
path- String path to containing collectioncount- this many- Returns:
- List of BwResource
-
saveResource
public void saveResource(org.bedework.calfacade.BwResource val) Description copied from interface:RWClientSave a resource at the given collection path. The collection MUST exist.- Specified by:
saveResourcein interfaceRWClient- Parameters:
val- resource with attached content
-
updateResource
public void updateResource(org.bedework.calfacade.BwResource val, boolean updateContent) Description copied from interface:RWClientUpdate a resource.- Specified by:
updateResourcein interfaceRWClient- Parameters:
val- resourceupdateContent- if true we also update the content
-
setResourceValue
- Specified by:
setResourceValuein interfaceRWClient- Parameters:
val- the resource objectcontent- to embed
-
setResourceValue
public void setResourceValue(org.bedework.calfacade.BwResource val, byte[] content) - Specified by:
setResourceValuein interfaceRWClient- Parameters:
val- the resource objectcontent- to embed
-
setResourceValue
public void setResourceValue(org.bedework.calfacade.BwResource val, InputStream content, long length) - Specified by:
setResourceValuein interfaceRWClient- Parameters:
val- the resource objectcontent- input stream with content
-
findUserAttendee
public org.bedework.calfacade.Participant findUserAttendee(org.bedework.calfacade.svc.EventInfo ei) Description copied from interface:RWClientFind the attendee in this event which corresponds to the current user- Specified by:
findUserAttendeein interfaceRWClient- Parameters:
ei- to search- Returns:
- attendee or null.
-
getFreeBusy
public org.bedework.calfacade.BwEvent getFreeBusy(Collection<org.bedework.calfacade.BwCalendar> fbset, org.bedework.calfacade.BwPrincipal<?> who, org.bedework.calfacade.BwDateTime start, org.bedework.calfacade.BwDateTime end, org.bedework.calfacade.BwOrganizer org, String uid, String exceptUid) Description copied from interface:RWClientGet the free busy for the given principal as a list of busy periods.- Specified by:
getFreeBusyin interfaceRWClient- Parameters:
fbset- Collections for which to provide free-busy. Null for the for default collection (as specified by user). Used for local access to a given calendar via e.g. caldavwho- If cal is null getResource the info for this user, otherwise this is used as the free/busy result ownerstart- of freebusy periodend- of freebusy periodorg- - needed to make the result compliantuid- - uid of requesting component or null for no requestexceptUid- if non-null omit this uid from the freebusy calculation- Returns:
- BwEvent
-
aggregateFreeBusy
public org.bedework.calsvci.SchedulingI.FbResponses aggregateFreeBusy(org.bedework.calfacade.ScheduleResult sr, org.bedework.calfacade.BwDateTime start, org.bedework.calfacade.BwDateTime end, org.bedework.calfacade.BwDuration granularity) Description copied from interface:RWClientGet aggregated free busy for a ScheduleResult.- Specified by:
aggregateFreeBusyin interfaceRWClient- Parameters:
sr- ScheduleResultstart- of periodend- of periodgranularity- of result - eg 1 hour- Returns:
- FbResponses
-
schedule
public org.bedework.calfacade.ScheduleResult schedule(org.bedework.calfacade.svc.EventInfo ei, String recipient, String fromAttUri, boolean iSchedule) Description copied from interface:RWClientSchedule a meeting or publish an event. The event object must have the organizer and attendees and possibly recipients set according to itip + caldav.The event will be added to the users outbox which will trigger the send of requests to other users inboxes. For users within this system the request will be immediately addded to the recipients inbox. For external users they are sent via ischedule or mail.
- Specified by:
schedulein interfaceRWClient- Parameters:
ei- EventInfo object containing with method=REQUEST, CANCEL, ADD, DECLINECOUNTER or PUBLISHrecipient- - non null to send to this recipient only (for REFRESH)fromAttUri- - identifies the attendeeiSchedule- true if it's an iSchedule request.- Returns:
- ScheduleResult
-
getStoredMeeting
public org.bedework.calfacade.svc.EventInfo getStoredMeeting(org.bedework.calfacade.BwEvent ev) Description copied from interface:RWClientReturn the users copy of the active meeting with the same uid as that given.- Specified by:
getStoredMeetingin interfaceRWClient- Parameters:
ev- the event to search for- Returns:
- possibly null meeting
-
requestRefresh
public org.bedework.calfacade.ScheduleResult requestRefresh(org.bedework.calfacade.svc.EventInfo ei, String comment) Description copied from interface:RWClientAttendee wants a refresh- Specified by:
requestRefreshin interfaceRWClient- Parameters:
ei- event which is probably in a calendar.comment- - optional comment- Returns:
- ScheduleResult
-
publish
public void publish(org.bedework.calfacade.BwCalendar col) Description copied from interface:RWClientPublish the collection - that is make it available for subscriptions. -
unpublish
public void unpublish(org.bedework.calfacade.BwCalendar col) Description copied from interface:RWClientUnpublish the collection - that is make it unavailable for subscriptions and remove any existing subscriptions. -
sharingReply
public org.bedework.calfacade.svc.SharingReplyResult sharingReply(org.bedework.caldav.util.sharing.InviteReplyType reply) - Specified by:
sharingReplyin interfaceRWClient- Parameters:
reply- the request- Returns:
- a ReplyResult object.
-
subscribe
Description copied from interface:RWClientSubscribe to the collection - must be a published collection. -
subscribeExternal
public org.bedework.calfacade.svc.SubscribeResult subscribeExternal(String extUrl, String subscribedName, int refresh, String remoteId, String remotePw) Description copied from interface:RWClientSubscribe to an external url.- Specified by:
subscribeExternalin interfaceRWClient- Parameters:
extUrl- the urlsubscribedName- name for new aliasrefresh- - refresh rate in minutes <= 0 for defaultremoteId- - may be nullremotePw- - may be null- Returns:
- path of new alias and flag
-
getSynchInfo
public org.bedework.calfacade.synch.BwSynchInfo getSynchInfo()Description copied from interface:RWClientReturns the synch service information.- Specified by:
getSynchInfoin interfaceRWClient- Returns:
- full synch info
-
addView
public boolean addView(org.bedework.calfacade.svc.BwView val, boolean makeDefault) Description copied from interface:RWClientAdd a view. -
addViewCollection
Description copied from interface:RWClientAdd a collection path to the named view.- Specified by:
addViewCollectionin interfaceRWClient- Parameters:
name- String view name - null means defaultpath- collection path to add- Returns:
- boolean false view not found, true - collection path added.
-
removeViewCollection
Description copied from interface:RWClientRemove a collection path from the named view.- Specified by:
removeViewCollectionin interfaceRWClient- Parameters:
name- String view name - null means defaultpath- collection path to remove- Returns:
- boolean false view not found, true - collection path removed.
-
removeView
public boolean removeView(org.bedework.calfacade.svc.BwView val) Description copied from interface:RWClientRemove the view for the owner of the object.- Specified by:
removeViewin interfaceRWClient- Parameters:
val- BwView- Returns:
- boolean false - view not found.
-
moveContents
public void moveContents(org.bedework.calfacade.BwCalendar cal, org.bedework.calfacade.BwCalendar newCal) Description copied from interface:RWClientMove the contents of one collection to another- Specified by:
moveContentsin interfaceRWClient- Parameters:
cal- where fromnewCal- where to
-
postMessage
public void postMessage(org.bedework.calfacade.mail.Message val) - Specified by:
postMessagein interfaceRWClient- Parameters:
val- mail message
-
validateFilter
Description copied from interface:RWClientValidate a filter definition.- Specified by:
validateFilterin interfaceRWClient- Parameters:
val- String xml filter definition
-
addFilter
public void addFilter(org.bedework.calfacade.BwFilterDef val) Description copied from interface:RWClientValidate and persist a new filter definition -
deleteFilter
Description copied from interface:RWClientDelete a filter given the name- Specified by:
deleteFilterin interfaceRWClient- Parameters:
name- String name of filter
-
getDefaultFilterContext
protected org.bedework.caldav.util.filter.FilterBase getDefaultFilterContext()- Overrides:
getDefaultFilterContextin classROClientImpl
-