Added: 
openmeetings/application/trunk/openmeetings-service/src/main/java/org/apache/openmeetings/service/calendar/caldav/methods/SyncMethod.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-service/src/main/java/org/apache/openmeetings/service/calendar/caldav/methods/SyncMethod.java?rev=1763226&view=auto
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-service/src/main/java/org/apache/openmeetings/service/calendar/caldav/methods/SyncMethod.java
 (added)
+++ 
openmeetings/application/trunk/openmeetings-service/src/main/java/org/apache/openmeetings/service/calendar/caldav/methods/SyncMethod.java
 Tue Oct  4 04:03:01 2016
@@ -0,0 +1,150 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") +  you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openmeetings.service.calendar.caldav.methods;
+
+import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
+
+import java.io.IOException;
+
+import org.apache.commons.httpclient.HttpConnection;
+import org.apache.commons.httpclient.HttpState;
+import org.apache.jackrabbit.webdav.DavConstants;
+import org.apache.jackrabbit.webdav.DavException;
+import org.apache.jackrabbit.webdav.DavMethods;
+import org.apache.jackrabbit.webdav.DavServletResponse;
+import org.apache.jackrabbit.webdav.MultiStatus;
+import org.apache.jackrabbit.webdav.client.methods.DavMethodBase;
+import org.apache.jackrabbit.webdav.client.methods.ReportMethod;
+import org.apache.jackrabbit.webdav.header.DepthHeader;
+import org.apache.jackrabbit.webdav.xml.DomUtil;
+import org.red5.logging.Red5LoggerFactory;
+import org.slf4j.Logger;
+import org.w3c.dom.Document;
+
+/**
+ * Class to work with WebDAV-Sync Method defined in RFC 6578.
+ * 
+ * @see SyncReportInfo for Request Report to be given as argument
+ */
+public class SyncMethod extends DavMethodBase {
+       private static final Logger log = 
Red5LoggerFactory.getLogger(ReportMethod.class, webAppRootKey);
+
+       private MultiStatus multiStatus = null;
+       private String synctoken = null;
+
+       public SyncMethod(String uri, SyncReportInfo reportInfo) throws 
IOException {
+               super(uri);
+               setRequestBody(reportInfo);
+
+               if (reportInfo.getDepth() >= 0) {
+                       parseDepth(reportInfo.getDepth());
+               }
+
+               log.info("Using the WEBDAV-SYNC method for syncing.");
+       }
+
+       /**
+        * Used to add request header for Depth.
+        * 
+        * @param depth
+        *            Depth of the Request
+        */
+       private void parseDepth(int depth) {
+               addRequestHeader(new DepthHeader(depth));
+       }
+
+       /**
+        * Set the Depth Header of the Sync Report.
+        * 
+        * @param depth
+        *            Depth of the Request
+        */
+       public void setDepth(int depth) {
+               parseDepth(depth);
+       }
+
+       /**
+        * Implements the Report Method.
+        */
+       @Override
+       public String getName() {
+               return DavMethods.METHOD_REPORT;
+       }
+
+       /**
+        * @see DavMethodBase#isSuccess
+        * @return Return true only when when Response is Multistatus.
+        */
+       @Override
+       protected boolean isSuccess(int statusCode) {
+               return statusCode == DavServletResponse.SC_MULTI_STATUS;
+       }
+
+       public String getResponseSynctoken() {
+               checkUsed();
+               return synctoken;
+       }
+
+       /**
+        * Adapted from DavMethodBase to handle MultiStatus responses.
+        * 
+        * @return MultiStatus response
+        * @throws IOException
+        * @throws DavException
+        */
+       @Override
+       public MultiStatus getResponseBodyAsMultiStatus() throws IOException, 
DavException {
+               checkUsed();
+               if (multiStatus != null) {
+                       return multiStatus;
+               } else {
+                       DavException dx = getResponseException();
+                       if (dx != null) {
+                               throw dx;
+                       } else {
+                               throw new DavException(getStatusCode(), 
getName() + " resulted with unexpected status: " + getStatusLine());
+                       }
+               }
+       }
+
+       /**
+        * Overridden to process the sync-token. Adapted from DavMethodBase. 
TODO:
+        * Fix this override.
+        * 
+        * @see DavMethodBase#processResponseBody(HttpState, HttpConnection)
+        */
+       @Override
+       protected void processResponseBody(HttpState httpState, HttpConnection 
httpConnection) {
+               if (getStatusCode() == DavServletResponse.SC_MULTI_STATUS) {
+                       try {
+                               Document document = getResponseBodyAsDocument();
+                               if (document != null) {
+                                       synctoken = 
DomUtil.getChildText(document.getDocumentElement(), 
SyncReportInfo.XML_SYNC_TOKEN, DavConstants.NAMESPACE);
+                                       log.info("Sync-Token for REPORT: " + 
synctoken);
+
+                                       multiStatus = 
MultiStatus.createFromXml(document.getDocumentElement());
+                                       processMultiStatusBody(multiStatus, 
httpState, httpConnection);
+                               }
+                       } catch (IOException e) {
+                               log.error("Error while parsing sync-token.", e);
+                               setSuccess(false);
+                       }
+               }
+       }
+}

Added: 
openmeetings/application/trunk/openmeetings-service/src/main/java/org/apache/openmeetings/service/calendar/caldav/methods/SyncReportInfo.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-service/src/main/java/org/apache/openmeetings/service/calendar/caldav/methods/SyncReportInfo.java?rev=1763226&view=auto
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-service/src/main/java/org/apache/openmeetings/service/calendar/caldav/methods/SyncReportInfo.java
 (added)
