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 18:35:18 UTC
svn commit: r1516205 [8/9] - in /james/hupa/trunk: ./
client/src/main/java/org/apache/hupa/
client/src/main/java/org/apache/hupa/client/
client/src/main/java/org/apache/hupa/client/gin/
client/src/main/java/org/apache/hupa/client/mvp/ client/src/main/j...
Added: 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/IMAPFolder.java?rev=1516205&view=auto
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/IMAPFolder.java (added)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/IMAPFolder.java Wed Aug 21 16:35:16 2013
@@ -0,0 +1,183 @@
+/****************************************************************
+ * 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.io.Serializable;
+import java.util.ArrayList;
+
+/**
+ * IMAPFolder
+ *
+ */
+public class IMAPFolder implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 2084188092060266479L;
+
+ private ArrayList<IMAPFolder> childs = new ArrayList<IMAPFolder>();
+ private String fullName;
+ private String delimiter;
+ private int msgCount;
+ private int unseenMsgCount;
+ private boolean subscribed = false;
+
+ public IMAPFolder() {
+ }
+
+ public IMAPFolder(String fullName) {
+ setFullName(fullName);
+ }
+
+ public void setSubscribed(boolean subscribed) {
+ this.subscribed = subscribed;
+ }
+
+ public boolean getSubscribed() {
+ return subscribed;
+ }
+
+
+ /**
+ * Get the name of the folder
+ *
+ * @return name
+ */
+ public String getName() {
+ if (delimiter != null) {
+ String fParts[] = getFullName().split("\\" + delimiter);
+ if (fParts != null && fParts.length > 0) {
+ return fParts[fParts.length - 1];
+ }
+ }
+ return fullName;
+ }
+
+ /**
+ * Set the child folders
+ *
+ * @param childs
+ */
+ public void setChildIMAPFolders(ArrayList<IMAPFolder> childs) {
+ this.childs = childs;
+ }
+
+ /**
+ * Return the childs of this folder
+ *
+ * @return childs
+ */
+ public ArrayList<IMAPFolder> getChildIMAPFolders() {
+ return childs;
+ }
+
+ /**
+ * Return the full name of the folder. This include the full path
+ * @return Full name of the folder
+ */
+ public String getFullName() {
+ return fullName;
+ }
+
+ /**
+ * Set the full name of the folder
+ *
+ * @param fullName
+ */
+ public void setFullName(String fullName) {
+ this.fullName = fullName;
+ }
+
+ /**
+ * Set the delimiter which is used to seperate folders
+ *
+ * @param delimiter
+ */
+ public void setDelimiter(String delimiter) {
+ this.delimiter = delimiter;
+ }
+
+ /**
+ * Return the delimiter
+ *
+ * @return delimiter
+ */
+ public String getDelimiter() {
+ return delimiter;
+ }
+
+ /**
+ * Return the total message count of the messages that exists within this folder
+ *
+ * @return msgCount
+ */
+ public int getMessageCount() {
+ return msgCount;
+ }
+
+ /**
+ * Set total message count
+ *
+ * @param msgCount
+ */
+ public void setMessageCount(int msgCount) {
+ this.msgCount = msgCount;
+ }
+
+ /**
+ * Set the count of all unseen messages within this folder
+ *
+ * @param unseenMsgCount
+ */
+ public void setUnseenMessageCount(int unseenMsgCount) {
+ this.unseenMsgCount = unseenMsgCount;
+ }
+
+ /**
+ * Return the unseen message count
+ *
+ * @return unseenMsgCount
+ */
+ public int getUnseeMessageCount() {
+ return unseenMsgCount;
+ }
+
+ @Override
+ public String toString() {
+ return getFullName();
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (o instanceof IMAPFolder) {
+ if (((IMAPFolder) o).getFullName().equals(getFullName())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return getFullName().hashCode();
+ }
+
+}
Added: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Message.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Message.java?rev=1516205&view=auto
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Message.java (added)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Message.java Wed Aug 21 16:35:16 2013
@@ -0,0 +1,96 @@
+/****************************************************************
+ * 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.ArrayList;
+import java.util.Date;
+
+/**
+ *
+ *
+ */
+public class Message extends AbstractMessage {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -101492974974136423L;
+ private long uid;
+ private ArrayList<IMAPFlag> flags;
+ private ArrayList<Tag> tags;
+ private Date rDate;
+
+ public enum IMAPFlag {
+ SEEN, DELETED, RECENT, ANSWERED, JUNK, DRAFT, FLAGGED, USER
+ }
+
+
+
+ public void setFlags(ArrayList<IMAPFlag> flags) {
+ this.flags = flags;
+ }
+
+ public ArrayList<IMAPFlag> getFlags() {
+ return flags;
+ }
+
+ public void setTags(ArrayList<Tag> tags) {
+ this.tags = tags;
+ }
+
+ public ArrayList<Tag> getTags() {
+ return tags;
+ }
+
+ public long getUid() {
+ return uid;
+ }
+
+ public void setUid(long uid) {
+ this.uid = uid;
+ }
+
+
+ public void setReceivedDate(Date rDate) {
+ this.rDate = rDate;
+ }
+
+ public Date getReceivedDate() {
+ return rDate == null ? new Date(): rDate;
+ }
+
+
+ public String toString() {
+ return String.valueOf(getUid());
+ }
+
+ public boolean equals(Object obj) {
+ if (obj instanceof Message) {
+ if (((Message)obj).getUid() == getUid()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public int hashCode() {
+ return Long.valueOf(getUid()).hashCode();
+ }
+}
Added: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/MessageAttachment.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/MessageAttachment.java?rev=1516205&view=auto
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/MessageAttachment.java (added)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/MessageAttachment.java Wed Aug 21 16:35:16 2013
@@ -0,0 +1,93 @@
+/****************************************************************
+ * 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.io.Serializable;
+
+/**
+ * Attachment of a message
+ *
+ *
+ */
+public class MessageAttachment implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -6896197131104882424L;
+ private String cType;
+ private int size;
+ private String name;
+
+ /**
+ * Set the name of the attachment
+ *
+ * @param name
+ */
+ public void setName(String name) {
+ this.name = name;
+
+ }
+
+ /**
+ * Return the name of the attachment
+ *
+ * @return name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Set the content-type of the attachment
+ *
+ * @param cType
+ */
+ public void setContentType(String cType) {
+ this.cType = cType;
+ }
+
+ /**
+ * Return the content-type of the attachment
+ *
+ * @return cType
+ */
+ public String getContentType() {
+ return cType;
+ }
+
+ /**
+ * Set the content size in bytes
+ *
+ * @param size
+ */
+ public void setSize(int size) {
+ this.size = size;
+ }
+
+ /**
+ * Return the content size in bytes
+ *
+ * @return size
+ */
+ public int getSize() {
+ return size;
+ }
+}
Added: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/MessageDetails.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/MessageDetails.java?rev=1516205&view=auto
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/MessageDetails.java (added)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/MessageDetails.java Wed Aug 21 16:35:16 2013
@@ -0,0 +1,118 @@
+/****************************************************************
+ * 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.io.Serializable;
+import java.util.ArrayList;
+
+public class MessageDetails implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 7611536915564919521L;
+ private String text;
+ private ArrayList<MessageAttachment> aList;
+ private long uid;
+ private String raw;
+
+ public String toString() {
+ return "uid=" + String.valueOf(getUid()) +
+ " text.length=" + (text != null ? text.length() : 0) +
+ " raw.length=" + (raw != null ? raw.length() : 0) +
+ " attachments=" + (aList != null ? aList.size() : 0);
+ }
+
+
+ public long getUid() {
+ return uid;
+ }
+
+ public void setUid(long uid) {
+ this.uid = uid;
+ }
+
+ /**
+ * Set a raw String representation of the header
+ *
+ * @param raw
+ */
+ public void setRawHeader(String raw) {
+ this.raw = raw;
+ }
+
+ /**
+ * Return a raw String representation of the header
+ *
+ * @return raw
+ */
+ public String getRawHeader() {
+ return raw;
+ }
+
+ /**
+ * Set the body text of the content
+ *
+ * @param text
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * Return the body text of the content
+ * @return The text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * Set the attachments
+ *
+ * @param aList
+ */
+ public void setMessageAttachments(ArrayList<MessageAttachment> aList) {
+ this.aList = aList;
+ }
+
+ /**
+ * Return the attachments
+ *
+ * @return aList
+ */
+ public ArrayList<MessageAttachment> getMessageAttachments() {
+ return aList;
+ }
+
+
+ public boolean equals(Object obj) {
+ if (obj instanceof MessageDetails) {
+ if (((MessageDetails)obj).getUid() == getUid()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public int hashCode() {
+ Long l = Long.valueOf(getUid());
+ return l.intValue() * 16;
+ }
+}
Added: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/SMTPMessage.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/SMTPMessage.java?rev=1516205&view=auto
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/SMTPMessage.java (added)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/SMTPMessage.java Wed Aug 21 16:35:16 2013
@@ -0,0 +1,88 @@
+/****************************************************************
+ * 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.ArrayList;
+
+public class SMTPMessage extends AbstractMessage{
+ private static final long serialVersionUID = 7331361994526216161L;
+ private ArrayList<String> bcc;
+ private String text;
+ private ArrayList<MessageAttachment> aList;
+
+ public String toString() {
+ StringBuffer bccList = new StringBuffer("");
+ if (bcc !=null)
+ for (String s: bcc)
+ bccList.append(s).append(" ");
+
+ StringBuffer attachNames = new StringBuffer("");
+ for (MessageAttachment m: aList)
+ attachNames.append(m.getName()).append(" ");
+
+ return super.toString()
+ + " Bcc='" + bccList.toString()
+ + "'\nAttachments=" + attachNames.toString()
+ + "'\nMessage:\n" + text;
+ }
+
+ public ArrayList<String> getBcc() {
+ return bcc;
+ }
+ public void setBcc(ArrayList<String> bcc) {
+ this.bcc = bcc;
+ }
+
+ /**
+ * Set the body text of the content
+ *
+ * @param text
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ * Return the body text of the content
+ * @return The text
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * Set the attachments
+ *
+ * @param aList
+ */
+ public void setMessageAttachments(ArrayList<MessageAttachment> aList) {
+ this.aList = aList;
+ }
+
+ /**
+ * Return the attachments
+ *
+ * @return aList
+ */
+ public ArrayList<MessageAttachment> getMessageAttachments() {
+ return aList;
+ }
+
+}
Added: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Settings.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Settings.java?rev=1516205&view=auto
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Settings.java (added)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Settings.java Wed Aug 21 16:35:16 2013
@@ -0,0 +1,83 @@
+/****************************************************************
+ * 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.io.Serializable;
+
+public class Settings implements Serializable{
+
+ public static final String DEFAULT_INBOX = "INBOX";
+ public static final String DEFAULT_TRASH = "Trash";
+ public static final String DEFAULT_SENT = "Sent";
+ public static final String DEFAULT_DRAFT = "Draft";
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -8051377307421345664L;
+ private String trashFolderName = DEFAULT_TRASH;
+ private String sentFolderName = DEFAULT_SENT;
+ private String inboxFolderName = DEFAULT_INBOX;
+ private String draftsFolderName = DEFAULT_DRAFT;
+
+ private int prefetchCount = 20;
+
+ public String getInboxFolderName() {
+ return inboxFolderName;
+ }
+
+ public void setInboxFolderName(String inboxFolderName) {
+ this.inboxFolderName = inboxFolderName;
+ }
+
+ public String getTrashFolderName() {
+ return trashFolderName;
+ }
+
+ public void setTrashFolderName(String trashFolderName) {
+ this.trashFolderName = trashFolderName;
+ }
+
+ public String getSentFolderName() {
+ return sentFolderName;
+ }
+
+ public void setSentFolderName(String sentFolderName) {
+ this.sentFolderName = sentFolderName;
+ }
+
+ public int getPostFetchMessageCount() {
+ return prefetchCount;
+ }
+
+ public void setPostFetchMessageCount(int prefetchCount) {
+ this.prefetchCount = prefetchCount;
+ }
+
+ public String getDraftsFolderName() {
+ return draftsFolderName;
+ }
+
+ public void setDraftsFolderName(String draftFolderName) {
+ this.draftsFolderName = draftFolderName;
+ }
+
+
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Tag.java (from r1516164, 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/Tag.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/Tag.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/exception/InvalidSessionException.java&r1=1516164&r2=1516205&rev=1516205&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/Tag.java Wed Aug 21 16:35:16 2013
@@ -17,13 +17,32 @@
* under the License. *
****************************************************************/
-package org.apache.hupa.shared.exception;
+package org.apache.hupa.shared.data;
-public class InvalidSessionException extends HupaException{
+public class Tag {
- private static final long serialVersionUID = 995112620968798947L;
-
- public InvalidSessionException(String message) {
- super(message);
+ 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;
}
+
}
Added: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/User.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/User.java?rev=1516205&view=auto
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/User.java (added)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/data/User.java Wed Aug 21 16:35:16 2013
@@ -0,0 +1,139 @@
+/****************************************************************
+ * 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.io.Serializable;
+import java.util.Date;
+
+/**
+ * User which will get used for login to the IMAP and SMTP account
+ *
+ *
+ */
+public class User implements Serializable{
+
+ private static final long serialVersionUID = -573674209289821920L;
+ private String name;
+ private String password;
+ private Date loginDate;
+ private boolean auth;
+ private Settings settings;
+
+
+ /**
+ * The name of the User
+ *
+ * @param name
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Get name of the User
+ *
+ * @return name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Set the Password of the User
+ *
+ * @param password
+ */
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ /**
+ * Get the Password of the User
+ *
+ * @return password
+ */
+ public String getPassword() {
+ return password;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ return getName();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object object) {
+ if (object instanceof User) {
+ if (((User) object).getName().equals(getName())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public int hashCode() {
+ return getName().hashCode();
+ }
+ /**
+ * Get the Date on which the User was logged in the last time
+ *
+ * @return loginDate
+ */
+ public Date getLoginDate() {
+ return loginDate;
+ }
+
+ /**
+ * Set if the User was successful authenticated
+ *
+ * @param auth
+ */
+ public void setAuthenticated(boolean auth) {
+ this.auth = auth;
+ if (auth) {
+ loginDate = new Date();
+ }
+ }
+
+ /**
+ * Get if the User was successful authenticated
+ *
+ * @return auth
+ */
+ public boolean getAuthenticated() {
+ return auth;
+ }
+
+ public void setSettings(Settings settings) {
+ this.settings = settings;
+ }
+
+ public Settings getSettings() {
+ return settings;
+ }
+
+
+}
Modified: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/events/MoveMessageEvent.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/events/MoveMessageEvent.java?rev=1516205&r1=1516204&r2=1516205&view=diff
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/events/MoveMessageEvent.java (original)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/events/MoveMessageEvent.java Wed Aug 21 16:35:16 2013
@@ -1,77 +1,77 @@
-/****************************************************************
- * 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.events;
-
-import org.apache.hupa.shared.domain.ImapFolder;
-import org.apache.hupa.shared.domain.Message;
-import org.apache.hupa.shared.domain.User;
-
-import com.google.gwt.event.shared.GwtEvent;
-
-public class MoveMessageEvent extends GwtEvent<MoveMessageEventHandler> {
-
- public final static Type<MoveMessageEventHandler> TYPE = new Type<MoveMessageEventHandler>();
- private User user;
- private ImapFolder oldFolder;
- private ImapFolder newFolder;
- private Message message;
-
- public MoveMessageEvent(User user, ImapFolder oldFolder,
- ImapFolder newFolder, Message message) {
- this.user = user;
- this.oldFolder = oldFolder;
- this.newFolder = newFolder;
- this.message = message;
- }
-
+/****************************************************************
+ * 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.events;
+
+import org.apache.hupa.shared.domain.ImapFolder;
+import org.apache.hupa.shared.domain.Message;
+import org.apache.hupa.shared.domain.User;
+
+import com.google.gwt.event.shared.GwtEvent;
+
+public class MoveMessageEvent extends GwtEvent<MoveMessageEventHandler> {
+
+ public final static Type<MoveMessageEventHandler> TYPE = new Type<MoveMessageEventHandler>();
+ private User user;
+ private ImapFolder oldFolder;
+ private ImapFolder newFolder;
+ private Message message;
+
+ public MoveMessageEvent(User user, ImapFolder oldFolder,
+ ImapFolder newFolder, Message message) {
+ this.user = user;
+ this.oldFolder = oldFolder;
+ this.newFolder = newFolder;
+ this.message = message;
+ }
+
<<<<<<< HEAD
- public User getUser() {
+ public User getUser() {
=======
- public MoveMessageEvent(ImapFolder newFolder) {
- this.newFolder = newFolder;
- }
-
- public User getUser() {
+ public MoveMessageEvent(ImapFolder newFolder) {
+ this.newFolder = newFolder;
+ }
+
+ public User getUser() {
>>>>>>> 7635f4a0e76a4bbbeb6a4029aff92087f00eb09f
- return user;
- }
-
- public ImapFolder getOldFolder() {
- return oldFolder;
- }
-
- public ImapFolder getNewFolder() {
- return newFolder;
- }
-
- public Message getMessage() {
- return message;
- }
-
- protected void dispatch(MoveMessageEventHandler handler) {
- handler.onMoveMessageHandler(this);
- }
-
- @Override
- public com.google.gwt.event.shared.GwtEvent.Type<MoveMessageEventHandler> getAssociatedType() {
- return TYPE;
- }
-
-}
+ return user;
+ }
+
+ public ImapFolder getOldFolder() {
+ return oldFolder;
+ }
+
+ public ImapFolder getNewFolder() {
+ return newFolder;
+ }
+
+ public Message getMessage() {
+ return message;
+ }
+
+ protected void dispatch(MoveMessageEventHandler handler) {
+ handler.onMoveMessageHandler(this);
+ }
+
+ @Override
+ public com.google.gwt.event.shared.GwtEvent.Type<MoveMessageEventHandler> getAssociatedType() {
+ return TYPE;
+ }
+
+}
Modified: 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/exception/InvalidSessionException.java?rev=1516205&r1=1516204&r2=1516205&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/exception/InvalidSessionException.java Wed Aug 21 16:35:16 2013
@@ -1,29 +1,29 @@
-/****************************************************************
- * 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.exception;
-
-public class InvalidSessionException extends HupaException{
-
- private static final long serialVersionUID = 995112620968798947L;
-
- public InvalidSessionException(String message) {
- super(message);
- }
-}
+/****************************************************************
+ * 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.exception;
+
+public class InvalidSessionException extends HupaException{
+
+ private static final long serialVersionUID = 995112620968798947L;
+
+ public InvalidSessionException(String message) {
+ super(message);
+ }
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/CheckSession.java (from r1516164, 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/rpc/CheckSession.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/CheckSession.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/exception/InvalidSessionException.java&r1=1516164&r2=1516205&rev=1516205&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/rpc/CheckSession.java Wed Aug 21 16:35:16 2013
@@ -1,29 +1,31 @@
-/****************************************************************
- * 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.exception;
-
-public class InvalidSessionException extends HupaException{
-
- private static final long serialVersionUID = 995112620968798947L;
-
- public InvalidSessionException(String message) {
- super(message);
- }
-}
+/****************************************************************
+ * 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;
+
+
+public class CheckSession implements Action<CheckSessionResult>, Serializable {
+
+ private static final long serialVersionUID = 2255166545722718094L;
+
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/CheckSessionResult.java (from r1516164, 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/rpc/CheckSessionResult.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/CheckSessionResult.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/exception/InvalidSessionException.java&r1=1516164&r2=1516205&rev=1516205&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/rpc/CheckSessionResult.java Wed Aug 21 16:35:16 2013
@@ -1,29 +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.exception;
-
-public class InvalidSessionException extends HupaException{
-
- private static final long serialVersionUID = 995112620968798947L;
-
- public InvalidSessionException(String message) {
- super(message);
- }
-}
+/****************************************************************
+ * 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 org.apache.hupa.shared.data.User;
+
+import net.customware.gwt.dispatch.shared.Result;
+
+public class CheckSessionResult implements Result, Serializable {
+
+ private static final long serialVersionUID = -4785233314922498952L;
+ boolean valid = false;
+
+ private User user;
+
+ public User getUser() {
+ return user;
+ }
+
+ public void setUser(User user) {
+ this.user = user;
+ }
+
+ public boolean isValid() {
+ return user != null && user.getAuthenticated();
+ }
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/Contacts.java (from r1516164, 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/rpc/Contacts.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/Contacts.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/exception/InvalidSessionException.java&r1=1516164&r2=1516205&rev=1516205&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/rpc/Contacts.java Wed Aug 21 16:35:16 2013
@@ -1,29 +1,28 @@
-/****************************************************************
- * 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.exception;
-
-public class InvalidSessionException extends HupaException{
-
- private static final long serialVersionUID = 995112620968798947L;
-
- public InvalidSessionException(String message) {
- super(message);
- }
-}
+/****************************************************************
+ * 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;
+
+public class Contacts implements Action<ContactsResult>, Serializable{
+ private static final long serialVersionUID = 1l;
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/CreateFolder.java (from r1516164, 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/rpc/CreateFolder.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/CreateFolder.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/exception/InvalidSessionException.java&r1=1516164&r2=1516205&rev=1516205&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/rpc/CreateFolder.java Wed Aug 21 16:35:16 2013
@@ -1,29 +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.exception;
-
-public class InvalidSessionException extends HupaException{
-
- private static final long serialVersionUID = 995112620968798947L;
-
- public InvalidSessionException(String message) {
- super(message);
- }
-}
+/****************************************************************
+ * 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 CreateFolder implements Action<GenericResult>, Serializable{
+
+ private static final long serialVersionUID = -4966856616698265177L;
+ private IMAPFolder folder;
+
+ public CreateFolder(IMAPFolder folder) {
+ this.folder = folder;
+ }
+
+ protected CreateFolder() {
+ }
+
+ public IMAPFolder getFolder() {
+ return folder;
+ }
+
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/DeleteAllMessages.java (from r1516164, 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/rpc/DeleteAllMessages.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/DeleteAllMessages.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/exception/InvalidSessionException.java&r1=1516164&r2=1516205&rev=1516205&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/rpc/DeleteAllMessages.java Wed Aug 21 16:35:16 2013
@@ -17,13 +17,19 @@
* under the License. *
****************************************************************/
-package org.apache.hupa.shared.exception;
+package org.apache.hupa.shared.rpc;
-public class InvalidSessionException extends HupaException{
+import org.apache.hupa.shared.data.IMAPFolder;
- private static final long serialVersionUID = 995112620968798947L;
+public class DeleteAllMessages extends DeleteMessage{
- public InvalidSessionException(String message) {
- super(message);
+ private static final long serialVersionUID = -6801849429581798842L;
+
+ public DeleteAllMessages(IMAPFolder folder) {
+ super(folder);
+ }
+
+ protected DeleteAllMessages() {
+
}
-}
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/DeleteFolder.java (from r1516164, 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/rpc/DeleteFolder.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/DeleteFolder.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/exception/InvalidSessionException.java&r1=1516164&r2=1516205&rev=1516205&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/rpc/DeleteFolder.java Wed Aug 21 16:35:16 2013
@@ -1,29 +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.exception;
-
-public class InvalidSessionException extends HupaException{
-
- private static final long serialVersionUID = 995112620968798947L;
-
- public InvalidSessionException(String message) {
- super(message);
- }
-}
+/****************************************************************
+ * 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 DeleteFolder implements Action<GenericResult> , Serializable{
+
+ private static final long serialVersionUID = 7921329310932404439L;
+
+ private IMAPFolder folder;
+
+ public DeleteFolder(IMAPFolder folder) {
+ this.folder = folder;
+ }
+
+ protected DeleteFolder() {
+ }
+
+ public IMAPFolder getFolder() {
+ return folder;
+ }
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/DeleteMessage.java (from r1516164, 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/rpc/DeleteMessage.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/DeleteMessage.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/exception/InvalidSessionException.java&r1=1516164&r2=1516205&rev=1516205&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/rpc/DeleteMessage.java Wed Aug 21 16:35:16 2013
@@ -17,13 +17,29 @@
* under the License. *
****************************************************************/
-package org.apache.hupa.shared.exception;
+package org.apache.hupa.shared.rpc;
-public class InvalidSessionException extends HupaException{
+import java.io.Serializable;
- private static final long serialVersionUID = 995112620968798947L;
+import net.customware.gwt.dispatch.shared.Action;
- public InvalidSessionException(String message) {
- super(message);
+import org.apache.hupa.shared.data.IMAPFolder;
+
+public class DeleteMessage implements Action<DeleteMessageResult>, Serializable {
+
+ private static final long serialVersionUID = 801294103124082592L;
+ private IMAPFolder folder;
+
+ public DeleteMessage(IMAPFolder folder) {
+ this.folder = folder;
}
+
+ protected DeleteMessage() {
+
+ }
+
+ public IMAPFolder getFolder() {
+ return folder;
+ }
+
}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/DeleteMessageByUid.java (from r1516164, 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/rpc/DeleteMessageByUid.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/DeleteMessageByUid.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/exception/InvalidSessionException.java&r1=1516164&r2=1516205&rev=1516205&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/rpc/DeleteMessageByUid.java Wed Aug 21 16:35:16 2013
@@ -17,13 +17,28 @@
* under the License. *
****************************************************************/
-package org.apache.hupa.shared.exception;
+package org.apache.hupa.shared.rpc;
-public class InvalidSessionException extends HupaException{
+import java.util.ArrayList;
- private static final long serialVersionUID = 995112620968798947L;
+import org.apache.hupa.shared.data.IMAPFolder;
- public InvalidSessionException(String message) {
- super(message);
+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;
+ }
+
}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/DeleteMessageResult.java (from r1516164, 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/rpc/DeleteMessageResult.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/DeleteMessageResult.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/exception/InvalidSessionException.java&r1=1516164&r2=1516205&rev=1516205&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/rpc/DeleteMessageResult.java Wed Aug 21 16:35:16 2013
@@ -17,13 +17,48 @@
* under the License. *
****************************************************************/
-package org.apache.hupa.shared.exception;
+package org.apache.hupa.shared.rpc;
-public class InvalidSessionException extends HupaException{
+import java.io.Serializable;
- private static final long serialVersionUID = 995112620968798947L;
+import net.customware.gwt.dispatch.shared.Result;
- public InvalidSessionException(String message) {
- super(message);
+import org.apache.hupa.shared.data.IMAPFolder;
+import org.apache.hupa.shared.data.User;
+
+public class DeleteMessageResult implements Result, Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -5149203502019947912L;
+ private User user;
+ private IMAPFolder folder;
+ private int deleteCount;
+
+
+
+ @SuppressWarnings("unused")
+ private DeleteMessageResult() {
+
+ }
+
+ public DeleteMessageResult(User user,IMAPFolder folder, int deleteCount) {
+ this.user = user;
+ this.folder = folder;
+ this.deleteCount = deleteCount;
}
+
+ public int getCount() {
+ return deleteCount;
+ }
+
+ public User getUser() {
+ return user;
+ }
+
+ public IMAPFolder getFolder() {
+ return folder;
+ }
+
}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/FetchFolders.java (from r1516164, 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/rpc/FetchFolders.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/FetchFolders.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/exception/InvalidSessionException.java&r1=1516164&r2=1516205&rev=1516205&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/rpc/FetchFolders.java Wed Aug 21 16:35:16 2013
@@ -1,29 +1,33 @@
-/****************************************************************
- * 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.exception;
-
-public class InvalidSessionException extends HupaException{
-
- private static final long serialVersionUID = 995112620968798947L;
-
- public InvalidSessionException(String message) {
- super(message);
- }
-}
+/****************************************************************
+ * 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;
+
+
+public class FetchFolders implements Action<FetchFoldersResult>, Serializable {
+
+ private static final long serialVersionUID = 8515539585915762904L;
+
+ public FetchFolders() {
+ }
+}
Added: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/FetchFoldersResult.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/FetchFoldersResult.java?rev=1516205&view=auto
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/FetchFoldersResult.java (added)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/FetchFoldersResult.java Wed Aug 21 16:35:16 2013
@@ -0,0 +1,68 @@
+/****************************************************************
+ * 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 java.util.ArrayList;
+import java.util.List;
+
+import org.apache.hupa.shared.data.IMAPFolder;
+
+import net.customware.gwt.dispatch.shared.Result;
+
+public class FetchFoldersResult implements Result, Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -6215610133650989605L;
+ private List<IMAPFolder> folders;
+
+ public FetchFoldersResult(List<IMAPFolder> folders) {
+ this.folders=folders;
+ }
+
+ @SuppressWarnings("unused")
+ private FetchFoldersResult() {
+ }
+
+ public List<IMAPFolder> getFolders() {
+ return folders;
+ }
+
+ public String toString() {
+ StringBuffer ret = new StringBuffer("");
+ for (IMAPFolder folder : folders) {
+ ret.append(folder.getFullName()).append("\n");
+ for (IMAPFolder f : folder.getChildIMAPFolders()) {
+ childFolder(f, ret);
+ }
+ }
+ return ret.toString();
+ }
+
+ private void childFolder(IMAPFolder child, StringBuffer ret) {
+ ret.append(child.getFullName()).append("\n");
+ for (IMAPFolder folder : child.getChildIMAPFolders()) {
+ childFolder(folder, ret);
+ }
+ }
+
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/FetchMessages.java (from r1516164, 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/rpc/FetchMessages.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/FetchMessages.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/exception/InvalidSessionException.java&r1=1516164&r2=1516205&rev=1516205&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/rpc/FetchMessages.java Wed Aug 21 16:35:16 2013
@@ -1,29 +1,62 @@
-/****************************************************************
- * 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.exception;
-
-public class InvalidSessionException extends HupaException{
-
- private static final long serialVersionUID = 995112620968798947L;
-
- public InvalidSessionException(String message) {
- super(message);
- }
-}
+/****************************************************************
+ * 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 FetchMessages implements Action<FetchMessagesResult>, Serializable {
+
+ private static final long serialVersionUID = -3181183289937321202L;
+ private IMAPFolder folder;
+ private int start;
+ private int offset;
+ private String searchString;
+
+ protected FetchMessages() {
+ }
+
+ public FetchMessages(IMAPFolder folder,int start, int offset,String searchString) {
+ this.folder = folder;
+ this.start = start;
+ this.offset = offset;
+ this.searchString = searchString;
+ }
+
+ public IMAPFolder getFolder() {
+ return folder;
+ }
+
+ public int getStart() {
+ return start;
+ }
+
+ public int getOffset() {
+ return offset;
+ }
+
+ public String getSearchString() {
+ return searchString;
+ }
+
+}
Added: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/FetchMessagesResult.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/FetchMessagesResult.java?rev=1516205&view=auto
==============================================================================
--- james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/FetchMessagesResult.java (added)
+++ james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/FetchMessagesResult.java Wed Aug 21 16:35:16 2013
@@ -0,0 +1,90 @@
+/****************************************************************
+ * 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 java.util.ArrayList;
+
+import org.apache.hupa.shared.data.Message;
+/****************************************************************
+ * 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. *
+ ****************************************************************/
+
+import net.customware.gwt.dispatch.shared.Result;
+
+public class FetchMessagesResult implements Result, Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 8692400285949934424L;
+ private ArrayList<Message> messages;
+ private int start;
+ private int offset;
+ private int realCount;
+ private int realUnreadCount;
+
+ @SuppressWarnings("unused")
+ private FetchMessagesResult() {
+ }
+
+ public FetchMessagesResult(ArrayList<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;
+ }
+
+ public ArrayList<Message> getMessages() {
+ return messages;
+ }
+
+ public int getOffset() {
+ return offset;
+ }
+
+ public int getStart() {
+ return start;
+ }
+
+ public int getRealCount() {
+ return realCount;
+ }
+
+ public int getRealUnreadCount() {
+ return realUnreadCount;
+ }
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/FetchRecentMessages.java (from r1516164, 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/rpc/FetchRecentMessages.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/FetchRecentMessages.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/exception/InvalidSessionException.java&r1=1516164&r2=1516205&rev=1516205&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/rpc/FetchRecentMessages.java Wed Aug 21 16:35:16 2013
@@ -1,29 +1,36 @@
-/****************************************************************
- * 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.exception;
-
-public class InvalidSessionException extends HupaException{
-
- private static final long serialVersionUID = 995112620968798947L;
-
- public InvalidSessionException(String message) {
- super(message);
- }
-}
+/****************************************************************
+ * 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 org.apache.hupa.shared.data.IMAPFolder;
+
+public class FetchRecentMessages extends FetchMessages{
+
+ private static final long serialVersionUID = 4380357285905033821L;
+
+ protected FetchRecentMessages() {
+ }
+
+ public FetchRecentMessages(IMAPFolder folder, int start,
+ int offset, String searchString) {
+ super(folder, start, offset, searchString);
+ }
+
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/ForwardMessage.java (from r1516164, 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/rpc/ForwardMessage.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/ForwardMessage.java&p1=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/exception/InvalidSessionException.java&r1=1516164&r2=1516205&rev=1516205&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/rpc/ForwardMessage.java Wed Aug 21 16:35:16 2013
@@ -17,13 +17,32 @@
* under the License. *
****************************************************************/
-package org.apache.hupa.shared.exception;
-public class InvalidSessionException extends HupaException{
+package org.apache.hupa.shared.rpc;
- private static final long serialVersionUID = 995112620968798947L;
+import org.apache.hupa.shared.data.IMAPFolder;
+import org.apache.hupa.shared.data.SMTPMessage;
- public InvalidSessionException(String message) {
- super(message);
+public class ForwardMessage extends SendMessage {
+
+ private static final long serialVersionUID = 1656671247843122192L;
+ private long uid;
+ private IMAPFolder folder;
+
+ public ForwardMessage(SMTPMessage msg, IMAPFolder folder, long uid) {
+ super(msg);
+ this.uid = uid;
+ this.folder = folder;
+ }
+
+ protected ForwardMessage() {
+ }
+
+ public long getReplyMessageUid() {
+ return uid;
+ }
+
+ public IMAPFolder getFolder() {
+ return folder;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org