You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2009/11/07 22:16:55 UTC

svn commit: r833766 - in /james/hupa/trunk: client/src/main/java/org/apache/hupa/client/ client/src/main/java/org/apache/hupa/client/validation/ server/src/test/java/org/apache/hupa/server/handler/

Author: norman
Date: Sat Nov  7 21:16:53 2009
New Revision: 833766

URL: http://svn.apache.org/viewvc?rev=833766&view=rev
Log:
javadocs and cleanup

Modified:
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaCallback.java
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/EmailListValidator.java
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/NotEmptyValidator.java
    james/hupa/trunk/server/src/test/java/org/apache/hupa/server/handler/DeleteMessageByUidHandlerTest.java

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaCallback.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaCallback.java?rev=833766&r1=833765&r2=833766&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaCallback.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaCallback.java Sat Nov  7 21:16:53 2009
@@ -1,3 +1,22 @@
+/****************************************************************
+ * 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.hupa.client;
 
 import net.customware.gwt.dispatch.client.DispatchAsync;

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/EmailListValidator.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/EmailListValidator.java?rev=833766&r1=833765&r2=833766&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/EmailListValidator.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/EmailListValidator.java Sat Nov  7 21:16:53 2009
@@ -26,6 +26,12 @@
 import eu.maydu.gwt.validation.client.Validator;
 import eu.maydu.gwt.validation.client.i18n.ValidationMessages;
 
+/**
+ * Validator which handles the validation of Email Lists. Email addresses
+ * needs to be commaseperated
+ * 
+ *
+ */
 public class EmailListValidator extends Validator<EmailListValidator>{
     private HasText text;
     private String emailRegex = "^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$";
@@ -48,6 +54,12 @@
         return null;
     }
 
+    /**
+     * Return if the give text is a valid Emailaddress list
+     * 
+     * @param text
+     * @return isValid
+     */
     private boolean isValidAddressList(String text) {
         if (text.length() > 0) {
             String[] addresses = text.split(",");

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/NotEmptyValidator.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/NotEmptyValidator.java?rev=833766&r1=833765&r2=833766&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/NotEmptyValidator.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/validation/NotEmptyValidator.java Sat Nov  7 21:16:53 2009
@@ -27,6 +27,11 @@
 import eu.maydu.gwt.validation.client.Validator;
 import eu.maydu.gwt.validation.client.i18n.ValidationMessages;
 
+/**
+ * Validator which checks if the HasText implementation is empty or not
+ * 
+ *
+ */
 public class NotEmptyValidator extends Validator<NotEmptyValidator> {
     private HasText text;
 

Modified: james/hupa/trunk/server/src/test/java/org/apache/hupa/server/handler/DeleteMessageByUidHandlerTest.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/server/src/test/java/org/apache/hupa/server/handler/DeleteMessageByUidHandlerTest.java?rev=833766&r1=833765&r2=833766&view=diff
==============================================================================
--- james/hupa/trunk/server/src/test/java/org/apache/hupa/server/handler/DeleteMessageByUidHandlerTest.java (original)
+++ james/hupa/trunk/server/src/test/java/org/apache/hupa/server/handler/DeleteMessageByUidHandlerTest.java Sat Nov  7 21:16:53 2009
@@ -36,7 +36,6 @@
 import org.apache.hupa.shared.data.IMAPFolder;
 import org.apache.hupa.shared.data.User;
 import org.apache.hupa.shared.rpc.DeleteMessageByUid;
-import org.apache.hupa.shared.rpc.DeleteMessageResult;
 
 public class DeleteMessageByUidHandlerTest extends AbstractHandlerTest{
 
@@ -83,8 +82,7 @@
         assertFalse("Trash folder not exists yet",f3.exists());
         
         try {
-            DeleteMessageResult result = handler.execute(action, null);
-            int count = result.getCount();
+            handler.execute(action, null);
             assertEquals("Only 1 message left", 1, f.getMessageCount());
             
             MockIMAPFolder f2 = (MockIMAPFolder) store.getFolder(user.getSettings().getTrashFolderName());
@@ -117,8 +115,7 @@
         DeleteMessageByUid action = new DeleteMessageByUid(folder, uids);
 
         try {
-            DeleteMessageResult result = handler.execute(action, null);
-            int count = result.getCount();
+            handler.execute(action, null);
 
             assertEquals("Only 1 message left", 1, f.getMessageCount());
         } catch (ActionException e) {



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org