+++ 
openmeetings/application/trunk/openmeetings-service/src/main/java/org/apache/openmeetings/service/calendar/caldav/methods/SyncReportInfo.java
 Tue Oct  4 04:03:01 2016
@@ -0,0 +1,160 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") +  you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openmeetings.service.calendar.caldav.methods;
+
+import org.apache.jackrabbit.webdav.DavConstants;
+import org.apache.jackrabbit.webdav.property.DavPropertyName;
+import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
+import org.apache.jackrabbit.webdav.xml.DomUtil;
+import org.apache.jackrabbit.webdav.xml.Namespace;
+import org.apache.jackrabbit.webdav.xml.XmlSerializable;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Used to represent a Sync Report, defined in RFC 6578. Taken from RFC 6578 
are
+ * the following XML definitions <br/>
+ * <br/>
+ * <code>
+ * &lt;!ELEMENT sync-collection (sync-token, sync-level, limit?, prop)&gt;
+ * <br/><br/>
+ * &lt;!ELEMENT sync-token #PCDATA&gt; <br/>
+ * &lt;!-- Text MUST be a valid URI --&gt;
+ * <br/><br/>
+ * &lt;!ELEMENT sync-level CDATA&gt; <br/>
+ * &lt;!-- Text MUST be either "1" or "infinite" --&gt;
+ * </code>
+ *
+ * @see SyncMethod
+ */
+public class SyncReportInfo implements XmlSerializable {
+       public static final String XML_SYNC_COLLECTION = "sync-collection";
+       public static final String XML_SYNC_TOKEN = "sync-token";
+       public static final String XML_SYNC_LEVEL = "sync-level";
+       public static final String XML_LIMIT = "limit";
+       public static final String XML_NRESULTS = "nresults";
+       public static final Namespace NAMESPACE = DavConstants.NAMESPACE;
+
+       public static final int SYNC_LEVEL_1 = 1;
+       public static final int SYNC_LEVEL_INF = Integer.MAX_VALUE;
+
+       private String syncToken = null;
+       private int syncLevel = SYNC_LEVEL_1;
+       private DavPropertyNameSet properties = new DavPropertyNameSet();
+       private int depth = -1;
+       private int limit = Integer.MIN_VALUE;
+
+       public SyncReportInfo() {
+       }
+
+       public SyncReportInfo(String syncToken, DavPropertyNameSet properties, 
int syncLevel) {
+               this.syncToken = syncToken;
+               this.properties.addAll(properties);
+               this.syncLevel = syncLevel;
+       }
+
+       public SyncReportInfo(String syncToken, DavPropertyNameSet properties, 
int syncLevel, int depth) {
+               this(syncToken, properties, syncLevel);
+               this.depth = depth;
+       }
+
+       public SyncReportInfo(String syncToken, DavPropertyNameSet properties, 
int syncLevel, int limit, int depth) {
+               this(syncToken, properties, syncLevel, depth);
+               this.limit = limit;
+       }
+
+       // Getters+setters
+       public void setSyncToken(String syncToken) {
+               this.syncToken = syncToken;
+       }
+
+       public String getSyncToken() {
+               return syncToken;
+       }
+
+       public void addProperty(String name, Namespace namespace) {
+               this.addProperty(DavPropertyName.create(name, namespace));
+       }
+
+       public void addProperty(DavPropertyName name) {
+               properties.add(name);
+       }
+
+       public void addProperties(DavPropertyNameSet set) {
+               properties.addAll(set);
+       }
+
+       public DavPropertyNameSet getProperties() {
+               return properties;
+       }
+
+       public void setProperties(DavPropertyNameSet properties) {
+               this.properties = properties;
+       }
+
+       public int getDepth() {
+               return depth;
+       }
+
+       public void setDepth(int depth) {
+               this.depth = depth;
+       }
+
+       public void setSyncLevel(int syncLevel) {
+               this.syncLevel = syncLevel;
+       }
+
+       public int getSyncLevel() {
+               return syncLevel;
+       }
+
+       public void setLimit(int limit) {
+               this.limit = limit;
+       }
+
+       public int getLimit() {
+               return limit;
+       }
+
+       /**
+        * @see XmlSerializable#toXml(Document)
+        * @param document
+        * @return
+        */
+       @Override
+       public Element toXml(Document document) {
+               Element syncCollection = DomUtil.createElement(document, 
XML_SYNC_COLLECTION, NAMESPACE);
+
+               DomUtil.addChildElement(syncCollection, XML_SYNC_TOKEN, 
NAMESPACE, syncToken);
+
+               if (limit > 0) {
+                       Element limit = DomUtil.addChildElement(syncCollection, 
XML_LIMIT, NAMESPACE);
+                       DomUtil.addChildElement(limit, XML_NRESULTS, NAMESPACE, 
Integer.toString(this.limit));
+               }
+
+               DomUtil.addChildElement(syncCollection, XML_SYNC_LEVEL, 
NAMESPACE,
+                               (syncLevel == SYNC_LEVEL_INF) ? "infinity" : 
"1");
+
+               if (properties != null && !properties.isEmpty()) {
+                       syncCollection.appendChild(properties.toXml(document));
+               }
+
+               return syncCollection;
+       }
+}

Modified: 
openmeetings/application/trunk/openmeetings-util/src/main/java/org/apache/openmeetings/util/mail/IcalHandler.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-util/src/main/java/org/apache/openmeetings/util/mail/IcalHandler.java?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-util/src/main/java/org/apache/openmeetings/util/mail/IcalHandler.java
 (original)
+++ 
openmeetings/application/trunk/openmeetings-util/src/main/java/org/apache/openmeetings/util/mail/IcalHandler.java
 Tue Oct  4 04:03:01 2016
