[Bedework-commit] caldav r326 - in trunk:
boeingexchange/src/edu/rpi/cct/bedework/caldav/exchange
bwcaldav/src/org/bedework/caldav/bwserver
domino/src/edu/rpi/cct/bedework/caldav/domino
google/src/edu/rpi/cct/bedework/caldav/google
server/src/org/bedework/caldav/server
svnadmin at bedework.org
svnadmin at bedework.org
Sun Feb 22 00:21:36 EST 2009
Author: douglm
Date: 2009-02-22 00:21:32 -0500 (Sun, 22 Feb 2009)
New Revision: 326
Modified:
trunk/boeingexchange/src/edu/rpi/cct/bedework/caldav/exchange/BexchangeSysIntfImpl.java
trunk/bwcaldav/src/org/bedework/caldav/bwserver/BwSysIntfImpl.java
trunk/domino/src/edu/rpi/cct/bedework/caldav/domino/DominoSysIntfImpl.java
trunk/google/src/edu/rpi/cct/bedework/caldav/google/GoogleSysIntfImpl.java
trunk/server/src/org/bedework/caldav/server/CaldavBWIntf.java
trunk/server/src/org/bedework/caldav/server/SysIntf.java
Log:
Second installment of major schema update.
This one replaces foreign keys for collections with a path. Collections are cached during the transaction so should only be fetched once per transaction rather than part of each event and collection object.
Modified: trunk/boeingexchange/src/edu/rpi/cct/bedework/caldav/exchange/BexchangeSysIntfImpl.java
===================================================================
--- trunk/boeingexchange/src/edu/rpi/cct/bedework/caldav/exchange/BexchangeSysIntfImpl.java 2009-02-20 14:59:24 UTC (rev 325)
+++ trunk/boeingexchange/src/edu/rpi/cct/bedework/caldav/exchange/BexchangeSysIntfImpl.java 2009-02-22 05:21:32 UTC (rev 326)
@@ -399,8 +399,7 @@
* Events
* ==================================================================== */
- public Collection<BwEventProxy> addEvent(BwCalendar cal,
- EventInfo ei,
+ public Collection<BwEventProxy> addEvent(EventInfo ei,
boolean noInvites,
boolean rollbackOnError) throws WebdavException {
throw new WebdavException("unimplemented");
Modified: trunk/bwcaldav/src/org/bedework/caldav/bwserver/BwSysIntfImpl.java
===================================================================
--- trunk/bwcaldav/src/org/bedework/caldav/bwserver/BwSysIntfImpl.java 2009-02-20 14:59:24 UTC (rev 325)
+++ trunk/bwcaldav/src/org/bedework/caldav/bwserver/BwSysIntfImpl.java 2009-02-22 05:21:32 UTC (rev 326)
@@ -484,16 +484,15 @@
* ==================================================================== */
/* (non-Javadoc)
- * @see org.bedework.caldav.server.SysIntf#addEvent(org.bedework.calfacade.BwCalendar, org.bedework.calfacade.svc.EventInfo, boolean, boolean)
+ * @see org.bedework.caldav.server.SysIntf#addEvent(org.bedework.calfacade.svc.EventInfo, boolean, boolean)
*/
- public Collection<BwEventProxy> addEvent(BwCalendar cal,
- EventInfo ei,
+ public Collection<BwEventProxy> addEvent(EventInfo ei,
boolean noInvites,
boolean rollbackOnError) throws WebdavException {
try {
/* Is the event a scheduling object? */
- return getSvci().getEventsHandler().add(cal, ei, noInvites,
+ return getSvci().getEventsHandler().add(ei, noInvites,
false, // scheduling - inbox
rollbackOnError).failedOverrides;
} catch (CalFacadeAccessException cfae) {
@@ -551,7 +550,7 @@
RecurringRetrievalMode recurRetrieval)
throws WebdavException {
try {
- return getSvci().getEventsHandler().get(cal, val, recurRetrieval);
+ return getSvci().getEventsHandler().get(cal.getPath(), val, recurRetrieval);
} catch (Throwable t) {
throw new WebdavException(t);
}
@@ -704,11 +703,11 @@
/* Move the from collection to the new location "to".
* If the parent calendar is the same in both cases, this is just a rename.
*/
- if ((from.getCalendar() == null) || (to.getCalendar() == null)) {
+ if ((from.getColPath() == null) || (to.getColPath() == null)) {
throw new WebdavForbidden("Cannot move root");
}
- if (from.getCalendar().equals(to.getCalendar())) {
+ if (from.getColPath().equals(to.getColPath())) {
// Rename
getSvci().getCalendarsHandler().rename(from, to.getName());
return;
@@ -918,7 +917,7 @@
*/
public void deleteFile(BwResource val) throws WebdavException {
try {
- getSvci().getResourcesHandler().delete(val.getCalendar().getPath() + "/" +
+ getSvci().getResourcesHandler().delete(val.getColPath() + "/" +
val.getName());
} catch (CalFacadeAccessException cfae) {
throw new WebdavForbidden();
Modified: trunk/domino/src/edu/rpi/cct/bedework/caldav/domino/DominoSysIntfImpl.java
===================================================================
--- trunk/domino/src/edu/rpi/cct/bedework/caldav/domino/DominoSysIntfImpl.java 2009-02-20 14:59:24 UTC (rev 325)
+++ trunk/domino/src/edu/rpi/cct/bedework/caldav/domino/DominoSysIntfImpl.java 2009-02-22 05:21:32 UTC (rev 326)
@@ -404,8 +404,7 @@
* Events
* ==================================================================== */
- public Collection<BwEventProxy> addEvent(BwCalendar cal,
- EventInfo ei,
+ public Collection<BwEventProxy> addEvent(EventInfo ei,
boolean noInvites,
boolean rollbackOnError) throws WebdavException {
throw new WebdavException("unimplemented");
Modified: trunk/google/src/edu/rpi/cct/bedework/caldav/google/GoogleSysIntfImpl.java
===================================================================
--- trunk/google/src/edu/rpi/cct/bedework/caldav/google/GoogleSysIntfImpl.java 2009-02-20 14:59:24 UTC (rev 325)
+++ trunk/google/src/edu/rpi/cct/bedework/caldav/google/GoogleSysIntfImpl.java 2009-02-22 05:21:32 UTC (rev 326)
@@ -324,8 +324,7 @@
* Events
* ==================================================================== */
- public Collection<BwEventProxy> addEvent(BwCalendar cal,
- EventInfo ei,
+ public Collection<BwEventProxy> addEvent(EventInfo ei,
boolean noInvites,
boolean rollbackOnError) throws WebdavException {
throw new WebdavException("unimplemented");
Modified: trunk/server/src/org/bedework/caldav/server/CaldavBWIntf.java
===================================================================
--- trunk/server/src/org/bedework/caldav/server/CaldavBWIntf.java 2009-02-20 14:59:24 UTC (rev 325)
+++ trunk/server/src/org/bedework/caldav/server/CaldavBWIntf.java 2009-02-22 05:21:32 UTC (rev 326)
@@ -866,6 +866,8 @@
BwCalendar cal = bwnode.getCollection(true); // deref
boolean created = false;
+ ev.setCalendar(cal);
+
if (debug) {
debugMsg("putContent: intf has event with name " + entityName +
" and summary " + ev.getSummary() +
@@ -879,7 +881,7 @@
boolean noInvites = false; // based on header?
/* Collection<BwEventProxy>failedOverrides = */
- sysi.addEvent(cal, evinfo, noInvites, true);
+ sysi.addEvent(evinfo, noInvites, true);
/*StringBuffer sb = new StringBuffer(cdUri.getPath());
sb.append("/");
Modified: trunk/server/src/org/bedework/caldav/server/SysIntf.java
===================================================================
--- trunk/server/src/org/bedework/caldav/server/SysIntf.java 2009-02-20 14:59:24 UTC (rev 325)
+++ trunk/server/src/org/bedework/caldav/server/SysIntf.java 2009-02-22 05:21:32 UTC (rev 326)
@@ -316,15 +316,13 @@
* determined by examining the organizer and attendee properties, we will send
* out invitations to the attendees, unless the noInvites flag is set.
*
- * @param cal BwCalendar defining recipient calendar
* @param ei EventInfo object + overrides to be added
* @param noInvites Set from request - if true don't send invites
* @param rollbackOnError true if we rollback and throw an exception on error
* @return Collection of overrides which did not match or null if all matched
* @throws WebdavException
*/
- public Collection<BwEventProxy> addEvent(BwCalendar cal,
- EventInfo ei,
+ public Collection<BwEventProxy> addEvent(EventInfo ei,
boolean noInvites,
boolean rollbackOnError) throws WebdavException;
More information about the Bedework-commit
mailing list