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 do...@apache.org on 2013/08/21 16:08:29 UTC
svn commit: r1516164 [17/20] - in /james/hupa/trunk: ./ client/
client/src/main/java/com/ client/src/main/java/com/google/
client/src/main/java/com/google/web/
client/src/main/java/com/google/web/bindery/
client/src/main/java/com/google/web/bindery/req...
Copied: james/hupa/trunk/server/src/test/java/org/apache/hupa/server/service/SendReplyMessageServiceTest.java (from r1375909, james/hupa/trunk/server/src/test/java/org/apache/hupa/server/handler/ReplyMessageHandlerTest.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/server/src/test/java/org/apache/hupa/server/service/SendReplyMessageServiceTest.java?p2=james/hupa/trunk/server/src/test/java/org/apache/hupa/server/service/SendReplyMessageServiceTest.java&p1=james/hupa/trunk/server/src/test/java/org/apache/hupa/server/handler/ReplyMessageHandlerTest.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/server/src/test/java/org/apache/hupa/server/handler/ReplyMessageHandlerTest.java (original)
+++ james/hupa/trunk/server/src/test/java/org/apache/hupa/server/service/SendReplyMessageServiceTest.java Wed Aug 21 14:08:19 2013
@@ -16,9 +16,17 @@
* specific language governing permissions and limitations *
* under the License. *
****************************************************************/
-package org.apache.hupa.server.handler;
+
+package org.apache.hupa.server.service;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
import javax.mail.Message;
+import javax.mail.MessagingException;
import org.apache.hupa.server.FileItemRegistry;
import org.apache.hupa.server.HupaGuiceTestCase;
@@ -26,15 +34,18 @@ import org.apache.hupa.server.mock.MockI
import org.apache.hupa.server.mock.MockIMAPStore;
import org.apache.hupa.server.utils.SessionUtils;
import org.apache.hupa.server.utils.TestUtils;
-import org.apache.hupa.shared.data.IMAPFolder;
-import org.apache.hupa.shared.data.SMTPMessage;
-import org.apache.hupa.shared.rpc.ReplyMessage;
+import org.apache.hupa.shared.data.ImapFolderImpl;
+import org.apache.hupa.shared.data.SendReplyMessageActionImpl;
+import org.apache.hupa.shared.domain.SendReplyMessageAction;
+import org.apache.hupa.shared.domain.SmtpMessage;
+import org.apache.hupa.shared.exception.HupaException;
+import org.junit.Test;
import com.sun.mail.imap.IMAPStore;
-public class ReplyMessageHandlerTest extends HupaGuiceTestCase {
+public class SendReplyMessageServiceTest extends HupaGuiceTestCase {
- public void testForwardMessage() throws Exception {
+ @Test public void testForwardMessage() throws HupaException, MessagingException, IOException {
IMAPStore store = storeCache.get(testUser);
FileItemRegistry registry = SessionUtils.getSessionRegistry(logger, httpSession);
@@ -64,11 +75,11 @@ public class ReplyMessageHandlerTest ext
assertEquals(expected, TestUtils.summaryzeContent(message).toString());
// Create a reply user action with an uploaded message
- SMTPMessage smtpmsg = TestUtils.createMockSMTPMessage(registry, 1);
- ReplyMessage action = new ReplyMessage(smtpmsg, new IMAPFolder(inbox.getFullName()), msgUid);
+ SmtpMessage smtpmsg = TestUtils.createMockSMTPMessage(registry, 1);
+ SendReplyMessageAction action = new SendReplyMessageActionImpl(smtpmsg, new ImapFolderImpl(inbox.getFullName()), msgUid);
- message = reMsgHndl.createMessage(session, action);
- message = reMsgHndl.fillBody(message, action);
+ message = sendReplyMessageService.createMessage(session, action);
+ message = sendReplyMessageService.fillBody(message, action);
// The final message has to include the file uploaded by the user and the inline image
expected = "multipart/mixed\n"
Modified: james/hupa/trunk/server/src/test/java/org/apache/hupa/server/utils/MessageUtilsTest.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/server/src/test/java/org/apache/hupa/server/utils/MessageUtilsTest.java?rev=1516164&r1=1516163&r2=1516164&view=diff
==============================================================================
--- james/hupa/trunk/server/src/test/java/org/apache/hupa/server/utils/MessageUtilsTest.java (original)
+++ james/hupa/trunk/server/src/test/java/org/apache/hupa/server/utils/MessageUtilsTest.java Wed Aug 21 14:08:19 2013
@@ -18,7 +18,8 @@
****************************************************************/
package org.apache.hupa.server.utils;
-import org.apache.hupa.server.HupaGuiceTestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import java.util.List;
@@ -26,15 +27,18 @@ import javax.mail.Address;
import javax.mail.BodyPart;
import javax.mail.Message;
+import org.apache.hupa.server.HupaGuiceTestCase;
+import org.junit.Test;
+
public class MessageUtilsTest extends HupaGuiceTestCase {
- public void testExtractMessageAttachments() throws Exception {
+ @Test public void extractMessageAttachments() throws Exception {
Message message = TestUtils.createMockMimeMessage(session, 2);
List<BodyPart> parts = MessageUtils.extractMessageAttachments(logger, message.getContent());
assertEquals(2, parts.size());
}
- public void testExtractInlineAttachments() throws Exception {
+ @Test public void extractInlineAttachments() throws Exception {
Message message = TestUtils.createMockMimeMessage(session, 1);
List<BodyPart> attachments = MessageUtils.extractMessageAttachments(logger, message.getContent());
@@ -57,7 +61,7 @@ public class MessageUtilsTest extends Hu
assertEquals(1, inlineImgs.size());
}
- public void testGetRecipients () throws Exception {
+ @Test public void getRecipients () throws Exception {
String encodedEmail = "=?ISO-8859-1?Q?Manolo_Pe=F1a?= <he...@hupa.org>";
String decodedEmail = MessageUtils.decodeText(encodedEmail);
assertFalse(encodedEmail.equals(decodedEmail));
Modified: james/hupa/trunk/server/src/test/java/org/apache/hupa/server/utils/RegexPatternsTest.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/server/src/test/java/org/apache/hupa/server/utils/RegexPatternsTest.java?rev=1516164&r1=1516163&r2=1516164&view=diff
==============================================================================
--- james/hupa/trunk/server/src/test/java/org/apache/hupa/server/utils/RegexPatternsTest.java (original)
+++ james/hupa/trunk/server/src/test/java/org/apache/hupa/server/utils/RegexPatternsTest.java Wed Aug 21 14:08:19 2013
@@ -53,7 +53,7 @@ public class RegexPatternsTest extends T
String txt, res;
txt = ".. <img\nsrc=\"cid:abcd\"\nwhatever=/>click</a\n> ..";
res = RegexPatterns.replaceAll(txt, RegexPatterns.regex_inlineImg, RegexPatterns.repl_inlineImg);
- assertEquals(".. <img\nsrc='hupa/downloadAttachmentServlet?folder=%%FOLDER%%&uid=%%UID%%&name=abcd' name='cid:abcd'\nwhatever=/>click</a\n> ..", res);
+ assertEquals(".. <img\nsrc='hupa/downloadAttachmentServlet?mode=inline&folder=%%FOLDER%%&uid=%%UID%%&name=abcd' name='cid:abcd'\nwhatever=/>click</a\n> ..", res);
}
public void testRegexRestoreInlineLinks() {
@@ -85,15 +85,6 @@ public class RegexPatternsTest extends T
txt = "... <div attr=a onClick=\"something('');\" attr=b onMouseOver=whatever attr=c onKeyup=\"\" /> ...";
res = RegexPatterns.replaceAllRecursive(txt, RegexPatterns.regex_badAttrs, RegexPatterns.repl_badAttrs);
assertEquals("... <div attr=a attr=b attr=c /> ...", res);
-
-
- txt = "... <img src='1.jpg' onerror=javascript:alert(\"img-onerror-javascript:XSS\")> ...";
- res = RegexPatterns.replaceAllRecursive(txt, RegexPatterns.regex_badAttrs, RegexPatterns.repl_badAttrs);
- assertEquals("... <img src='1.jpg'> ...", res);
-
- txt = "... <img src=\"1.jpg\" onerror=javascript:alert(\"img-onerror-javascript:XSS\")> ...";
- res = RegexPatterns.replaceAllRecursive(txt, RegexPatterns.regex_badAttrs, RegexPatterns.repl_badAttrs);
- assertEquals("... <img src=\"1.jpg\"> ...", res);
}
public void testRegexHtmlLinks() {
Modified: james/hupa/trunk/server/src/test/java/org/apache/hupa/server/utils/TestUtils.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/server/src/test/java/org/apache/hupa/server/utils/TestUtils.java?rev=1516164&r1=1516163&r2=1516164&view=diff
==============================================================================
--- james/hupa/trunk/server/src/test/java/org/apache/hupa/server/utils/TestUtils.java (original)
+++ james/hupa/trunk/server/src/test/java/org/apache/hupa/server/utils/TestUtils.java Wed Aug 21 14:08:19 2013
@@ -42,10 +42,12 @@ import org.apache.commons.fileupload.Fil
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.hupa.server.FileItemRegistry;
-import org.apache.hupa.server.handler.AbstractSendMessageHandler;
import org.apache.hupa.server.mock.MockIMAPFolder;
-import org.apache.hupa.shared.data.MessageAttachment;
-import org.apache.hupa.shared.data.SMTPMessage;
+import org.apache.hupa.server.service.SendMessageBaseServiceImpl;
+import org.apache.hupa.shared.data.MessageAttachmentImpl;
+import org.apache.hupa.shared.data.SmtpMessageImpl;
+import org.apache.hupa.shared.domain.MessageAttachment;
+import org.apache.hupa.shared.domain.SmtpMessage;
import com.sun.mail.imap.IMAPStore;
@@ -157,7 +159,7 @@ public class TestUtils extends TestCase
message.setRecipients(RecipientType.CC, MessageUtils.getRecipients("cc@dom.com"));
message.setRecipients(RecipientType.BCC, MessageUtils.getRecipients("bcc@dom.com"));
message.setSubject("Subject");
- return AbstractSendMessageHandler.composeMessage(message, text, html, items);
+ return SendMessageBaseServiceImpl.composeMessage(message, text, html, items);
}
public static Message createMockMimeMessage(Session session, int nfiles) throws MessagingException, IOException {
@@ -175,7 +177,7 @@ public class TestUtils extends TestCase
* @throws MessagingException
* @throws IOException
*/
- public static SMTPMessage createMockSMTPMessage(FileItemRegistry registry, int nfiles) throws AddressException, MessagingException, IOException {
+ public static SmtpMessage createMockSMTPMessage(FileItemRegistry registry, int nfiles) throws AddressException, MessagingException, IOException {
ArrayList<MessageAttachment> attachments = new ArrayList<MessageAttachment>();
for (int i = 1; i <= nfiles; i++) {
@@ -183,7 +185,7 @@ public class TestUtils extends TestCase
fileItem = TestUtils.createMockFileItem("uploadedFile_" + i + ".bin");
registry.add(fileItem);
- MessageAttachment msgAttach = new MessageAttachment();
+ MessageAttachment msgAttach = new MessageAttachmentImpl();
msgAttach.setName(fileItem.getFieldName());
msgAttach.setContentType(fileItem.getContentType());
msgAttach.setSize((int) fileItem.getSize());
@@ -191,7 +193,7 @@ public class TestUtils extends TestCase
attachments.add(msgAttach);
}
- SMTPMessage smtpMessage = new SMTPMessage();
+ SmtpMessage smtpMessage = new SmtpMessageImpl();
smtpMessage.setFrom("Test user <fr...@dom.com>");
smtpMessage.setTo(new ArrayList<String>(Arrays.asList("to@dom.com")));
smtpMessage.setCc(new ArrayList<String>(Arrays.asList("cc@dom.com")));
Modified: james/hupa/trunk/shared/pom.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/pom.xml?rev=1516164&r1=1516163&r2=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/pom.xml (original)
+++ james/hupa/trunk/shared/pom.xml Wed Aug 21 14:08:19 2013
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.james.hupa</groupId>
<artifactId>hupa-parent</artifactId>
- <version>0.0.4-SNAPSHOT</version>
+ <version>0.0.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>hupa-shared</artifactId>
@@ -35,10 +35,6 @@
<artifactId>gwt-user</artifactId>
</dependency>
<dependency>
- <groupId>net.customware.gwt.dispatch</groupId>
- <artifactId>gwt-dispatch</artifactId>
- </dependency>
- <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
Modified: james/hupa/trunk/shared/src/main/java/org/apache/hupa/Shared.gwt.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/Shared.gwt.xml?rev=1516164&r1=1516163&r2=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/Shared.gwt.xml (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/Shared.gwt.xml Wed Aug 21 14:08:19 2013
@@ -16,7 +16,6 @@
-->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.6.4//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.6.4/distro-source/core/src/gwt-module.dtd">
<module>
- <inherits name='net.customware.gwt.dispatch.Dispatch' />
<inherits name='com.google.gwt.user.User'/>
<source path="shared"/>
</module>
Modified: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/SConsts.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/SConsts.java?rev=1516164&r1=1516163&r2=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/SConsts.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/SConsts.java Wed Aug 21 14:08:19 2013
@@ -21,7 +21,6 @@ package org.apache.hupa.shared;
public class SConsts {
public static final String HUPA = "hupa/";
- public static final String SERVLET_DISPATCH = "dispatch";
public static final String SERVLET_DOWNLOAD = "downloadAttachmentServlet";
public static final String SERVLET_UPLOAD = "uploadAttachmentServlet";
public static final String SERVLET_SOURCE = "messageSourceServlet";
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/AbstractMessageImpl.java (from r1375909, james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/AbstractMessage.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/AbstractMessageImpl.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/AbstractMessageImpl.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/AbstractMessage.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/AbstractMessage.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/AbstractMessageImpl.java Wed Aug 21 14:08:19 2013
@@ -19,20 +19,14 @@
package org.apache.hupa.shared.data;
-import java.io.Serializable;
-import java.util.ArrayList;
+import java.util.List;
-public class AbstractMessage implements Serializable{
-
- /**
- *
- */
- private static final long serialVersionUID = 5208272852772006815L;
+public class AbstractMessageImpl{
private String from;
private String subject;
private String replyto;
- private ArrayList<String> to;
- private ArrayList<String> cc;
+ private List<String> to;
+ private List<String> cc;
private boolean hasAttachment;
public String toString() {
@@ -82,11 +76,11 @@ public class AbstractMessage implements
}
- public void setCc(ArrayList<String> cc) {
+ public void setCc(List<String> cc) {
this.cc = cc;
}
- public ArrayList<String> getCc() {
+ public List<String> getCc() {
return cc;
}
@@ -108,11 +102,11 @@ public class AbstractMessage implements
return subject;
}
- public ArrayList<String> getTo() {
+ public List<String> getTo() {
return to;
}
- public void setTo(ArrayList<String> to) {
+ public void setTo(List<String> to) {
this.to = to;
}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/CreateFolderActionImpl.java (from r1375909, james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/RawMessageResult.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/CreateFolderActionImpl.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/CreateFolderActionImpl.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/RawMessageResult.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/RawMessageResult.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/CreateFolderActionImpl.java Wed Aug 21 14:08:19 2013
@@ -1,47 +1,41 @@
-/****************************************************************
- * 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.shared.rpc;
-
-import java.io.Serializable;
-
-import net.customware.gwt.dispatch.shared.Result;
-
-public class RawMessageResult implements Result, Serializable {
-
- /**
- *
- */
- private static final long serialVersionUID = -6244846164658274324L;
- private String rawMessage;
-
- protected RawMessageResult() {
-
- }
-
- public RawMessageResult(String rawMessage) {
- this.rawMessage = rawMessage;
- }
-
-
- public String getRawMessage() {
- return rawMessage;
- }
-
-}
+/****************************************************************
+ * 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.shared.data;
+
+import org.apache.hupa.shared.domain.CreateFolderAction;
+import org.apache.hupa.shared.domain.ImapFolder;
+
+public class CreateFolderActionImpl implements CreateFolderAction{
+
+ private ImapFolder folder;
+ public CreateFolderActionImpl() {
+ }
+ public CreateFolderActionImpl(ImapFolder folder) {
+ this.folder = folder;
+ }
+ @Override
+ public ImapFolder getFolder() {
+ return folder;
+ }
+ @Override
+ public void setFolder(ImapFolder folder) {
+ this.folder = folder;
+ }
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/DeleteFolderActionImpl.java (from r1375909, james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/DeleteMessageByUid.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/DeleteFolderActionImpl.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/DeleteFolderActionImpl.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/DeleteMessageByUid.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/DeleteMessageByUid.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/DeleteFolderActionImpl.java Wed Aug 21 14:08:19 2013
@@ -1,44 +1,41 @@
-/****************************************************************
- * 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.shared.rpc;
-
-import java.util.ArrayList;
-
-import org.apache.hupa.shared.data.IMAPFolder;
-
-public class DeleteMessageByUid extends DeleteMessage {
-
- private static final long serialVersionUID = -5980938676368660849L;
-
- private ArrayList<Long> messageUids;
-
- public DeleteMessageByUid(IMAPFolder folder, ArrayList<Long> messageUids) {
- super(folder);
- this.messageUids = messageUids;
- }
-
- protected DeleteMessageByUid() {
- }
-
- public ArrayList<Long> getMessageUids() {
- return messageUids;
- }
-
-}
+/****************************************************************
+ * 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.shared.data;
+
+import org.apache.hupa.shared.domain.DeleteFolderAction;
+import org.apache.hupa.shared.domain.ImapFolder;
+
+public class DeleteFolderActionImpl implements DeleteFolderAction{
+
+ private ImapFolder folder;
+ public DeleteFolderActionImpl() {
+ }
+ public DeleteFolderActionImpl(ImapFolder folder) {
+ this.folder = folder;
+ }
+ @Override
+ public ImapFolder getFolder() {
+ return folder;
+ }
+ @Override
+ public void setFolder(ImapFolder folder) {
+ this.folder = folder;
+ }
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/DeleteMessageActionImpl.java (from r1375909, james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Tag.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/DeleteMessageActionImpl.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/DeleteMessageActionImpl.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Tag.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Tag.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/DeleteMessageActionImpl.java Wed Aug 21 14:08:19 2013
@@ -1,48 +1,44 @@
-/****************************************************************
- * 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.shared.data;
-
-public class Tag {
-
- public final static String PREFIX = "TAG.";
- private String tagName;
-
- @SuppressWarnings("unused")
- private Tag() {
-
- }
-
- public Tag(String tagName) {
- this.tagName = tagName;
- }
-
- public String getName() {
- return tagName;
- }
-
- public String getPrefix() {
- return PREFIX;
- }
-
- public String toString() {
- return PREFIX + tagName;
- }
-
-}
+/****************************************************************
+ * 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.shared.data;
+
+import org.apache.hupa.shared.domain.DeleteMessageAction;
+import org.apache.hupa.shared.domain.ImapFolder;
+
+public class DeleteMessageActionImpl implements DeleteMessageAction {
+
+ protected ImapFolder folder;
+
+ public DeleteMessageActionImpl() {
+ }
+ public DeleteMessageActionImpl(ImapFolder folder) {
+ this.folder = folder;
+ }
+
+ @Override
+ public ImapFolder getFolder() {
+ return folder;
+ }
+ @Override
+ public void setFolder(ImapFolder folder) {
+ this.folder = folder;
+ }
+
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/DeleteMessageAllActionImpl.java (from r1375909, james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/exception/InvalidSessionException.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/DeleteMessageAllActionImpl.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/DeleteMessageAllActionImpl.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/exception/InvalidSessionException.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/exception/InvalidSessionException.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/DeleteMessageAllActionImpl.java Wed Aug 21 14:08:19 2013
@@ -17,21 +17,14 @@
* under the License. *
****************************************************************/
-package org.apache.hupa.shared.exception;
+package org.apache.hupa.shared.data;
-import net.customware.gwt.dispatch.shared.ActionException;
+import org.apache.hupa.shared.domain.DeleteMessageAllAction;
+import org.apache.hupa.shared.domain.ImapFolder;
-/**
- *
- */
-public class InvalidSessionException extends ActionException{
-
- /**
- *
- */
- private static final long serialVersionUID = 995112620968798947L;
-
- public InvalidSessionException(String msg) {
- super(msg);
- }
+public class DeleteMessageAllActionImpl extends DeleteMessageActionImpl implements DeleteMessageAllAction {
+ public DeleteMessageAllActionImpl(){}
+ public DeleteMessageAllActionImpl(ImapFolder folder){
+ super(folder);
+ }
}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/DeleteMessageByUidActionImpl.java (from r1375909, james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Tag.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/DeleteMessageByUidActionImpl.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/DeleteMessageByUidActionImpl.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Tag.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Tag.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/DeleteMessageByUidActionImpl.java Wed Aug 21 14:08:19 2013
@@ -1,48 +1,47 @@
-/****************************************************************
- * 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.shared.data;
-
-public class Tag {
-
- public final static String PREFIX = "TAG.";
- private String tagName;
-
- @SuppressWarnings("unused")
- private Tag() {
-
- }
-
- public Tag(String tagName) {
- this.tagName = tagName;
- }
-
- public String getName() {
- return tagName;
- }
-
- public String getPrefix() {
- return PREFIX;
- }
-
- public String toString() {
- return PREFIX + tagName;
- }
-
-}
+/****************************************************************
+ * 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.shared.data;
+
+import java.util.List;
+
+import org.apache.hupa.shared.domain.DeleteMessageByUidAction;
+import org.apache.hupa.shared.domain.ImapFolder;
+
+public class DeleteMessageByUidActionImpl extends DeleteMessageActionImpl implements DeleteMessageByUidAction {
+
+ public DeleteMessageByUidActionImpl(){}
+ public DeleteMessageByUidActionImpl(ImapFolder folder, List<Long> messageUids){
+ super(folder);
+ this.messageUids = messageUids;
+ }
+
+ private List<Long> messageUids;
+
+ @Override
+ public List<Long> getMessageUids() {
+ return messageUids;
+ }
+
+ @Override
+ public void setMessageUids(List<Long> messageUids) {
+ this.messageUids = messageUids;
+ }
+
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/DeleteMessageResultImpl.java (from r1375909, james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Tag.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/DeleteMessageResultImpl.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/DeleteMessageResultImpl.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Tag.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Tag.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/DeleteMessageResultImpl.java Wed Aug 21 14:08:19 2013
@@ -1,48 +1,55 @@
-/****************************************************************
- * 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.shared.data;
-
-public class Tag {
-
- public final static String PREFIX = "TAG.";
- private String tagName;
-
- @SuppressWarnings("unused")
- private Tag() {
-
- }
-
- public Tag(String tagName) {
- this.tagName = tagName;
- }
-
- public String getName() {
- return tagName;
- }
-
- public String getPrefix() {
- return PREFIX;
- }
-
- public String toString() {
- return PREFIX + tagName;
- }
-
-}
+/****************************************************************
+ * 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.shared.data;
+
+import org.apache.hupa.shared.domain.DeleteMessageResult;
+import org.apache.hupa.shared.domain.ImapFolder;
+import org.apache.hupa.shared.domain.User;
+
+public class DeleteMessageResultImpl implements DeleteMessageResult {
+
+ private User user;
+ private ImapFolder folder;
+ private int deleteCount;
+
+ public DeleteMessageResultImpl() {
+ }
+
+ public DeleteMessageResultImpl(User user, ImapFolder folder, int deleteCount) {
+ this.user = user;
+ this.folder = folder;
+ this.deleteCount = deleteCount;
+ }
+ @Override
+ public int getCount() {
+ return deleteCount;
+ }
+
+ @Override
+ public User getUser() {
+ return user;
+ }
+
+ @Override
+ public ImapFolder getFolder() {
+ return folder;
+ }
+
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/FetchMessagesActionImpl.java (from r1375909, james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Tag.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/FetchMessagesActionImpl.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/FetchMessagesActionImpl.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Tag.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Tag.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/FetchMessagesActionImpl.java Wed Aug 21 14:08:19 2013
@@ -1,48 +1,82 @@
-/****************************************************************
- * 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.shared.data;
-
-public class Tag {
-
- public final static String PREFIX = "TAG.";
- private String tagName;
-
- @SuppressWarnings("unused")
- private Tag() {
-
- }
-
- public Tag(String tagName) {
- this.tagName = tagName;
- }
-
- public String getName() {
- return tagName;
- }
-
- public String getPrefix() {
- return PREFIX;
- }
-
- public String toString() {
- return PREFIX + tagName;
- }
-
-}
+/****************************************************************
+ * 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.shared.data;
+
+import org.apache.hupa.shared.domain.ImapFolder;
+import org.apache.hupa.shared.domain.FetchMessagesAction;
+
+public class FetchMessagesActionImpl implements FetchMessagesAction {
+
+ private ImapFolder folder;
+ private int start;
+ private int offset;
+ private String searchString;
+
+ public FetchMessagesActionImpl() {
+ }
+
+ public FetchMessagesActionImpl(ImapFolder folder, int start, int offset, String searchString) {
+ this.folder = folder;
+ this.start = start;
+ this.offset = offset;
+ this.searchString = searchString;
+ }
+
+ @Override
+ public ImapFolder getFolder() {
+ return folder;
+ }
+
+ @Override
+ public int getStart() {
+ return start;
+ }
+
+ @Override
+ public int getOffset() {
+ return offset;
+ }
+
+ @Override
+ public String getSearchString() {
+ return searchString;
+ }
+
+ @Override
+ public void setFolder(ImapFolder folder) {
+ this.folder = folder;
+ }
+
+ @Override
+ public void setStart(int start) {
+ this.start = start;
+ }
+
+ @Override
+ public void setOffset(int offset) {
+ this.offset = offset;
+ }
+
+ @Override
+ public void setSearchString(String searchString) {
+ this.searchString = searchString;
+ }
+
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/FetchMessagesResultImpl.java (from r1375909, james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Tag.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/FetchMessagesResultImpl.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/FetchMessagesResultImpl.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Tag.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Tag.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/FetchMessagesResultImpl.java Wed Aug 21 14:08:19 2013
@@ -1,48 +1,64 @@
-/****************************************************************
- * 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.shared.data;
-
-public class Tag {
-
- public final static String PREFIX = "TAG.";
- private String tagName;
-
- @SuppressWarnings("unused")
- private Tag() {
-
- }
-
- public Tag(String tagName) {
- this.tagName = tagName;
- }
-
- public String getName() {
- return tagName;
- }
-
- public String getPrefix() {
- return PREFIX;
- }
-
- public String toString() {
- return PREFIX + tagName;
- }
-
-}
+/****************************************************************
+ * 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.shared.data;
+
+import java.util.List;
+
+import org.apache.hupa.shared.domain.Message;
+import org.apache.hupa.shared.domain.FetchMessagesResult;
+
+public class FetchMessagesResultImpl implements FetchMessagesResult {
+
+ public FetchMessagesResultImpl() {
+ }
+
+ public FetchMessagesResultImpl(List<Message> messages, int start, int offset, int realCount, int realUnreadCount) {
+ this.messages = messages;
+ this.start = start;
+ this.offset = offset;
+ this.realCount = realCount;
+ this.realUnreadCount = realUnreadCount;
+ }
+
+ private List<Message> messages;
+ private int start;
+ private int offset;
+ private int realCount;
+ private int realUnreadCount;
+
+ public int getOffset() {
+ return offset;
+ }
+
+ public int getStart() {
+ return start;
+ }
+
+ public List<Message> getMessages() {
+ return messages;
+ }
+ public int getRealCount() {
+ return realCount;
+ }
+
+ public int getRealUnreadCount() {
+ return realUnreadCount;
+ }
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/GenericResultImpl.java (from r1375909, james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/LoginUser.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/GenericResultImpl.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/GenericResultImpl.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/LoginUser.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/LoginUser.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/GenericResultImpl.java Wed Aug 21 14:08:19 2013
@@ -17,41 +17,46 @@
* under the License. *
****************************************************************/
-package org.apache.hupa.shared.rpc;
+package org.apache.hupa.shared.data;
+import org.apache.hupa.shared.domain.GenericResult;
+public class GenericResultImpl implements GenericResult {
-import java.io.Serializable;
+ private String message = null;
+ private boolean success = true;
-import net.customware.gwt.dispatch.shared.Action;
+ public GenericResultImpl() {
+ }
+ public GenericResultImpl(String message, boolean success) {
+ this.message = message;
+ this.success = success;
+ }
+ @Override
+ public String getMessage() {
+ return message;
+ }
+
+ @Override
+ public boolean isSuccess() {
+ return success;
+ }
+
+ @Override
+ public void setMessage(String message) {
+ this.message = message;
+
+ }
+
+ @Override
+ public void setSuccess(boolean success) {
+ this.success = success;
+ }
+
+ @Override
+ public void setError(String message) {
+ setMessage(message);
+ setSuccess(false);
+ }
-public class LoginUser implements Action<LoginUserResult>, Serializable {
-
- private static final long serialVersionUID = -7541443368424711160L;
-
- private String userName;
- private String password;
-
-
- @SuppressWarnings("unused")
- private LoginUser() {}
-
- public LoginUser(String userName,String password) {
- this.userName = userName;
- this.password = password;
- }
-
- public String getUserName() {
- return userName;
- }
-
- public String getPassword() {
- return password;
- }
-
- public String toString() {
- return userName + ":" + password;
- }
-
-
}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/GetMessageDetailsActionImpl.java (from r1375909, james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Tag.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/GetMessageDetailsActionImpl.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/GetMessageDetailsActionImpl.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Tag.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Tag.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/GetMessageDetailsActionImpl.java Wed Aug 21 14:08:19 2013
@@ -1,48 +1,54 @@
-/****************************************************************
- * 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.shared.data;
-
-public class Tag {
-
- public final static String PREFIX = "TAG.";
- private String tagName;
-
- @SuppressWarnings("unused")
- private Tag() {
-
- }
-
- public Tag(String tagName) {
- this.tagName = tagName;
- }
-
- public String getName() {
- return tagName;
- }
-
- public String getPrefix() {
- return PREFIX;
- }
-
- public String toString() {
- return PREFIX + tagName;
- }
-
-}
+/****************************************************************
+ * 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.shared.data;
+
+import org.apache.hupa.shared.domain.GetMessageDetailsAction;
+import org.apache.hupa.shared.domain.ImapFolder;
+
+public class GetMessageDetailsActionImpl implements GetMessageDetailsAction {
+ public GetMessageDetailsActionImpl() {
+ super();
+ }
+ public GetMessageDetailsActionImpl(ImapFolder folder, long uid) {
+ super();
+ this.folder = folder;
+ this.uid = uid;
+ }
+
+ private ImapFolder folder;
+ private long uid;
+
+ @Override
+ public ImapFolder getFolder() {
+ return folder;
+ }
+ @Override
+ public void setFolder(ImapFolder folder) {
+ this.folder = folder;
+ }
+ @Override
+ public long getUid() {
+ return uid;
+ }
+ @Override
+ public void setUid(long uid) {
+ this.uid = uid;
+ }
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/GetMessageDetailsResultImpl.java (from r1375909, james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/RenameFolder.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/GetMessageDetailsResultImpl.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/GetMessageDetailsResultImpl.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/RenameFolder.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/RenameFolder.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/GetMessageDetailsResultImpl.java Wed Aug 21 14:08:19 2013
@@ -1,50 +1,46 @@
-/****************************************************************
- * 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.shared.rpc;
-
-import java.io.Serializable;
-
-import net.customware.gwt.dispatch.shared.Action;
-
-import org.apache.hupa.shared.data.IMAPFolder;
-
-public class RenameFolder implements Action<GenericResult>, Serializable {
-
- private static final long serialVersionUID = 1924419911921600320L;
- private IMAPFolder folder;
- private String newName;
-
- public RenameFolder(IMAPFolder folder, String newName) {
- this.folder = folder;
- this.newName = newName;
- }
-
- protected RenameFolder() {
-
- }
-
- public IMAPFolder getFolder() {
- return folder;
- }
-
- public String getNewName() {
- return newName;
- }
-}
+/****************************************************************
+ * 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.shared.data;
+
+import org.apache.hupa.shared.domain.GetMessageDetailsResult;
+import org.apache.hupa.shared.domain.MessageDetails;
+
+public class GetMessageDetailsResultImpl implements GetMessageDetailsResult{
+ private MessageDetails messageDetails;
+
+ public GetMessageDetailsResultImpl() {
+ super();
+ }
+
+ public GetMessageDetailsResultImpl(MessageDetails messageDetails) {
+ super();
+ this.messageDetails = messageDetails;
+ }
+
+ @Override
+ public MessageDetails getMessageDetails() {
+ return messageDetails;
+ }
+
+ @Override
+ public void setMessageDetails(MessageDetails messageDetails) {
+ this.messageDetails = messageDetails;
+ }
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/GetMessageRawActionImpl.java (from r1375909, james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/RawMessage.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/GetMessageRawActionImpl.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/GetMessageRawActionImpl.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/RawMessage.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/RawMessage.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/GetMessageRawActionImpl.java Wed Aug 21 14:08:19 2013
@@ -1,66 +1,60 @@
-/****************************************************************
- * 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.shared.rpc;
-
-import java.io.Serializable;
-
-import net.customware.gwt.dispatch.shared.Action;
-
-import org.apache.hupa.shared.data.IMAPFolder;
-
-public class RawMessage implements Action<RawMessageResult>, Serializable {
-
- private static final long serialVersionUID = 5826298202494313834L;
- private IMAPFolder folder;
- private long uid;
-
- public RawMessage(IMAPFolder folder, long uid) {
- this.folder = folder;
- this.uid = uid;
- }
-
- @SuppressWarnings("unused")
- private RawMessage() {
- }
-
- public IMAPFolder getFolder() {
- return folder;
- }
-
- public long getUid() {
- return uid;
- }
-
- public boolean equals(Object obj) {
- if (obj instanceof RawMessage) {
- RawMessage action = (RawMessage) obj;
- if (action.getFolder().equals(getFolder()) && action.getUid() == getUid()) {
- return true;
- }
- }
- return false;
- }
-
- public int hashCode() {
- return (int) (getFolder().hashCode() * getUid());
- }
-
-}
+/****************************************************************
+ * 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.shared.data;
+
+import org.apache.hupa.shared.domain.GetMessageRawAction;
+import org.apache.hupa.shared.domain.ImapFolder;
+
+public class GetMessageRawActionImpl implements GetMessageRawAction {
+
+ private ImapFolder folder;
+ private long uid;
+
+ public GetMessageRawActionImpl(ImapFolder folder, long uid) {
+ this.folder = folder;
+ this.uid = uid;
+ }
+
+ public GetMessageRawActionImpl() {
+ }
+
+ public ImapFolder getFolder() {
+ return folder;
+ }
+
+ public long getUid() {
+ return uid;
+ }
+
+ public boolean equals(Object obj) {
+ if (obj instanceof GetMessageRawAction) {
+ GetMessageRawAction action = (GetMessageRawAction) obj;
+ if (action.getFolder().equals(getFolder()) && action.getUid() == getUid()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public int hashCode() {
+ return (int) (getFolder().hashCode() * getUid());
+ }
+
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/GetMessageRawResultImpl.java (from r1375909, james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/FetchFolders.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/GetMessageRawResultImpl.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/GetMessageRawResultImpl.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/FetchFolders.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/FetchFolders.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/GetMessageRawResultImpl.java Wed Aug 21 14:08:19 2013
@@ -17,17 +17,23 @@
* under the License. *
****************************************************************/
-package org.apache.hupa.shared.rpc;
+package org.apache.hupa.shared.data;
-import java.io.Serializable;
+import org.apache.hupa.shared.domain.GetMessageRawResult;
-import net.customware.gwt.dispatch.shared.Action;
+public class GetMessageRawResultImpl implements GetMessageRawResult {
+ private String rawMessage;
-public class FetchFolders implements Action<FetchFoldersResult>, Serializable {
+ protected GetMessageRawResultImpl() {
- private static final long serialVersionUID = 8515539585915762904L;
+ }
- public FetchFolders() {
- }
+ public GetMessageRawResultImpl(String rawMessage) {
+ this.rawMessage = rawMessage;
+ }
+
+ public String getRawMessage() {
+ return rawMessage;
+ }
}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/IdleActionImpl.java (from r1375909, james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/NameAwareWidgetDisplay.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/IdleActionImpl.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/IdleActionImpl.java&p1=james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/NameAwareWidgetDisplay.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/NameAwareWidgetDisplay.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/IdleActionImpl.java Wed Aug 21 14:08:19 2013
@@ -1,30 +1,25 @@
-/****************************************************************
- * 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.mvp;
-
-public interface NameAwareWidgetDisplay {
-
- /**
- * Return the name for the Display to show
- *
- * @return name
- */
- public String getName();
-}
+/****************************************************************
+ * 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.shared.data;
+
+import org.apache.hupa.shared.domain.IdleAction;
+
+public class IdleActionImpl implements IdleAction {
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/IdleResultImpl.java (from r1375909, james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/IdleResult.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/IdleResultImpl.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/IdleResultImpl.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/IdleResult.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/IdleResult.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/IdleResultImpl.java Wed Aug 21 14:08:19 2013
@@ -17,22 +17,19 @@
* under the License. *
****************************************************************/
-package org.apache.hupa.shared.rpc;
+package org.apache.hupa.shared.data;
-import java.io.Serializable;
+import org.apache.hupa.shared.domain.IdleResult;
-import net.customware.gwt.dispatch.shared.Result;
+public class IdleResultImpl implements IdleResult{
-public class IdleResult implements Result, Serializable {
-
- private static final long serialVersionUID = 5530385273335407315L;
private boolean supported;
- protected IdleResult() {
+ protected IdleResultImpl() {
}
- public IdleResult(boolean supported) {
+ public IdleResultImpl(boolean supported) {
this.supported = supported;
}
@@ -44,5 +41,4 @@ public class IdleResult implements Resul
public boolean isSupported() {
return supported;
}
-
}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/ImapFolderImpl.java (from r1375909, james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/IMAPFolder.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/ImapFolderImpl.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/ImapFolderImpl.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/IMAPFolder.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/IMAPFolder.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/ImapFolderImpl.java Wed Aug 21 14:08:19 2013
@@ -19,31 +19,36 @@
package org.apache.hupa.shared.data;
-import java.io.Serializable;
import java.util.ArrayList;
+import java.util.List;
-/**
- * IMAPFolder
- *
- */
-public class IMAPFolder implements Serializable {
+import org.apache.hupa.shared.domain.ImapFolder;
- /**
- *
- */
- private static final long serialVersionUID = 2084188092060266479L;
+public class ImapFolderImpl implements ImapFolder {
- private ArrayList<IMAPFolder> childs = new ArrayList<IMAPFolder>();
+ private List<ImapFolder> children = new ArrayList<ImapFolder>();
+ private String name;
private String fullName;
private String delimiter;
- private int msgCount;
- private int unseenMsgCount;
+ private int messageCount;
+ private int unseenMessageCount;
private boolean subscribed = false;
+ private boolean hasChildren = false;
- public IMAPFolder() {
+ public ImapFolderImpl() {
+ }
+
+ public ImapFolderImpl(ImapFolder folder){
+ this.delimiter = folder.getDelimiter();
+ this.children = folder.getChildren();
+ this.fullName = folder.getFullName();
+ this.messageCount = folder.getMessageCount();
+ this.name = folder.getName();
+ this.subscribed = folder.getSubscribed();
+ this.unseenMessageCount = folder.getUnseenMessageCount();
}
- public IMAPFolder(String fullName) {
+ public ImapFolderImpl(String fullName) {
setFullName(fullName);
}
@@ -55,7 +60,6 @@ public class IMAPFolder implements Seria
return subscribed;
}
-
/**
* Get the name of the folder
*
@@ -65,19 +69,21 @@ public class IMAPFolder implements Seria
if (delimiter != null) {
String fParts[] = getFullName().split("\\" + delimiter);
if (fParts != null && fParts.length > 0) {
- return fParts[fParts.length - 1];
+ name = fParts[fParts.length - 1];
+ return name;
}
}
- return fullName;
+ name = fullName;
+ return name;
}
/**
* Set the child folders
*
- * @param childs
+ * @param children
*/
- public void setChildIMAPFolders(ArrayList<IMAPFolder> childs) {
- this.childs = childs;
+ public void setChildren(List<ImapFolder> children) {
+ this.children = children;
}
/**
@@ -85,8 +91,8 @@ public class IMAPFolder implements Seria
*
* @return childs
*/
- public ArrayList<IMAPFolder> getChildIMAPFolders() {
- return childs;
+ public List<ImapFolder> getChildren() {
+ return children;
}
/**
@@ -130,7 +136,7 @@ public class IMAPFolder implements Seria
* @return msgCount
*/
public int getMessageCount() {
- return msgCount;
+ return messageCount;
}
/**
@@ -139,7 +145,7 @@ public class IMAPFolder implements Seria
* @param msgCount
*/
public void setMessageCount(int msgCount) {
- this.msgCount = msgCount;
+ this.messageCount = msgCount;
}
/**
@@ -148,7 +154,7 @@ public class IMAPFolder implements Seria
* @param unseenMsgCount
*/
public void setUnseenMessageCount(int unseenMsgCount) {
- this.unseenMsgCount = unseenMsgCount;
+ this.unseenMessageCount = unseenMsgCount;
}
/**
@@ -156,8 +162,8 @@ public class IMAPFolder implements Seria
*
* @return unseenMsgCount
*/
- public int getUnseeMessageCount() {
- return unseenMsgCount;
+ public int getUnseenMessageCount() {
+ return unseenMessageCount;
}
@Override
@@ -167,8 +173,8 @@ public class IMAPFolder implements Seria
@Override
public boolean equals(Object o) {
- if (o instanceof IMAPFolder) {
- if (((IMAPFolder) o).getFullName().equals(getFullName())) {
+ if (o instanceof ImapFolder) {
+ if (((ImapFolder) o).getFullName().equals(getFullName())) {
return true;
}
}
@@ -179,5 +185,34 @@ public class IMAPFolder implements Seria
public int hashCode() {
return getFullName().hashCode();
}
+
+ // FIXME Could not locate setter for property name in type ImapFolderImpl
+ @Override
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ @Override
+ public void setFolderTo(ImapFolder folder) {
+ folder.setChildren(this.children);
+ folder.setDelimiter(this.delimiter);
+ folder.setFullName(this.fullName);
+ folder.setMessageCount(this.messageCount);
+ folder.setName(this.name);
+ folder.setSubscribed(this.subscribed);
+ folder.setUnseenMessageCount(this.unseenMessageCount);
+ }
+
+ @Override
+ public boolean getHasChildren() {
+ return hasChildren;
+ }
+
+ @Override
+ public void setHasChildren(boolean hasChildren){
+ this.hasChildren = hasChildren;
+ }
+
}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/LogoutUserActionImpl.java (from r1375909, james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/NameAwareWidgetDisplay.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/LogoutUserActionImpl.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/LogoutUserActionImpl.java&p1=james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/NameAwareWidgetDisplay.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/NameAwareWidgetDisplay.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/LogoutUserActionImpl.java Wed Aug 21 14:08:19 2013
@@ -1,30 +1,26 @@
-/****************************************************************
- * 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.mvp;
-
-public interface NameAwareWidgetDisplay {
-
- /**
- * Return the name for the Display to show
- *
- * @return name
- */
- public String getName();
-}
+/****************************************************************
+ * 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.shared.data;
+
+import org.apache.hupa.shared.domain.LogoutUserAction;
+
+public class LogoutUserActionImpl implements LogoutUserAction{
+
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/LogoutUserResultImpl.java (from r1375909, james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/FetchFolders.java)
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/LogoutUserResultImpl.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/LogoutUserResultImpl.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/FetchFolders.java&r1=1375909&r2=1516164&rev=1516164&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/FetchFolders.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/LogoutUserResultImpl.java Wed Aug 21 14:08:19 2013
@@ -17,17 +17,23 @@
* under the License. *
****************************************************************/
-package org.apache.hupa.shared.rpc;
+package org.apache.hupa.shared.data;
-import java.io.Serializable;
+import org.apache.hupa.shared.domain.LogoutUserResult;
+import org.apache.hupa.shared.domain.User;
-import net.customware.gwt.dispatch.shared.Action;
+public class LogoutUserResultImpl implements LogoutUserResult{
+ private User user;
-public class FetchFolders implements Action<FetchFoldersResult>, Serializable {
+ public LogoutUserResultImpl(User user) {
+ this.user = user;
+ }
- private static final long serialVersionUID = 8515539585915762904L;
+ public LogoutUserResultImpl() {
+ }
- public FetchFolders() {
- }
+ public User getUser() {
+ return user;
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org