[Bedework-commit] webapps r1219 - in trunk:
appcommon/src/org/bedework/appcommon
webcommon/src/org/bedework/webcommon/event
webconfig/src/org/bedework/webconfig
svnadmin at bedework.org
svnadmin at bedework.org
Wed Sep 15 11:05:06 EDT 2010
Author: douglm
Date: 2010-09-15 11:05:05 -0400 (Wed, 15 Sep 2010)
New Revision: 1219
Modified:
trunk/appcommon/src/org/bedework/appcommon/AccessXmlUtil.java
trunk/webcommon/src/org/bedework/webcommon/event/UpdateEventAction.java
trunk/webconfig/src/org/bedework/webconfig/SaveAction.java
Log:
Pay some attention to the ACCEPT values or the data type in the calendar-data element. Allow for different default content-types for caldav and web service.
Implement generation of XML and produce that when appropriate
Modified: trunk/appcommon/src/org/bedework/appcommon/AccessXmlUtil.java
===================================================================
--- trunk/appcommon/src/org/bedework/appcommon/AccessXmlUtil.java 2010-08-30 14:20:35 UTC (rev 1218)
+++ trunk/appcommon/src/org/bedework/appcommon/AccessXmlUtil.java 2010-09-15 15:05:05 UTC (rev 1219)
@@ -171,7 +171,7 @@
try {
char[] privileges = ps.getPrivileges();
- XmlEmit xml = new XmlEmit(true, false); // no headers
+ XmlEmit xml = new XmlEmit(true); // no headers
StringWriter su = new StringWriter();
xml.startEmit(su);
emitCurrentPrivSet(xml, caldavPrivTags, privileges);
Modified: trunk/webcommon/src/org/bedework/webcommon/event/UpdateEventAction.java
===================================================================
--- trunk/webcommon/src/org/bedework/webcommon/event/UpdateEventAction.java 2010-08-30 14:20:35 UTC (rev 1218)
+++ trunk/webcommon/src/org/bedework/webcommon/event/UpdateEventAction.java 2010-09-15 15:05:05 UTC (rev 1219)
@@ -214,24 +214,24 @@
}
ev.setRecurring(ev.isRecurringEntity());
- } else {
+ } else if (ev.getRecurring() == null) {
+ // Adding non-recurring
+ ev.setRecurring(false);
+ } else if (ev.testRecurring()) {
// Turned recurring off
+ /* Clear out any recurrence info */
- if (ev.testRecurring()) {
- /* Clear out any recurrence info */
+ Collection<String> rrules = ev.getRrules();
- Collection<String> rrules = ev.getRrules();
+ if (!Util.isEmpty(rrules)) {
+ cte = changes.getEntry(PropertyInfoIndex.RRULE);
+ cte.changed = true;
+ cte.setRemovedValues(new ArrayList<String>(rrules));
- if (!Util.isEmpty(rrules)) {
- cte = changes.getEntry(PropertyInfoIndex.RRULE);
- cte.changed = true;
- cte.setRemovedValues(new ArrayList<String>(rrules));
+ rrules.clear();
+ }
- rrules.clear();
- }
-
- // Rdates and exdates should get handled below
- }
+ // Rdates and exdates should get handled below
//ev.setRecurring(false);
}
Modified: trunk/webconfig/src/org/bedework/webconfig/SaveAction.java
===================================================================
--- trunk/webconfig/src/org/bedework/webconfig/SaveAction.java 2010-08-30 14:20:35 UTC (rev 1218)
+++ trunk/webconfig/src/org/bedework/webconfig/SaveAction.java 2010-09-15 15:05:05 UTC (rev 1219)
@@ -39,12 +39,14 @@
* @author Mike Douglass
*/
public class SaveAction extends AbstractAction {
+ @Override
public String getId() {
return getClass().getName();
}
- public String doAction(Request request,
- ActionForm form) throws Throwable {
+ @Override
+ public String doAction(final Request request,
+ final ActionForm form) throws Throwable {
String configName = request.getReqPar("config");
if (configName == null) {
return "success";
@@ -66,7 +68,7 @@
debugMsg(sw.toString());
sw = new StringWriter();
- XmlEmit xml = new XmlEmit(true, true);
+ XmlEmit xml = new XmlEmit();
xml.startEmit(sw);
config.emitOption(xml);
More information about the Bedework-commit
mailing list