@@ -26,8 +26,12 @@ import java.net.URI;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.UUID;
 import java.util.Vector;
 
+import org.red5.logging.Red5LoggerFactory;
+import org.slf4j.Logger;
+
 import net.fortuna.ical4j.data.CalendarOutputter;
 import net.fortuna.ical4j.model.Calendar;
 import net.fortuna.ical4j.model.DateTime;
@@ -48,10 +52,6 @@ import net.fortuna.ical4j.model.property
 import net.fortuna.ical4j.model.property.Transp;
 import net.fortuna.ical4j.model.property.Uid;
 import net.fortuna.ical4j.model.property.Version;
-import net.fortuna.ical4j.util.UidGenerator;
-
-import org.red5.logging.Red5LoggerFactory;
-import org.slf4j.Logger;
 
 /**
  * 
@@ -136,7 +136,7 @@ public class IcalHandler {
                // generate unique identifier (if not submitted)
                Uid ui = null;
                if (uid == null || uid.length() < 1) {
-                       ui = new UidGenerator("uidGen").generateUid();
+                       ui = new Uid(UUID.randomUUID().toString());
                        log.debug("Generating Meeting UID : " + ui.getValue());
                } else {
                        ui = new Uid(uid);

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ar.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ar.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ar.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ar.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_bg.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_bg.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_bg.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_bg.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ca.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ca.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ca.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ca.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_cs.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_cs.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_cs.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_cs.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_da.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_da.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_da.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_da.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_de.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_de.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_de.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_de.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1964,4 +1964,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_el.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_el.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_el.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_el.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_es.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_es.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_es.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_es.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1948,4 +1948,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_fa.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_fa.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_fa.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_fa.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_fi.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_fi.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_fi.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_fi.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_fr.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_fr.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_fr.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_fr.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1920,4 +1920,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_gl.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_gl.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_gl.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_gl.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_hu.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_hu.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_hu.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_hu.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1942,4 +1942,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_id.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_id.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_id.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_id.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_it.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_it.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_it.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_it.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ja.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ja.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ja.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ja.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ko.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ko.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ko.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ko.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1956,4 +1956,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_nl.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_nl.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_nl.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_nl.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_pl.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_pl.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_pl.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_pl.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_pt.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_pt.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_pt.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_pt.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_pt_BR.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_pt_BR.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_pt_BR.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_pt_BR.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ru.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ru.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ru.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_ru.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1960,4 +1960,12 @@
        <entry key="save.success">Успешно сохранено</entry>
        <entry key="convert.errors.file">Во время обработки 
файла произошла ошибка</entry>
        <entry key="convert.errors.file.missing">Файл не 
найден</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_sk.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_sk.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_sk.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_sk.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_sv.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_sv.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_sv.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_sv.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_th.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_th.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_th.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_th.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_tr.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_tr.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_tr.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_tr.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_uk.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_uk.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_uk.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_uk.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1960,4 +1960,12 @@
        <entry key="network.test.upl.speed">Upload speed</entry>
        <entry key="access.denied.header">Access denied. You are not authorized 
to perform this action.</entry>
        <entry key="save.success">Saved successfully</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_zh_CN.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_zh_CN.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_zh_CN.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_zh_CN.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1924,4 +1924,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_zh_TW.properties.xml
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_zh_TW.properties.xml?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_zh_TW.properties.xml
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application_zh_TW.properties.xml
 Tue Oct  4 04:03:01 2016
@@ -1954,4 +1954,12 @@
        <entry key="save.success">Saved successfully</entry>
        <entry key="convert.errors.file">The have been errors while processing 
the file</entry>
        <entry key="convert.errors.file.missing">File is not found</entry>
+       <entry key="calendar.url">External CalDAV Calendar URL</entry>
+       <entry key="calendar.error">Error in making connection on the URL 
specified.</entry>
+       <entry key="calendar.addCalendar">Add External Calendar</entry>
+       <entry key="calendar.googleKey">Google Calendar API key</entry>
+       <entry key="calendar.dialogTitle">Calendar Details</entry>
+       <entry key="calendar.googleID">Google Calendar ID</entry>
+       <entry key="calendar.gcal">Google Calendar</entry>
+       <entry key="calendar.defaultTitle">New Calendar</entry>
 </properties>

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.html
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.html?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.html
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.html
 Tue Oct  4 04:03:01 2016
@@ -61,6 +61,10 @@
                                                                <div 
wicket:id="description"></div>
                                                        </td>
                                                </tr>
+                                               <tr>
+                                                       <td><wicket:message 
key="162" /></td>
+                                                       <td><select 
wicket:id="calendar"></select></td>
+                                               </tr>
                                        </table>
                                </div>
                                <div id="tab2">

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.java?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.java
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.java
 Tue Oct  4 04:03:01 2016
@@ -38,10 +38,12 @@ import org.apache.openmeetings.db.dao.us
 import org.apache.openmeetings.db.entity.calendar.Appointment;
 import org.apache.openmeetings.db.entity.calendar.Appointment.Reminder;
 import org.apache.openmeetings.db.entity.calendar.MeetingMember;
+import org.apache.openmeetings.db.entity.calendar.OmCalendar;
 import org.apache.openmeetings.db.entity.room.Room;
 import org.apache.openmeetings.db.entity.user.GroupUser;
 import org.apache.openmeetings.db.entity.user.User;
 import org.apache.openmeetings.db.util.FormatHelper;
+import org.apache.openmeetings.service.calendar.caldav.AppointmentManager;
 import org.apache.openmeetings.web.app.Application;
 import org.apache.openmeetings.web.app.WebSession;
 import org.apache.openmeetings.web.common.OmDateTimePicker;
@@ -64,6 +66,7 @@ import org.apache.wicket.markup.html.for
 import org.apache.wicket.markup.html.form.TextField;
 import org.apache.wicket.model.CompoundPropertyModel;
 import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
 import org.apache.wicket.model.Model;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.wicket.model.util.CollectionModel;
@@ -152,8 +155,12 @@ public class AppointmentDialog extends A
        }
 
        protected void deleteAppointment(IPartialPageRequestHandler handler) {
-               getBean(AppointmentDao.class).delete(getModelObject(), 
getUserId());
-               calendarPanel.refresh(handler);         
+               Appointment a = getModelObject();
+               getBean(AppointmentDao.class).delete(a, getUserId());
+               calendarPanel.refresh(handler);
+               if (a.getCalendar() != null && a.getHref() != null) {
+                       calendarPanel.updatedeleteAppointment(handler, 
CalendarDialog.DIALOG_TYPE.DELETE_APPOINTMENT, a);
+               }
        }
 
        @Override
@@ -228,7 +235,11 @@ public class AppointmentDialog extends A
                a.setMeetingMembers(attendees);
                a.setStart(getDate(form.start.getModelObject()));
                a.setEnd(getDate(form.end.getModelObject()));
+               a.setCalendar(form.cals.getModelObject());
                getBean(AppointmentDao.class).update(a, getUserId());
+               if (a.getCalendar() != null) {
+                       calendarPanel.updatedeleteAppointment(target, 
CalendarDialog.DIALOG_TYPE.UPDATE_APPOINTMENT, a);
+               }
                target.add(feedback);
                calendarPanel.refresh(target);
        }
@@ -259,6 +270,18 @@ public class AppointmentDialog extends A
                                , Model.of(new Room())
                                , getRoomList()
                                , new ChoiceRenderer<Room>("name", "id"));
+               private DropDownChoice<OmCalendar> cals = new DropDownChoice<>(
+                               "calendar",
+                               new LoadableDetachableModel<List<? extends 
OmCalendar>>() {
+                                       private static final long 
serialVersionUID = 1L;
+
+                                       @Override
+                                       protected List<? extends OmCalendar> 
load() {
+                                               return getCalendarList();
+                                       }
+                               },
+                               new ChoiceRenderer<OmCalendar>("title", "id")
+               );
 
                private Room createAppRoom() {
                        Room r = new Room();
@@ -268,7 +291,7 @@ public class AppointmentDialog extends A
                        }
                        return r;
                }
-               
+
                @Override
                protected void onModelChanged() {
                        super.onModelChanged();
@@ -300,7 +323,11 @@ public class AppointmentDialog extends A
                                        end.add(java.util.Calendar.HOUR_OF_DAY, 
1);
                                        a.setEnd(end.getTime());
                                }
+                               cals.setEnabled(true);
+                       } else {
+                               cals.setEnabled(false);
                        }
+
                        attendeesModel.setObject(new ArrayList<User>());
                        if (a.getMeetingMembers() != null) {
                                for (MeetingMember mm : a.getMeetingMembers()) {
@@ -311,7 +338,7 @@ public class AppointmentDialog extends A
                        
owner.setDefaultModel(Model.of(FormatHelper.formatUser(a.getOwner())));
                        ownerPanel.setVisible(!isOwner(a));
                }
-               
+
                public AppointmentForm(String id, 
CompoundPropertyModel<Appointment> model) {
                        super(id, model);
                        setOutputMarkupId(true);
@@ -383,6 +410,7 @@ public class AppointmentDialog extends A
                        pwd.setEnabled(getModelObject().isPasswordProtected());
                        pwd.setOutputMarkupId(true);
                        add(pwd);
+                       
add(cals.setNullValid(true).setLabel(Model.of("calendar")).setOutputMarkupId(true));
                }
                
                private List<Room> getRoomList() {
@@ -398,6 +426,10 @@ public class AppointmentDialog extends A
                        }
                        return result;
                }
+
+               private List<OmCalendar> getCalendarList(){
+                       return 
getBean(AppointmentManager.class).getCalendars(getUserId());
+               }
                
                @Override
                protected void onValidate() {

Added: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/CalendarDialog.html
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/CalendarDialog.html?rev=1763226&view=auto
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/CalendarDialog.html
 (added)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/CalendarDialog.html
 Tue Oct  4 04:03:01 2016
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+
+-->
+<html xmlns:wicket="http://wicket.apache.org";>
+       <wicket:panel>
+               <form wicket:id="calform" class="appointmentPopUp">
+                       <span wicket:id="feedback"></span>
+                       <div id="tabs">
+                               <table>
+                                       <tr>
+                                               <td><wicket:message 
key="572"/></td>
+                                               <td><input type="text" 
wicket:id="title"/></td>
+                                       </tr>
+                                       <tr>
+                                               <td wicket:id="urlLabel"></td>
+                                               <td><input type="url" 
wicket:id="url" /></td>
+                                       </tr>
+                                       <tr>
+                                               <td wicket:id="userLabel"></td>
+                                               <td><input type="text" 
wicket:id="login"/></td>
+                                       </tr>
+                                       <tr>
+                                               <td wicket:id="passLabel"></td>
+                                               <td><input type="password" 
wicket:id="password"/></td>
+                                       </tr>
+                                       <tr>
+                                               <td><wicket:message 
key="calendar.gcal"/></td>
+                                               <td><input type="checkbox" 
wicket:id="gcal"/></td>
+                                       </tr>
+                               </table>
+                       </div>
+               </form>
+               <div wicket:id="confirmDelete"></div>
+       </wicket:panel>
+</html>

Added: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/CalendarDialog.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/CalendarDialog.java?rev=1763226&view=auto
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/CalendarDialog.java
 (added)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/CalendarDialog.java
 Tue Oct  4 04:03:01 2016
@@ -0,0 +1,589 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") +  you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openmeetings.web.user.calendar;
+
+import static org.apache.openmeetings.web.app.Application.getBean;
+import static org.apache.openmeetings.web.app.WebSession.getUserId;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.UsernamePasswordCredentials;
+import org.apache.openmeetings.db.dao.calendar.AppointmentDao;
+import org.apache.openmeetings.db.entity.calendar.Appointment;
+import org.apache.openmeetings.db.entity.calendar.OmCalendar;
+import org.apache.openmeetings.service.calendar.caldav.AppointmentManager;
+import org.apache.openmeetings.web.app.Application;
+import org.apache.wicket.AttributeModifier;
+import org.apache.wicket.Component;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxCheckBox;
+import org.apache.wicket.core.request.handler.IPartialPageRequestHandler;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.PasswordTextField;
+import org.apache.wicket.markup.html.form.RequiredTextField;
+import org.apache.wicket.markup.html.form.TextField;
+import org.apache.wicket.markup.html.form.UrlTextField;
+import org.apache.wicket.model.AbstractReadOnlyModel;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.validation.IValidatable;
+import org.apache.wicket.validation.validator.UrlValidator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.googlecode.wicket.jquery.core.Options;
+import com.googlecode.wicket.jquery.ui.widget.dialog.AbstractDialog;
+import com.googlecode.wicket.jquery.ui.widget.dialog.AbstractFormDialog;
+import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton;
+import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButtons;
+import com.googlecode.wicket.jquery.ui.widget.dialog.DialogIcon;
+import com.googlecode.wicket.jquery.ui.widget.dialog.MessageDialog;
+import com.googlecode.wicket.kendo.ui.panel.KendoFeedbackPanel;
+
+/**
+ * Multipurpose Calendar Dialog form. This provides the ability to ask for a 
user prompt,
+ * for Creating, and Syncing of Calendars. Along with that also,
+ * during the Creation and Deletion of Appointments.
+ */
+public class CalendarDialog extends AbstractFormDialog<OmCalendar> {
+       private static final Logger log = 
LoggerFactory.getLogger(CalendarDialog.class);
+       private static final long serialVersionUID = 1L;
+       private CalendarPanel calendarPanel;
+
+       private final KendoFeedbackPanel feedback = new 
KendoFeedbackPanel("feedback", new Options("button", true));
+       private DialogButton save = new DialogButton("save", 
Application.getString(813));
+       private DialogButton cancel = new DialogButton("cancel", 
Application.getString(1130));
+       private DialogButton delete = new DialogButton("delete", 
Application.getString(814));
+       private UserCalendarForm form;
+       private MessageDialog confirmDelete;
+       private List<OmCalendar> cals; //List of calendars for syncing
+       private int calIndex = 0;
+
+       public enum DIALOG_TYPE {
+               UPDATE_CALENDAR,
+               SYNC_CALENDAR,
+               UPDATE_APPOINTMENT,
+               DELETE_APPOINTMENT
+       }
+
+       //Defines the current mode of in which the Dialog is functioning in
+       private DIALOG_TYPE type = DIALOG_TYPE.UPDATE_CALENDAR;
+       private Appointment appointment = null;
+
+       public CalendarDialog(String id, String title, final CalendarPanel 
calendarPanel, CompoundPropertyModel<OmCalendar> model) {
+               super(id, title, true);
+               this.calendarPanel = calendarPanel;
+               form = new UserCalendarForm("calform", model);
+               add(form);
+               confirmDelete = new MessageDialog("confirmDelete", 
Application.getString(814), Application.getString(833), 
DialogButtons.OK_CANCEL, DialogIcon.WARN) {
+                       private static final long serialVersionUID = 1L;
+
+                       @Override
+                       public void onClose(IPartialPageRequestHandler handler, 
DialogButton button) {
+                               if (button != null && 
button.match(AbstractDialog.OK)) {
+                                       
calendarPanel.getAppointmentManager().deleteCalendar(form.getModelObject());
+                                       calendarPanel.refresh(handler);
+                                       calendarPanel.refreshCalendars(handler);
+                               }
+                       }
+               };
+               add(confirmDelete);
+       }
+
+       /**
+        * Open the Dialog with a specific type of Appointment Based Prompts
+        */
+       public void open(IPartialPageRequestHandler handler, DIALOG_TYPE type, 
Appointment a) {
+               this.type = type;
+               appointment = a;
+               if (isOwner(a)) {
+                       if (setFormModelObject(a, handler)) {
+                               this.open(handler);
+                               handler.add(this);
+                       } else {
+                               switch (type) {
+                                       case UPDATE_APPOINTMENT:
+                                               updateAppointment(a);
+                                               break;
+                                       case DELETE_APPOINTMENT:
+                                               deleteAppointment(a);
+                                               break;
+                                       case SYNC_CALENDAR:
+                                               break;
+                                       case UPDATE_CALENDAR:
+                                               break;
+                                       default:
+                                               break;
+                               }
+
+                               calendarPanel.refresh(handler);
+                       }
+               }
+
+       }
+
+       /**
+        * Open the Dialog with a specific type of Calendar Based Prompts
+        */
+       public void open(IPartialPageRequestHandler handler, DIALOG_TYPE type, 
OmCalendar c) {
+               this.type = type;
+               switch (type) {
+                       case UPDATE_CALENDAR:
+                               setFormModelObject(c);
+                               setButtons(handler);
+                               this.open(handler);
+                               break;
+                       case SYNC_CALENDAR:
+                               if (setCalendarList(handler)) {
+                                       this.open(handler);
+                                       handler.add(this);
+                               } else {
+                                       calendarPanel.refresh(handler);
+                               }
+                               break;
+                       case DELETE_APPOINTMENT:
+                               break;
+                       case UPDATE_APPOINTMENT:
+                               break;
+                       default:
+                               break;
+               }
+       }
+
+       @Override
+       public int getWidth() {
+               return 650;
+       }
+
+       @Override
+       public DialogButton getSubmitButton() {
+               return save;
+       }
+
+       @Override
+       protected List<DialogButton> getButtons() {
+               return Arrays.asList(save, cancel, delete);
+       }
+
+       @Override
+       public Form<?> getForm() {
+               return form;
+       }
+
+       @Override
+       protected void onSubmit(AjaxRequestTarget target) {
+               switch (type) {
+                       case UPDATE_CALENDAR:
+                               OmCalendar c = form.getModelObject();
+                               AppointmentManager appointmentManager = 
calendarPanel.getAppointmentManager();
+                               c.setHref(form.url.getModelObject());
+                               HttpClient client = 
calendarPanel.getHttpClient();
+
+                               if (form.gcal.getModelObject()) {
+                                       
c.setSyncType(OmCalendar.SyncType.GOOGLE_CALENDAR);
+                                       
c.setToken(form.username.getModelObject());
+                                       if (c.getId() == null)
+                                               
calendarPanel.populateGoogleCalendar(c, target);
+                               } else if (c.getId() == null && 
form.username.getModelObject() != null) {
+                                       
appointmentManager.provideCredentials(client, c, new 
UsernamePasswordCredentials(form.username.getModelObject(),
+                                                       
form.pass.getModelObject()));
+                               }
+
+                               appointmentManager.createCalendar(client, c);
+                               calendarPanel.refreshCalendars(target);
+                               calendarPanel.refresh(target);
+                               break;
+                       case SYNC_CALENDAR:
+                               syncCalendar(form.getModelObject(), target);
+                               if (setFormModelObject()) {
+                                       setButtons(target);
+                                       this.open(target);
+                                       target.add(this);
+                               }
+                               break;
+                       case UPDATE_APPOINTMENT:
+                               updateAppointment(appointment);
+                               calendarPanel.refresh(target);
+                               break;
+                       case DELETE_APPOINTMENT:
+                               deleteAppointment(appointment);
+                               calendarPanel.refresh(target);
+                               break;
+               }
+               clearFormModel(target);
+               target.add(feedback);
+       }
+
+       /**
+        * Performs syncing of the Calendar.
+        *
+        * @param c       Calendar to sync
+        * @param handler Handler used to update the CalendarPanel
+        */
+       private void syncCalendar(OmCalendar c, IPartialPageRequestHandler 
handler) {
+               AppointmentManager appointmentManager = 
calendarPanel.getAppointmentManager();
+               HttpClient client = calendarPanel.getHttpClient();
+               if (form.username.getModelObject() != null) {
+                       appointmentManager.provideCredentials(client, c, new 
UsernamePasswordCredentials(form.username.getModelObject(),
+                                       form.pass.getModelObject()));
+               }
+               appointmentManager.syncItem(client, c);
+               calendarPanel.refresh(handler);
+               log.trace("Calendar " + c.getTitle() + " Successfully synced.");
+       }
+
+       /**
+        * Performs Deletion of Appointment on the Calendar.
+        *
+        * @param a Appointment to delete
+        */
+       private void deleteAppointment(Appointment a) {
+               AppointmentManager appointmentManager = 
calendarPanel.getAppointmentManager();
+               appointmentManager.deleteItem(calendarPanel.getHttpClient(), a);
+               appointment = null;
+       }
+
+       /**
+        * Performs updation of Appointment on the Calendar.
+        *
+        * @param a Appointment to update
+        */
+       private void updateAppointment(Appointment a) {
+               AppointmentManager appointmentManager = 
calendarPanel.getAppointmentManager();
+               appointmentManager.updateItem(calendarPanel.getHttpClient(), a);
+               appointment = null;
+       }
+
+       private static boolean isOwner(Appointment object) {
+               return object.getOwner() != null && 
getUserId().equals(object.getOwner().getId());
+       }
+
+       private static boolean isOwner(OmCalendar object) {
+               return object.getOwner() != null && 
getUserId().equals(object.getOwner().getId());
+       }
+
+       /**
+        * Sets the calendar list to sync and
+        * syncs all them until a calendar whose
+        *
+        * @param target Ajax target to update the buttons.
+        * @return <code>true</code> if a Calendar needs to be synced
+        * else all calendars should have gotten synced
+        */
+       private boolean setCalendarList(IPartialPageRequestHandler target) {
+               type = DIALOG_TYPE.SYNC_CALENDAR;
+               AppointmentManager appointmentManager = 
calendarPanel.getAppointmentManager();
+               cals = appointmentManager.getCalendars(getUserId());
+               appointmentManager.createHttpClient();
+               calIndex = 0;
+               setButtons(target);
+               return setFormModelObject();
+       }
+
+       // Sets the form object when in need of syncing. Returns true if model 
is set
+       private boolean setFormModelObject() {
+               AppointmentManager appointmentManager = 
calendarPanel.getAppointmentManager();
+
+               if (cals != null && !cals.isEmpty() && calIndex < cals.size()) {
+                       OmCalendar calendar = cals.get(calIndex++);
+                       HttpClient client = calendarPanel.getHttpClient();
+                       if (!appointmentManager.testConnection(client, 
calendar)) {
+                               form.setModelObject(calendar);
+                               form.url.setModelObject(calendar.getHref());
+                               return true;
+                       } else {
+                               appointmentManager.syncItem(client, calendar);
+                               return setFormModelObject();
+                       }
+               }
+
+               cals = null;
+               return false;
+       }
+
+       // Sets the form model object if the calendar cannot be reached. 
Returns true if model is set
+       private boolean setFormModelObject(Appointment a, 
IPartialPageRequestHandler target) {
+               OmCalendar c = a.getCalendar();
+               if 
(calendarPanel.getAppointmentManager().testConnection(calendarPanel.getHttpClient(),
 c)) {
+                       return false;
+               }
+
+               setFormModelObject(c);
+               setButtons(target);
+               return true;
+       }
+
+       private void setFormModelObject(OmCalendar c) {
+               if (c != null) {
+                       form.setModelObject(c);
+                       form.url.setModelObject(c.getHref());
+                       if (c.getSyncType() == 
OmCalendar.SyncType.GOOGLE_CALENDAR) {
+                               
form.username.setDefaultModelObject(c.getToken());
+                               form.gcal.setDefaultModelObject(true);
+                       } else {
+                               form.gcal.setDefaultModelObject(false);
+                       }
+               }
+       }
+
+       public void setButtons(IPartialPageRequestHandler target) {
+               switch (type) {
+                       case UPDATE_APPOINTMENT:
+                       case DELETE_APPOINTMENT:
+                       case SYNC_CALENDAR:
+                               delete.setVisible(false, target);
+                               save.setVisible(true, target);
+                               break;
+                       case UPDATE_CALENDAR:
+                               OmCalendar c = form.getModelObject();
+                               if (c.getId() == null) {
+                                       delete.setVisible(false, target);
+                               } else {
+                                       delete.setVisible(isOwner(c), target);
+                               }
+                               save.setVisible(isOwner(c), target);
+               }
+       }
+
+       @Override
+       public void onClose(IPartialPageRequestHandler handler, DialogButton 
button) {
+               switch (type) {
+                       case UPDATE_CALENDAR:
+                               if (delete.equals(button)) {
+                                       confirmDelete.open(handler);
+                               }
+                               break;
+                       case UPDATE_APPOINTMENT:
+                               //If the Appointment to put on the server was a 
new one, but the user cancelled it.
+                               // Then remove the calendar from the Appointment
+                               if (cancel.equals(button) && 
appointment.getHref() == null) {
+                                       appointment.setCalendar(null);
+                                       
getBean(AppointmentDao.class).update(appointment, getUserId());
+                                       calendarPanel.refresh(handler);
+                               }
+                       case DELETE_APPOINTMENT:
+                               appointment = null;
+                               break;
+                       case SYNC_CALENDAR:
+                               //If the user cancels the syncing then remove
+                               // all the calendars and stop the syncing.
+                               cals = null;
+                               break;
+               }
+               clearFormModel(handler);
+       }
+
+       @Override
+       protected void onError(AjaxRequestTarget target) {
+               target.add(feedback);
+       }
+
+       private void clearFormModel(IPartialPageRequestHandler handler) {
+               form.clearInput();
+               form.username.setModelObject(null);
+               handler.add(form);
+       }
+
+       private class UserCalendarForm extends Form<OmCalendar> {
+               private static final long serialVersionUID = 1L;
+               private TextField<String> username = new TextField<>("login", 
Model.of(""));
+               private PasswordTextField pass = new 
PasswordTextField("password", Model.of(""));
+               RequiredTextField<String> title = new 
RequiredTextField<>("title");
+
+               // Fields required for adding Google Calendar
+               Label urlLabel = new Label("urlLabel", 
Application.getString("calendar.url")),
+                               userLabel = new Label("userLabel", 
Application.getString(114)),
+                               passLabel = new Label("passLabel", 
Application.getString(115));
+
+               AjaxCheckBox gcal; // Checkbox for Google Calendar
+               UrlTextField url = new UrlTextField("url", Model.of(""), new 
UrlValidator() {
+                       private static final long serialVersionUID = 1L;
+
+                       //Custom UrlValidator
+                       @Override
+                       public void validate(IValidatable<String> validatable) {
+                               //Only Validate when It's not a Google Calendar 
i.e a URL
+                               if (!gcal.getModelObject()) {
+                                       super.validate(validatable);
+                               }
+                       }
+               }) {
+                       private static final long serialVersionUID = 1L;
+
+                       @Override
+                       protected String[] getInputTypes() {
+                               //Can be URL or a Text
+                               return new String[]{"url", "text"};
+                       }
+               };
+
+               public UserCalendarForm(String id, 
CompoundPropertyModel<OmCalendar> model) {
+                       super(id, model);
+                       setOutputMarkupId(true);
+                       add(title);
+                       add(feedback.setOutputMarkupId(true));
+
+                       add(url.setRequired(true).setOutputMarkupId(true));
+                       add(username.setOutputMarkupPlaceholderTag(true));
+                       add(urlLabel.setOutputMarkupId(true));
+
+                       
add(pass.setRequired(false).setOutputMarkupPlaceholderTag(true));
+
+                       add(userLabel.setOutputMarkupPlaceholderTag(true));
+                       add(passLabel.setOutputMarkupPlaceholderTag(true));
+
+                       gcal = new AjaxCheckBox("gcal", Model.of(false)) {
+                               private static final long serialVersionUID = 1L;
+
+                               //Checkbox, which when in "true" state will be 
in
+                               // the Google Calendar State, otherwise in the 
CalDAV state
+                               @Override
+                               protected void onUpdate(AjaxRequestTarget 
target) {
+                                       setGCalVisibility(getModelObject());
+                                       target.add(UserCalendarForm.this);
+                               }
+                       };
+
+                       add(gcal);
+               }
+
+               @Override
+               protected void onModelChanged() {
+                       OmCalendar calendar = getModelObject();
+                       switch (type) {
+                               case UPDATE_CALENDAR:
+                                       title.setEnabled(true);
+                                       if (calendar.getId() != null) {
+                                               url.setEnabled(false);
+                                               pass.setEnabled(false);
+                                               username.setEnabled(false);
+                                               gcal.setEnabled(false);
+                                       } else {
+                                               gcal.setEnabled(true);
+                                               url.setEnabled(true);
+                                               pass.setEnabled(true);
+                                               username.setEnabled(true);
+                                       }
+                                       setGCalVisibility(calendar);
+                                       break;
+                               case SYNC_CALENDAR:
+                               case UPDATE_APPOINTMENT:
+                               case DELETE_APPOINTMENT:
+                                       title.setEnabled(false);
+                                       url.setEnabled(false);
+                                       username.setEnabled(true);
+                                       pass.setEnabled(true);
+                                       gcal.setEnabled(false);
+                                       setGCalVisibility(calendar);
+                                       break;
+                       }
+               }
+
+               private void setGCalVisibility(OmCalendar calendar) {
+                       setGCalVisibility(calendar.getSyncType() == 
OmCalendar.SyncType.GOOGLE_CALENDAR);
+               }
+
+               //Sets the visibility of the Labels and the TextFields based on
+               // whether it's a Google calendar or not.
+               private void setGCalVisibility(boolean isGoogleCalendar) {
+                       if (isGoogleCalendar) {
+                               gcal.setModelObject(true);
+                               pass.setVisible(false);
+                               passLabel.setVisible(false);
+
+                               //Google Calendar ID
+                               
urlLabel.setDefaultModelObject(Application.getString("calendar.googleID"));
+                               url.setEnabled(true);
+                               
url.setLabel(Model.<String>of(Application.getString("calendar.googleID")));
+
+                               //Google API Key
+                               
userLabel.setDefaultModelObject(Application.getString("calendar.googleKey"));
+                               username.setEnabled(true);
+                       } else {
+                               gcal.setModelObject(false);
+                               pass.setVisible(true);
+                               passLabel.setVisible(true);
+
+                               
userLabel.setDefaultModelObject(Application.getString(114));
+                               username.setModelObject(null);
+
+                               
urlLabel.setDefaultModelObject(Application.getString("calendar.url"));
+                               
url.setLabel(Model.of(Application.getString("calendar.url")));
+                       }
+
+                       //Add new AttributeModifier to change the type of 
URLTextField, to text for
+                       //Google Calendar and to URL for a normal CalDAV 
calendar
+                       url.add(new AttributeModifier("type", new 
AbstractReadOnlyModel<String>() {
+                               private static final long serialVersionUID = 1L;
+
+                               @Override
+                               public String getObject() {
+                                       return gcal.getModelObject() ? "text" : 
"url";
+                               }
+                       }) {
+                               private static final long serialVersionUID = 1L;
+
+                               @Override
+                               public boolean isTemporary(Component component) 
{
+                                       //This is a temporary model.
+                                       return true;
+                               }
+                       });
+               }
+
+
+               /**
+                * Validates the credentials and the server entered by the user 
by
+                * performing a HTTP Options Method.
+                * @see Form#onValidate()
+                */
+               @Override
+               protected void onValidate() {
+                       if (!hasError()) {
+                               switch (type) {
+                                       case UPDATE_CALENDAR:
+                                               if (getModelObject().getId() != 
null || gcal.getModelObject())
+                                                       return;
+                                       case UPDATE_APPOINTMENT:
+                                       case DELETE_APPOINTMENT:
+                                       case SYNC_CALENDAR:
+                                               AppointmentManager 
appointmentManager = calendarPanel.getAppointmentManager();
+                                               try {
+                                                       OmCalendar calendar = 
getModelObject();
+                                                       if (url.isEnabled())
+                                                               
calendar.setHref(url.getInput());
+                                                       HttpClient client = 
calendarPanel.getHttpClient();
+                                                       
appointmentManager.provideCredentials(client, calendar,
+                                                                       new 
UsernamePasswordCredentials(username.getInput(), pass.getInput()));
+                                                       if 
(appointmentManager.testConnection(client, calendar))
+                                                               return;
+                                               } catch (Exception e) {
+                                                       log.error("Error 
executing the TestConnection");
+                                               }
+
+                                               
error(Application.getString("calendar.error"));
+                                               break;
+                               }
+                       }
+               }
+       }
+}

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/CalendarPanel.html
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/CalendarPanel.html?rev=1763226&r1=1763225&r2=1763226&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/CalendarPanel.html
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/CalendarPanel.html
 Tue Oct  4 04:03:01 2016
@@ -20,6 +20,17 @@
 -->
 <html xmlns:wicket="http://wicket.apache.org";>
        <wicket:panel>
+               <div id="calendarlistcontainer">
+                       <div class="cell">
+                               <button 
wicket:id="submitCalendar"><span><wicket:message 
key="calendar.addCalendar"/></span></button>
+                               <button 
wicket:id="syncCalendarButton"><span>Sync</span></button>
+                       </div>
+                       <ul class="calendarlist" 
wicket:id="calendarListContainer">
+                               <li wicket:id="items">
+                                       <input type="button" wicket:id="item"/>
+                               </li>
+                       </ul>
+               </div>
                <div id="wrapper-panel-frame" class="ui-corner-all">
                        <form wicket:id="form">
                                <div id="calendar" wicket:id="calendar"></div>
@@ -28,6 +39,7 @@
                        </form>
                </div>
                <div wicket:id="appointment">[appointment]</div>
+               <div wicket:id="calendarDialog"></div>
                <!-- bottom section -->
        </wicket:panel>
 </html>


Reply via email to