Interface SysIntf

All Superinterfaces:
org.bedework.webdav.servlet.shared.WdSysIntf

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, task 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
  • Method Details

    • init

      java.lang.String init​(javax.servlet.http.HttpServletRequest req, java.lang.String account, boolean service, boolean calWs, boolean synchWs, boolean notifyWs, boolean socketWs, java.lang.String opaqueData) throws org.bedework.webdav.servlet.shared.WebdavException
      Called before any other method is called to allow initialization to take place at the first or subsequent requests
      Parameters:
      req - the http servlet request
      account - - possible account
      service - - true if this is a service call - e.g. iSchedule - rather than a real user.
      calWs - true if this is a CalWs-SOAP service
      synchWs - true if this is a SynchWs-SOAP service
      notifyWs - true if this is a notification service
      socketWs - true if this is a service for the websockets proxy
      opaqueData - possibly from headers etc.
      Returns:
      the account which may have changed
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • testMode

      boolean testMode()
      Allows some special handling of some requests - mostly to do with cleanup of accounts when testing.
      Returns:
      true for test mode.
    • bedeworkExtensionsEnabled

      boolean bedeworkExtensionsEnabled()
      true if bedework extensions are enabled for the request. Client has sent a header "X-BEDEWORK-EXTENSIONS: TRUE".

      Current extensions

      • Extra elements in notifications

      Returns:
      true for extensions enabled.
    • getAuthProperties

      CalDAVAuthProperties getAuthProperties()
      Return CalDAV properties relevant to authentication state.
      Returns:
      CalDAVAuthProperties object - never null.
    • getSystemProperties

      CalDAVSystemProperties getSystemProperties()
      Return CalDAV relevant properties about the system.
      Returns:
      CalDAVSystemProperties object - never null.
    • getPrincipal

      org.bedework.access.AccessPrincipal getPrincipal()
      Return the current principal
      Returns:
      String
    • getPropertyHandler

      PropertyHandler getPropertyHandler​(PropertyHandler.PropertyType ptype)
      Get a property handler
      Parameters:
      ptype -
      Returns:
      PropertyHandler
    • getUrlHandler

      org.bedework.webdav.servlet.shared.UrlHandler getUrlHandler()
      Specified by:
      getUrlHandler in interface org.bedework.webdav.servlet.shared.WdSysIntf
      Returns:
      UrlHandler object to manipulate urls.
    • isPrincipal

      boolean isPrincipal​(java.lang.String val) throws org.bedework.webdav.servlet.shared.WebdavException
      Does the value appear to represent a valid principal?
      Parameters:
      val -
      Returns:
      true if it's a (possible) principal
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • getPrincipalForUser

      org.bedework.access.AccessPrincipal getPrincipalForUser​(java.lang.String account) throws org.bedework.webdav.servlet.shared.WebdavException
      Return principal information for the given account.
      Parameters:
      account -
      Returns:
      PrincipalInfo
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • getPrincipal

      org.bedework.access.AccessPrincipal getPrincipal​(java.lang.String href) throws org.bedework.webdav.servlet.shared.WebdavException
      Return principal information for the given href. Also tests for a valid principal.
      Parameters:
      href -
      Returns:
      PrincipalInfo
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • getPublicKey

      byte[] getPublicKey​(java.lang.String domain, java.lang.String service) throws org.bedework.webdav.servlet.shared.WebdavException
      Returns a public key for the given domain and service - either or both of which may be null.

      This allows us to have different keys for communication with different domains and for different services. At its simplest, both are ignored and a single key (pair) is used to secure all communications.

      This is used, for example, by iSchedule for DKIM verification.

      In keeping with the DKIM approach,

      • if there are no keys an empty object is returned.
      • To refuse keys for a domain/service return null.
      Parameters:
      domain -
      service -
      Returns:
      key, empty key object or null.
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • makeHref

      java.lang.String makeHref​(java.lang.String id, int whoType)
      Parameters:
      id -
      whoType - - from WhoDefs
      Returns:
      String href
    • getGroups

      java.util.Collection<java.lang.String> getGroups​(java.lang.String rootUrl, java.lang.String principalUrl) throws org.bedework.webdav.servlet.shared.WebdavException
      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
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • caladdrToPrincipal

      org.bedework.access.AccessPrincipal caladdrToPrincipal​(java.lang.String caladdr)
      Given a calendar address return the associated calendar account. For example, we might have a calendar address
      auser@ahost.org
      with the associated account of
      auser.

      Whereever we need a user account use the converted value. Call userToCaladdr for the inverse.

      Parameters:
      caladdr - calendar address
      Returns:
      AccessPrincipal or null if not caladdr for this system
    • principalToCaladdr

      java.lang.String principalToCaladdr​(org.bedework.access.AccessPrincipal principal) throws org.bedework.webdav.servlet.shared.WebdavException
      The inverse of caladdrToPrincipal
      Parameters:
      principal -
      Returns:
      String calendar user address
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • getCalPrincipalInfo

      CalPrincipalInfo getCalPrincipalInfo​(org.bedework.access.AccessPrincipal principal)
      Given a valid AccessPrincipal return the associated calendar user information needed for caldav interactions.
      Parameters:
      principal - valid AccessPrincipal
      Returns:
      CalUserInfo or null if not caladdr for this system
      Throws:
      java.lang.RuntimeException - for errors
    • getPrincipalCollectionSet

      java.util.Collection<java.lang.String> getPrincipalCollectionSet​(java.lang.String resourceUri) throws org.bedework.webdav.servlet.shared.WebdavException
      Given a uri returns a Collection of uris that allow search operations on principals for that resource.
      Parameters:
      resourceUri -
      Returns:
      Collection of String
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • getPrincipals

      java.util.Collection<CalPrincipalInfo> getPrincipals​(java.lang.String resourceUri, org.bedework.webdav.servlet.shared.PrincipalPropertySearch pps) throws org.bedework.webdav.servlet.shared.WebdavException
      Given a PrincipalPropertySearch returns a Collection of matching principals.
      Parameters:
      resourceUri -
      pps - Collection of PrincipalPropertySearch
      Returns:
      Collection of CalUserInfo
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException - on fatal error
    • validPrincipal

      boolean validPrincipal​(java.lang.String href) throws org.bedework.webdav.servlet.shared.WebdavException
      Is href a valid principal?
      Parameters:
      href -
      Returns:
      boolean true for a valid user
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException - for errors
    • subscribeNotification

      boolean subscribeNotification​(java.lang.String principalHref, java.lang.String action, java.util.List<java.lang.String> emails) throws org.bedework.webdav.servlet.shared.WebdavException
      Subscribe for email notifications to the notification engine for the indicated calendar user.
      Parameters:
      principalHref - the subscriber
      action - "add"/"remove"
      emails - addresses to add or remove
      Returns:
      false for not done
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • sendNotification

      boolean sendNotification​(java.lang.String href, NotificationType val) throws org.bedework.webdav.servlet.shared.WebdavException
      Add the given notification to the notification collection for the indicated calendar user.
      Parameters:
      href -
      val -
      Returns:
      false for unknown CU
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • removeNotification

      void removeNotification​(java.lang.String href, NotificationType val) throws org.bedework.webdav.servlet.shared.WebdavException
      Remove the given notification from the notification collection for the indicated calendar user.
      Parameters:
      href -
      val -
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • getNotifications

      java.util.List<NotificationType> getNotifications() throws org.bedework.webdav.servlet.shared.WebdavException
      Returns:
      notifications for this user
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • getNotifications

      java.util.List<NotificationType> getNotifications​(java.lang.String href, javax.xml.namespace.QName type) throws org.bedework.webdav.servlet.shared.WebdavException
      Parameters:
      href - of principal
      type - of notification (null for all)
      Returns:
      notifications for the given principal of the given type
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • share

      ShareResultType share​(CalDAVCollection<?> col, ShareType share) throws org.bedework.webdav.servlet.shared.WebdavException
      Parameters:
      col - MUST be a sharable collection
      share - is the request
      Returns:
      list of ok and !ok sharees
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • sharingReply

      java.lang.String sharingReply​(CalDAVCollection<?> col, InviteReplyType reply) throws org.bedework.webdav.servlet.shared.WebdavException
      Handle a reply to a sharing notification.
      Parameters:
      col - - unchecked sharees calendar home
      reply - - the reply to the invitation with the path reset to be the relative path.
      Returns:
      null for unknown sharer or no invitation otherwise the path to the new alias in the sharees calendar home.
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • getInviteStatus

      InviteType getInviteStatus​(CalDAVCollection<?> col) throws org.bedework.webdav.servlet.shared.WebdavException
      Parameters:
      col -
      Returns:
      current invitations
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • getFreebusySet

      java.util.Collection<java.lang.String> getFreebusySet() throws org.bedework.webdav.servlet.shared.WebdavException
      Return a set of hrefs for each resource affecting this users freebusy
      Returns:
      Collection of hrefs
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException - for errors
    • schedule

      java.util.Collection<SysIntf.SchedRecipientResult> schedule​(CalDAVEvent<?> ev) throws org.bedework.webdav.servlet.shared.WebdavException
      Request to schedule a meeting. The event object must have the organizer and attendees and possibly recipients set. If no recipients are set, they will be set from the attendees.

      The functioning of this method must conform to the requirements of iTip. The event object must have the required method (publish, request etc) set.

      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 mail.

      Parameters:
      ev - Event object
      Returns:
      ScheduleResult
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • addEvent

      java.util.Collection<CalDAVEvent<?>> addEvent​(CalDAVEvent<?> ev, boolean noInvites, boolean rollbackOnError) throws org.bedework.webdav.servlet.shared.WebdavException
      Add an event/task/journal. If this is a scheduling event we are adding, determined by examining the organizer and attendee properties, we will send out invitations to the attendees, unless the noInvites flag is set.
      Parameters:
      ev - CalDAVEvent object
      noInvites - Set from request - if true don't send invites
      rollbackOnError - true if we rollback and throw an exception on error
      Returns:
      Collection of overrides which did not match or null if all matched
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • reindexEvent

      void reindexEvent​(CalDAVEvent<?> event)
      Reindex an event after an error that may be the result of an out of date index.
      Parameters:
      event - a CalDAVEvent object
    • updateEvent

      void updateEvent​(CalDAVEvent<?> event) throws org.bedework.webdav.servlet.shared.WebdavException
      Update an event/todo/journal.
      Parameters:
      event - updated CalDAVEvent object
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • updateEvent

      SysIntf.UpdateResult updateEvent​(CalDAVEvent<?> event, java.util.List<org.oasis_open.docs.ws_calendar.ns.soap.ComponentSelectionType> updates) throws org.bedework.webdav.servlet.shared.WebdavException
      Update the supplied event using the web services update message.
      Parameters:
      event - updated CalDAVEvent object
      updates - set of updates to be applied
      Returns:
      UpdateResult
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • getEvents

      java.util.Collection<CalDAVEvent<?>> getEvents​(CalDAVCollection<?> col, FilterBase filter, java.util.List<java.lang.String> retrieveList, RetrievalMode recurRetrieval) throws org.bedework.webdav.servlet.shared.WebdavException
      Return the events for the current user in the given collection using the supplied filter. Stored freebusy objects are returned as BwEvent objects with the appropriate entity type. If retrieveList is supplied only those fields (and a few required fields) will be returned.

      We flag the desired entity types.

      Parameters:
      col -
      filter - - if non-null defines a search filter
      retrieveList - List of properties to retrieve or null for a full event.
      recurRetrieval - How recurring event is returned.
      Returns:
      Collection populated event value objects
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • getEvent

      CalDAVEvent<?> getEvent​(CalDAVCollection<?> col, java.lang.String val) throws org.bedework.webdav.servlet.shared.WebdavException
      Get events given the collection and String name. Return null for not found. There should be only one event or none. For recurring, the overrides and possibly the instances will be attached.
      Parameters:
      col - CalDAVCollection object
      val - String possible name
      Returns:
      CalDAVEvent or null
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • deleteEvent

      void deleteEvent​(CalDAVEvent<?> ev, boolean scheduleReply) throws org.bedework.webdav.servlet.shared.WebdavException
      Parameters:
      ev -
      scheduleReply - - true if we want a schduling reply posted
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • requestFreeBusy

      java.util.Collection<SysIntf.SchedRecipientResult> requestFreeBusy​(CalDAVEvent<?> val, boolean iSchedule) throws org.bedework.webdav.servlet.shared.WebdavException
      Get the free busy for one or more principals based on the given VFREEBUSY request.
      Parameters:
      val - A representation of a scheduling freebusy request to be acted upon.
      iSchedule - true if this is from an ischedule request
      Returns:
      ScheduleResult
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • getSpecialFreeBusy

      void getSpecialFreeBusy​(java.lang.String cua, java.util.Set<java.lang.String> recipients, java.lang.String originator, TimeRange tr, java.io.Writer wtr) throws org.bedework.webdav.servlet.shared.WebdavException
      Handle the special freebusy resquests, i.e. non-CalDAV
      Parameters:
      cua -
      originator - value of the Originator header
      recipients - values of Recipient headers
      tr -
      wtr -
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • getFreeBusy

      CalDAVEvent<?> getFreeBusy​(CalDAVCollection<?> col, int depth, TimeRange timeRange) throws org.bedework.webdav.servlet.shared.WebdavException
      Generate a free busy object for the given time period which reflects the state of the given collection.
      Parameters:
      col -
      depth -
      timeRange -
      Returns:
      CalDAVEvent - as a freebusy entity
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • checkAccess

      org.bedework.access.CurrentAccess checkAccess​(org.bedework.webdav.servlet.shared.WdEntity<?> ent, int desiredAccess, boolean returnResult) throws org.bedework.webdav.servlet.shared.WebdavException
      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
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException - if returnResult false and no access
    • updateAccess

      void updateAccess​(CalDAVEvent<?> ev, org.bedework.access.Acl acl) throws org.bedework.webdav.servlet.shared.WebdavException
      Parameters:
      ev -
      acl -
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • copyMove

      boolean copyMove​(CalDAVEvent<?> from, CalDAVCollection<?> to, java.lang.String name, boolean copy, boolean overwrite) throws org.bedework.webdav.servlet.shared.WebdavException
      Copy or move the given entity to the destination collection with the given name. Status is set on return
      Parameters:
      from - Source entity
      to - Destination collection
      name - String name of new entity
      copy - true for copying
      overwrite - destination exists
      Returns:
      true if destination created (i.e. not updated)
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • newCollectionObject

      CalDAVCollection<?> newCollectionObject​(boolean isCalendarCollection, java.lang.String parentPath)
      Return a new object representing the parameters. No collection is created. makeCollection must be called subsequently with the object.
      Parameters:
      isCalendarCollection -
      parentPath -
      Returns:
      CalDAVCollection
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • updateAccess

      void updateAccess​(CalDAVCollection<?> col, org.bedework.access.Acl acl) throws org.bedework.webdav.servlet.shared.WebdavException
      Parameters:
      col -
      acl -
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException - on fatal error
    • makeCollection

      int makeCollection​(CalDAVCollection<?> col) throws org.bedework.webdav.servlet.shared.WebdavException
      Parameters:
      col - Initialised collection object
      Returns:
      int status
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException - on fatal error
    • copyMove

      void copyMove​(CalDAVCollection<?> from, CalDAVCollection<?> to, boolean copy, boolean overwrite) throws org.bedework.webdav.servlet.shared.WebdavException
      Copy or move the collection to another location. Status is set on return
      Parameters:
      from - Source collection
      to - Destination collection
      copy - true for copying
      overwrite - destination exists
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException - on fatal error
    • getCollection

      CalDAVCollection<?> getCollection​(java.lang.String path) throws org.bedework.webdav.servlet.shared.WebdavException
      Get a collection given the path
      Parameters:
      path - String path of collection
      Returns:
      CalDAVCollection null for unknown collection
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException - on fatal error
    • updateCollection

      void updateCollection​(CalDAVCollection<?> val) throws org.bedework.webdav.servlet.shared.WebdavException
      Update a collection.
      Parameters:
      val - updated CalDAVCollection object
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • deleteCollection

      void deleteCollection​(CalDAVCollection<?> col, boolean sendSchedulingMessage) throws org.bedework.webdav.servlet.shared.WebdavException
      Parameters:
      col - to delete
      sendSchedulingMessage - true if we should send cancels
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • getCollections

      java.util.Collection<CalDAVCollection<?>> getCollections​(CalDAVCollection<?> col) throws org.bedework.webdav.servlet.shared.WebdavException
      Returns children of the given collection to which the current user has some access.
      Parameters:
      col - parent collection
      Returns:
      Collection of CalDAVCollection
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • newResourceObject

      CalDAVResource<?> newResourceObject​(java.lang.String parentPath) throws org.bedework.webdav.servlet.shared.WebdavException
      Return a new object representing the parameters. No resource is created. putFile must be called subsequently with the object.
      Parameters:
      parentPath -
      Returns:
      CalDAVResource
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • putFile

      void putFile​(CalDAVCollection<?> coll, CalDAVResource<?> val) throws org.bedework.webdav.servlet.shared.WebdavException
      PUT a file.
      Parameters:
      coll - CalDAVCollection defining recipient collection
      val - CalDAVResource
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • getFile

      CalDAVResource<?> getFile​(CalDAVCollection<?> coll, java.lang.String name) throws org.bedework.webdav.servlet.shared.WebdavException
      GET a file.
      Parameters:
      coll - CalDAVCollection containing file
      name -
      Returns:
      CalDAVResource
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • getFileContent

      void getFileContent​(CalDAVResource<?> val)
      Get resource content given the resource. It will be set in the resource object
      Parameters:
      val - CalDAVResource
      Throws:
      java.lang.RuntimeException - on fatal error
    • getFiles

      java.util.Collection<CalDAVResource<?>> getFiles​(CalDAVCollection<?> coll) throws org.bedework.webdav.servlet.shared.WebdavException
      Get the files in a collection.
      Parameters:
      coll - CalDAVCollection containing file
      Returns:
      Collection of CalDAVResource
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • updateFile

      void updateFile​(CalDAVResource<?> val, boolean updateContent) throws org.bedework.webdav.servlet.shared.WebdavException
      Update a file.
      Parameters:
      val - CalDAVResource
      updateContent - if true we also update the content
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • deleteFile

      void deleteFile​(CalDAVResource<?> val) throws org.bedework.webdav.servlet.shared.WebdavException
      Delete a file.
      Parameters:
      val - CalDAVResource
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • copyMoveFile

      boolean copyMoveFile​(CalDAVResource<?> from, java.lang.String toPath, java.lang.String name, boolean copy, boolean overwrite) throws org.bedework.webdav.servlet.shared.WebdavException
      Copy or move the given file to the destination collection with the given name. Status is set on return
      Parameters:
      from - Source resource
      toPath - Destination collection path
      name - String name of new entity
      copy - true for copying
      overwrite - destination exists
      Returns:
      true if destination created (i.e. not updated)
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • getSyncToken

      java.lang.String getSyncToken​(CalDAVCollection<?> col) throws org.bedework.webdav.servlet.shared.WebdavException
      Parameters:
      col -
      Returns:
      A sync-token which must be a URI.
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • getSyncReport

      SysIntf.SynchReportData getSyncReport​(java.lang.String path, java.lang.String token, int limit, boolean recurse) throws org.bedework.webdav.servlet.shared.WebdavException
      Parameters:
      path -
      token -
      limit - - negative for no limit on result set size
      recurse -
      Returns:
      report
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • toCalendar

      net.fortuna.ical4j.model.Calendar toCalendar​(CalDAVEvent<?> ev, boolean incSchedMethod) throws org.bedework.webdav.servlet.shared.WebdavException
      Make an ical Calendar from an event.
      Parameters:
      ev -
      incSchedMethod - - true if we should emit the scheduling method
      Returns:
      Calendar
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • toIcalendar

      ietf.params.xml.ns.icalendar_2.IcalendarType toIcalendar​(CalDAVEvent<?> ev, boolean incSchedMethod, ietf.params.xml.ns.icalendar_2.IcalendarType pattern) throws org.bedework.webdav.servlet.shared.WebdavException
      Make an XML IcalendarType from an event.
      Parameters:
      ev -
      incSchedMethod - - true if we should emit the scheduling method
      pattern - - non-null to restrict returned properties
      Returns:
      IcalendarType
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • toJcal

      java.lang.String toJcal​(CalDAVEvent<?> ev, boolean incSchedMethod) throws org.bedework.webdav.servlet.shared.WebdavException
      Make a JSON jcal object from an event.
      Parameters:
      ev - event to convert
      incSchedMethod - - true if we should emit the scheduling method
      Returns:
      String jcal representation
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • toIcalString

      java.lang.String toIcalString​(net.fortuna.ical4j.model.Calendar cal, java.lang.String contentType) throws org.bedework.webdav.servlet.shared.WebdavException
      Convert a Calendar to it's string form
      Parameters:
      cal - Calendar to convert
      contentType -
      Returns:
      String representation
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • writeCalendar

      java.lang.String writeCalendar​(java.util.Collection<CalDAVEvent<?>> evs, SysIntf.MethodEmitted method, org.bedework.util.xml.XmlEmit xml, java.io.Writer wtr, java.lang.String contentType) throws org.bedework.webdav.servlet.shared.WebdavException
      Write a collection of events as an ical calendar.
      Parameters:
      evs -
      method - - what scheduling method?
      xml - - if this is embedded in an xml stream
      wtr - - if standalone output or no xml stream initialized.
      contentType - - requested type. null for default
      Returns:
      actual contentType written
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • fromIcal

      SysiIcalendar fromIcal​(CalDAVCollection<?> col, java.io.Reader rdr, java.lang.String contentType, SysIntf.IcalResultType rtype, boolean mergeAttendees) throws org.bedework.webdav.servlet.shared.WebdavException
      Convert the Icalendar reader to a Collection of Calendar objects
      Parameters:
      col - collection in which to place entities
      rdr -
      contentType - null for ICalendar or valid calendar mime type
      rtype -
      mergeAttendees - True if we should only update our own attendee.
      Returns:
      SysiIcalendar
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • fromIcal

      SysiIcalendar fromIcal​(CalDAVCollection<?> col, ietf.params.xml.ns.icalendar_2.IcalendarType ical, SysIntf.IcalResultType rtype) throws org.bedework.webdav.servlet.shared.WebdavException
      Convert the Icalendar object to a Collection of Calendar objects
      Parameters:
      col - collection in which to place entities
      ical -
      rtype -
      Returns:
      SysiIcalendar
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • toStringTzCalendar

      java.lang.String toStringTzCalendar​(java.lang.String tzid) throws org.bedework.webdav.servlet.shared.WebdavException
      Create a Calendar object from the named timezone and convert to a String representation
      Parameters:
      tzid - String timezone id
      Returns:
      String
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • tzidFromTzdef

      java.lang.String tzidFromTzdef​(java.lang.String val) throws org.bedework.webdav.servlet.shared.WebdavException
      Given a timezone spec return the tzid
      Parameters:
      val -
      Returns:
      String tzid or null for failure
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • validateAlarm

      boolean validateAlarm​(java.lang.String val) throws org.bedework.webdav.servlet.shared.WebdavException
      Validate an alarm component
      Parameters:
      val -
      Returns:
      boolean false for failure
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException
    • rollback

      void rollback()
      Called on the way out before close if there was an error.
    • close

      void close() throws org.bedework.webdav.servlet.shared.WebdavException
      End any transactions.
      Throws:
      org.bedework.webdav.servlet.shared.WebdavException