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 [9/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...
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/GenericResult.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/GenericResult.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/GenericResult.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/GenericResult.java Wed Aug 21 16:35:16 2013
@@ -17,13 +17,46 @@
* 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);
+public class GenericResult implements Result, Serializable {
+
+ private static final long serialVersionUID = 405509532584299203L;
+ private String message = null;
+ private boolean success = true;
+
+ public GenericResult() {
+ }
+
+ public GenericResult(String message, boolean success) {
+ this.message = message;
+ this.success = success;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public boolean isSuccess() {
+ return success;
}
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public void setSuccess(boolean success) {
+ this.success = success;
+ }
+
+ public void setError(String message) {
+ setMessage(message);
+ setSuccess(false);
+ }
+
+
}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/GetMessageDetails.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/GetMessageDetails.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/GetMessageDetails.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/GetMessageDetails.java Wed Aug 21 16:35:16 2013
@@ -1,29 +1,66 @@
-/****************************************************************
- * 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 GetMessageDetails implements Action<GetMessageDetailsResult>, Serializable {
+
+ private static final long serialVersionUID = 5826298202494313834L;
+ private IMAPFolder folder;
+ private long uid;
+
+ public GetMessageDetails(IMAPFolder folder, long uid) {
+ this.folder = folder;
+ this.uid = uid;
+ }
+
+ @SuppressWarnings("unused")
+ private GetMessageDetails() {
+ }
+
+ public IMAPFolder getFolder() {
+ return folder;
+ }
+
+ public long getUid() {
+ return uid;
+ }
+
+ public boolean equals(Object obj) {
+ if (obj instanceof GetMessageDetails) {
+ GetMessageDetails action = (GetMessageDetails) 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/rpc/GetMessageDetailsResult.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/GetMessageDetailsResult.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/GetMessageDetailsResult.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/GetMessageDetailsResult.java Wed Aug 21 16:35:16 2013
@@ -1,29 +1,49 @@
-/****************************************************************
- * 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.MessageDetails;
+
+import net.customware.gwt.dispatch.shared.Result;
+
+public class GetMessageDetailsResult implements Result, Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 6738085246457556043L;
+ private MessageDetails message;
+
+ @SuppressWarnings("unused")
+ private GetMessageDetailsResult() {
+
+ }
+
+ public GetMessageDetailsResult(MessageDetails message) {
+ this.message = message;
+ }
+
+ public MessageDetails getMessageDetails() {
+ return message;
+ }
+
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/Idle.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/Idle.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/Idle.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/Idle.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 Idle implements Action<IdleResult>, Serializable {
+
+ private static final long serialVersionUID = 4076791577558340559L;
+
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/IdleResult.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/IdleResult.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/IdleResult.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/IdleResult.java Wed Aug 21 16:35:16 2013
@@ -1,29 +1,48 @@
-/****************************************************************
- * 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.Result;
+
+public class IdleResult implements Result, Serializable {
+
+ private static final long serialVersionUID = 5530385273335407315L;
+ private boolean supported;
+
+ protected IdleResult() {
+
+ }
+
+ public IdleResult(boolean supported) {
+ this.supported = supported;
+ }
+
+ /**
+ * Return if the IDLE command is supported by the server
+ *
+ * @return supported
+ */
+ public boolean isSupported() {
+ return supported;
+ }
+
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/LoginUser.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/LoginUser.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/LoginUser.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/LoginUser.java Wed Aug 21 16:35:16 2013
@@ -1,29 +1,57 @@
-/****************************************************************
- * 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 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/rpc/LoginUserResult.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/LoginUserResult.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/LoginUserResult.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/LoginUserResult.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 net.customware.gwt.dispatch.shared.Result;
+
+import org.apache.hupa.shared.data.User;
+
+public class LoginUserResult implements Result, Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -8740775403377441876L;
+ private User user;
+
+ public LoginUserResult(User user) {
+ this.user = user;
+ }
+
+ @SuppressWarnings("unused")
+ private LoginUserResult() {}
+
+ public User getUser() {
+ return user;
+ }
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/LogoutUser.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/LogoutUser.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/LogoutUser.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/LogoutUser.java Wed Aug 21 16:35:16 2013
@@ -1,29 +1,34 @@
-/****************************************************************
- * 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 LogoutUser implements Action<LogoutUserResult>, Serializable {
+
+ private static final long serialVersionUID = 2255166545722718094L;
+
+ public LogoutUser() {
+ }
+
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/LogoutUserResult.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/LogoutUserResult.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/LogoutUserResult.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/LogoutUserResult.java Wed Aug 21 16:35:16 2013
@@ -1,29 +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.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.Result;
+
+import org.apache.hupa.shared.data.User;
+
+public class LogoutUserResult implements Result, Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -1788523843461596092L;
+ private User user;
+
+ public LogoutUserResult(User user) {
+ this.user = user;
+ }
+
+ @SuppressWarnings("unused")
+ private LogoutUserResult() {
+ }
+
+ public User getUser() {
+ return user;
+ }
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/MoveMessage.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/MoveMessage.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/MoveMessage.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/MoveMessage.java Wed Aug 21 16:35:16 2013
@@ -1,29 +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.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 MoveMessage implements Action<MoveMessageResult>, Serializable {
+
+ private static final long serialVersionUID = 7771146077050895244L;
+ private IMAPFolder oldFolder;
+ private IMAPFolder newFolder;
+ private long messageUid;
+
+ public MoveMessage(IMAPFolder oldFolder, IMAPFolder newFolder, long messageUid) {
+ this.oldFolder = oldFolder;
+ this.newFolder = newFolder;
+ this.messageUid = messageUid;
+ }
+
+ protected MoveMessage() {
+ }
+
+ public long getMessageUid() {
+ return messageUid;
+ }
+
+ public IMAPFolder getOldFolder() {
+ return oldFolder;
+ }
+
+ public IMAPFolder getNewFolder() {
+ return newFolder;
+ }
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/MoveMessageResult.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/MoveMessageResult.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/MoveMessageResult.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/MoveMessageResult.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.rpc;
+
+public class MoveMessageResult extends GenericResult{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 341407423455525004L;
+
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/RawMessage.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/RawMessage.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/RawMessage.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/RawMessage.java Wed Aug 21 16:35:16 2013
@@ -17,13 +17,50 @@
* 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 java.io.Serializable;
- public InvalidSessionException(String message) {
- super(message);
+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());
}
+
}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/RawMessageResult.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/RawMessageResult.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/RawMessageResult.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/RawMessageResult.java Wed Aug 21 16:35:16 2013
@@ -17,13 +17,31 @@
* 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);
+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;
}
+
}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/RenameFolder.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/RenameFolder.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/RenameFolder.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/RenameFolder.java Wed Aug 21 16:35:16 2013
@@ -17,13 +17,34 @@
* 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 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;
}
}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/ReplyMessage.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/ReplyMessage.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/ReplyMessage.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/ReplyMessage.java Wed Aug 21 16:35:16 2013
@@ -17,13 +17,22 @@
* 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 ReplyMessage extends ForwardMessage {
+
+ private static final long serialVersionUID = -383135476236902779L;
+
+
+ public ReplyMessage(SMTPMessage msg, IMAPFolder folder, long uid) {
+ super(msg, folder, uid);
+ }
+
+ protected ReplyMessage() {
}
+
}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/SendMessage.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/SendMessage.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/SendMessage.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/SendMessage.java Wed Aug 21 16:35:16 2013
@@ -1,29 +1,51 @@
-/****************************************************************
- * 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.SMTPMessage;
+
+public class SendMessage implements Action<GenericResult>, Serializable {
+
+ private static final long serialVersionUID = 973668124208945015L;
+
+ private SMTPMessage msg;
+
+ public SendMessage(SMTPMessage msg) {
+ this.msg = msg;
+ }
+
+ protected SendMessage() {
+
+ }
+
+ public SMTPMessage getMessage() {
+ return msg;
+ }
+
+ public void setMessage(SMTPMessage msg) {
+ this.msg = msg;
+ }
+
+}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/SetFlag.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/SetFlag.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/SetFlag.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/SetFlag.java Wed Aug 21 16:35:16 2013
@@ -17,13 +17,46 @@
* under the License. *
****************************************************************/
-package org.apache.hupa.shared.exception;
+package org.apache.hupa.shared.rpc;
-public class InvalidSessionException extends HupaException{
+import java.io.Serializable;
+import java.util.ArrayList;
- 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;
+import org.apache.hupa.shared.data.Message.IMAPFlag;
+
+public class SetFlag implements Action<GenericResult>, Serializable {
+
+ private static final long serialVersionUID = 662741801793895357L;
+ private IMAPFlag flag;
+ private ArrayList<Long> uids;
+ private IMAPFolder folder;
+ private boolean value;
+
+ public SetFlag(IMAPFolder folder, IMAPFlag flag, boolean value, ArrayList<Long> uids) {
+ this.flag = flag;
+ this.value = value;
+ this.uids = uids;
+ this.folder = folder;
+ }
+
+ protected SetFlag() {
+ }
+
+ public IMAPFolder getFolder() {
+ return folder;
+ }
+
+ public boolean getValue() {
+ return value;
+ }
+ public IMAPFlag getFlag() {
+ return flag;
+ }
+
+ public ArrayList<Long> getUids() {
+ return uids;
}
}
Copied: james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/TagMessage.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/TagMessage.java?p2=james/hupa/trunk/shared/src/main/java/org/apache/hupa/shared/rpc/TagMessage.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/TagMessage.java Wed Aug 21 16:35:16 2013
@@ -17,13 +17,43 @@
* 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 java.io.Serializable;
+import java.util.ArrayList;
- public InvalidSessionException(String message) {
- super(message);
+import net.customware.gwt.dispatch.shared.Action;
+
+import org.apache.hupa.shared.data.IMAPFolder;
+import org.apache.hupa.shared.data.Tag;
+
+public class TagMessage implements Action<GenericResult>, Serializable {
+
+ private static final long serialVersionUID = 4323236257115412763L;
+ private IMAPFolder folder;
+ private ArrayList<Long> messageUids;
+ private Tag tag;
+
+ protected TagMessage() {
+ }
+
+ public TagMessage(Tag tag, IMAPFolder folder, ArrayList<Long> messageUids) {
+ this.tag = tag;
+ this.folder = folder;
+ this.messageUids = messageUids;
}
+
+ public Tag getTag() {
+ return tag;
+ }
+
+ public IMAPFolder getFolder() {
+ return folder;
+ }
+
+ public ArrayList<Long> getMessageUids() {
+ return messageUids;
+ }
+
}
Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/ui/PagingOptions.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/ui/PagingOptions.java?rev=1516205&view=auto
==============================================================================
--- james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/ui/PagingOptions.java (added)
+++ james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/ui/PagingOptions.java Wed Aug 21 16:35:16 2013
@@ -0,0 +1,261 @@
+/****************************************************************
+ * 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.widgets.ui;
+
+import org.apache.hupa.widgets.PagingOptionsConstants;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.gen2.table.client.PagingScrollTable;
+import com.google.gwt.gen2.table.client.TableModel;
+import com.google.gwt.gen2.table.event.client.PageChangeEvent;
+import com.google.gwt.gen2.table.event.client.PageChangeHandler;
+import com.google.gwt.gen2.table.event.client.PageCountChangeEvent;
+import com.google.gwt.gen2.table.event.client.PageCountChangeHandler;
+import com.google.gwt.gen2.table.event.client.PageLoadEvent;
+import com.google.gwt.gen2.table.event.client.PageLoadHandler;
+import com.google.gwt.gen2.table.event.client.PagingFailureEvent;
+import com.google.gwt.gen2.table.event.client.PagingFailureHandler;
+import com.google.gwt.gen2.table.event.client.RowCountChangeEvent;
+import com.google.gwt.gen2.table.event.client.RowCountChangeHandler;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.SimplePanel;
+
+/**
+ * PagingOptions for using to control the PagingScrollTable
+ *
+ */
+public class PagingOptions extends Composite {
+ private HorizontalPanel pagingPanel = new HorizontalPanel();
+ private EnableHyperlink firstLink;
+ private EnableHyperlink prevLink;
+ private EnableHyperlink lastLink;
+ private EnableHyperlink nextLink;
+ private Label text = new Label();
+ private int currentPage = 1;
+ private Loading loading = null;
+ private SimplePanel panel = new SimplePanel();
+
+ public PagingOptions(final PagingScrollTable<?> table, PagingOptionsConstants constants, Loading loading) {
+ this.loading = loading;
+ firstLink = new EnableHyperlink("<< " + constants.pageFirst(),"");
+ prevLink = new EnableHyperlink("< " + constants.pagePrev(),"");
+ lastLink = new EnableHyperlink(constants.pageLast() + " >>","");
+ nextLink = new EnableHyperlink(constants.pageNext() + " >","");
+ pagingPanel.setSpacing(3);
+
+ pagingPanel.add(panel);
+ pagingPanel.add(firstLink);
+ pagingPanel.add(prevLink);
+ pagingPanel.add(nextLink);
+ pagingPanel.add(lastLink);
+ panel.setWidget(text);
+ panel.setWidth("100px");
+ pagingPanel.setCellHorizontalAlignment(panel, HorizontalPanel.ALIGN_CENTER);
+ firstLink.setEnabled(false);
+ prevLink.setEnabled(false);
+ lastLink.setEnabled(false);
+ nextLink.setEnabled(false);
+
+ table.addPageCountChangeHandler(new PageCountChangeHandler() {
+
+ public void onPageCountChange(PageCountChangeEvent event) {
+ int startCount = currentPage * table.getPageSize() + 1;
+
+ int endCount = currentPage * table.getPageSize() + table.getPageSize();
+
+ int rows = table.getTableModel().getRowCount();
+ updateControl(startCount, endCount, rows);
+ }
+
+ });
+
+
+ table.addPageChangeHandler(new PageChangeHandler() {
+
+ public void onPageChange(PageChangeEvent event) {
+ loading(true);
+
+ currentPage = event.getNewPage();
+ int startCount = currentPage * table.getPageSize() + 1;
+
+ int endCount = currentPage * table.getPageSize() + table.getPageSize();
+ int rows = table.getTableModel().getRowCount();
+
+
+ updateControl(startCount, endCount, rows);
+ }
+ });
+
+ table.addPageLoadHandler(new PageLoadHandler() {
+
+ public void onPageLoad(PageLoadEvent event) {
+ loading(false);
+ }
+
+ });
+
+ table.addPagingFailureHandler(new PagingFailureHandler() {
+
+ public void onPagingFailure(PagingFailureEvent event) {
+ loading(false);
+ }
+
+ });
+
+ firstLink.addClickHandler(new ClickHandler() {
+
+ public void onClick(ClickEvent event) {
+ table.gotoFirstPage();
+ }
+
+ });
+
+ prevLink.addClickHandler(new ClickHandler() {
+
+ public void onClick(ClickEvent event) {
+ table.gotoPreviousPage();
+ }
+
+ });
+
+ nextLink.addClickHandler(new ClickHandler() {
+
+ public void onClick(ClickEvent event) {
+ table.gotoNextPage();
+ }
+
+ });
+
+ lastLink.addClickHandler(new ClickHandler() {
+
+ public void onClick(ClickEvent event) {
+ table.gotoLastPage();
+ }
+
+ });
+
+ table.getTableModel().addRowCountChangeHandler(new RowCountChangeHandler() {
+
+ public void onRowCountChange(RowCountChangeEvent event) {
+ int startCount = currentPage * table.getPageSize() + 1;
+
+ int endCount = currentPage * table.getPageSize() + table.getPageSize();
+
+ int rows =event.getNewRowCount();
+ updateControl(startCount, endCount, rows);
+
+ }
+
+ });
+ initWidget(pagingPanel);
+ }
+
+
+ protected void loading(boolean isLoading) {
+ if (loading != null) {
+ if (isLoading)
+ loading.show();
+ else
+ loading.hide();
+ }
+ }
+
+ protected void updateControl(int startCount, int endCount, int rows) {
+ if (rows == TableModel.UNKNOWN_ROW_COUNT) {
+ startCount = 0;
+ endCount = 0;
+ rows = 0;
+ }
+
+ if (rows < endCount) {
+ endCount = rows;
+ }
+
+ if (endCount == 0) {
+ startCount = 0;
+ }
+
+ if (startCount <= 1) {
+ firstLink.setEnabled(false);
+ prevLink.setEnabled(false);
+ } else {
+ firstLink.setEnabled(true);
+ prevLink.setEnabled(true);
+ }
+
+ if (rows > endCount) {
+ lastLink.setEnabled(true);
+ nextLink.setEnabled(true);
+ } else {
+ lastLink.setEnabled(false);
+ nextLink.setEnabled(false);
+ }
+ text.setText(startCount + " - " + endCount + " of " + rows);
+
+ }
+
+ /**
+ * Reset the currentPage to 0
+ */
+ public void reset() {
+ currentPage = 0;
+ text.setText("0 - 0 of 0");
+ }
+
+ /**
+ * Return the Link to navigate to the first page
+ *
+ * @return firstLink
+ */
+ public EnableHyperlink getFirstLink() {
+ return firstLink;
+ }
+
+ /**
+ * Return the Link to navigate to the previous page
+ *
+ * @return prevLink
+ */
+ public EnableHyperlink getPrevLink() {
+ return prevLink;
+ }
+
+ /**
+ * Return the Link to navigate to the next page
+ *
+ * @return nextLink
+ */
+ public EnableHyperlink getNextLink() {
+ return nextLink;
+ }
+
+ /**
+ * Return the Link to navigate to the last page
+ *
+ * @return lastLink
+ */
+ public EnableHyperlink getLastLink() {
+ return lastLink;
+ }
+
+}
Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/ui/RefetchPagingScrollTable.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/ui/RefetchPagingScrollTable.java?rev=1516205&view=auto
==============================================================================
--- james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/ui/RefetchPagingScrollTable.java (added)
+++ james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/ui/RefetchPagingScrollTable.java Wed Aug 21 16:35:16 2013
@@ -0,0 +1,144 @@
+/****************************************************************
+ * 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.widgets.ui;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+
+import com.google.gwt.gen2.table.client.FixedWidthFlexTable;
+import com.google.gwt.gen2.table.client.FixedWidthGrid;
+import com.google.gwt.gen2.table.client.MutableTableModel;
+import com.google.gwt.gen2.table.client.PagingScrollTable;
+import com.google.gwt.gen2.table.client.TableDefinition;
+import com.google.gwt.gen2.table.client.TableModel.Callback;
+import com.google.gwt.gen2.table.client.TableModelHelper.Request;
+import com.google.gwt.gen2.table.client.TableModelHelper.Response;
+import com.google.gwt.gen2.table.event.client.RowSelectionEvent;
+import com.google.gwt.gen2.table.event.client.RowSelectionHandler;
+import com.google.gwt.gen2.table.event.client.TableEvent.Row;
+
+/**
+ * PagingScrollTable which refetch a row after one is deleted. This ensure that always the configured page
+ * size is shown.
+ *
+ *
+ *
+ */
+public class RefetchPagingScrollTable<RowType> extends PagingScrollTable<RowType>{
+ private ArrayList<RowType> selectedRows = new ArrayList<RowType>();
+
+
+ public RefetchPagingScrollTable(MutableTableModel<RowType> tableModel,
+ FixedWidthGrid dataTable, FixedWidthFlexTable headerTable,
+ TableDefinition<RowType> tableDefinition) {
+ super(tableModel, dataTable, headerTable, tableDefinition);
+
+ getDataTable().addRowSelectionHandler(new RowSelectionHandler() {
+
+ public void onRowSelection(RowSelectionEvent event) {
+ Iterator<Row> rowIndexIt = event.getSelectedRows().iterator();
+ while(rowIndexIt.hasNext()) {
+ RowType row = getRowValue(rowIndexIt.next().getRowIndex());
+ if (selectedRows.contains(row) == false) {
+ selectedRows.add(row);
+ }
+ }
+
+ Iterator<Row> rowDeselectIndexIt = event.getDeselectedRows().iterator();
+ while(rowDeselectIndexIt.hasNext()) {
+ RowType row = getRowValue(rowDeselectIndexIt.next().getRowIndex());
+ selectedRows.remove(row);
+ }
+ }
+
+ });
+ }
+
+ /**
+ * Get selected rows
+ *
+ * @return rows
+ */
+ public ArrayList<RowType> getSelectedRows() {
+ return selectedRows;
+ }
+
+ /**
+ * Remove the given rows from the underlying dataTable
+ *
+ * @param rows
+ */
+ public void removeRows(ArrayList<RowType> rows) {
+ ArrayList<Integer> rowsIndex = new ArrayList<Integer>();
+ for (RowType rowType : rows) {
+ int rowIndex = getRowValues().indexOf(rowType);
+ if (rowsIndex.contains(rowIndex) == false) {
+ rowsIndex.add(rowIndex);
+ }
+ }
+ // Check if we found any rows to remove
+ if (rowsIndex.isEmpty() == false) {
+ // remove the row value on deletion
+ for (int i = 0; i <rowsIndex.size();i++) {
+ int index = rowsIndex.get(i) -i;
+ selectedRows.remove(getRowValue(index));
+ getRowValues().remove(index);
+
+ ((MutableTableModel<RowType>) getTableModel()).removeRow(index);
+ }
+
+ // Check if we need to refetch rows
+ if (getTableModel().getRowCount() >= getPageSize()) {
+ // request new rows to fill the table again
+ Request r = new Request(getAbsoluteLastRowIndex() +1,rowsIndex.size());
+ getTableModel().requestRows(r, new Callback<RowType>() {
+
+ public void onFailure(Throwable caught) {
+ // Nothing todo
+ }
+
+ public void onRowsReady(Request request,
+ Response<RowType> response) {
+ // Add the new row values
+ Iterator<RowType> it = response.getRowValues();
+ while (it.hasNext()) {
+ getRowValues().add(it.next());
+ }
+ // copy the selected rows to reset it after reloading the data
+ Iterator<Integer> selected = new HashSet<Integer>(getDataTable().getSelectedRows()).iterator();
+
+ // set the data
+ setData(getAbsoluteFirstRowIndex(), getRowValues().iterator());
+
+ // select the rows again
+ while (selected.hasNext()) {
+ getDataTable().selectRow(selected.next(), false);
+ }
+ }
+
+ });
+ } else {
+ // redraw the table to eliminate empty rows
+ redraw();
+ }
+ }
+ }
+}
Copied: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/ui/impl/RndPanelGeneratorImpl.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/widgets/src/main/java/org/apache/hupa/widgets/ui/impl/RndPanelGeneratorImpl.java?p2=james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/ui/impl/RndPanelGeneratorImpl.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/widgets/src/main/java/org/apache/hupa/widgets/ui/impl/RndPanelGeneratorImpl.java Wed Aug 21 16:35:16 2013
@@ -1,29 +1,57 @@
-/****************************************************************
- * 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.widgets.ui.impl;
+
+import org.apache.hupa.widgets.WidgetsCSS;
+
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.Panel;
+
+/**
+ * Simple generator of rounded panels using css.
+ * It works in FF, safari, chrome and opera.
+ *
+ * It is needed to define this in your css.
+ * <pre>
+ * div.hupa-rounded {
+ * border: 1px solid #7FAAFF
+ * -moz-border-radius: 8px;
+ * -webkit-border-radius: 6px;
+ * }
+ * </pre>
+ *
+ */
+public class RndPanelGeneratorImpl implements RndPanelGenerator {
+
+ public Panel roundPanel(Panel panel) {
+ panel.addStyleName(WidgetsCSS.C_hupa_rnd_container);
+ return panel;
+ }
+
+ public FlowPanel createPanel() {
+ return new FlowPanel() {
+ @Override
+ public void setStyleName(String style) {
+ super.setStyleName(style);
+ super.addStyleName(WidgetsCSS.C_hupa_rnd_container);
+ }
+ };
+ }
+}
Added: james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/ui/impl/RndPanelGeneratorImplIE.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/ui/impl/RndPanelGeneratorImplIE.java?rev=1516205&view=auto
==============================================================================
--- james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/ui/impl/RndPanelGeneratorImplIE.java (added)
+++ james/hupa/trunk/widgets/src/main/java/org/apache/hupa/widgets/ui/impl/RndPanelGeneratorImplIE.java Wed Aug 21 16:35:16 2013
@@ -0,0 +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.widgets.ui.impl;
+
+import org.cobogw.gwt.user.client.ui.RoundedLinePanel;
+import org.cobogw.gwt.user.client.ui.RoundedPanel;
+
+import com.google.gwt.user.client.Element;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.Panel;
+import com.google.gwt.user.client.ui.Widget;
+/**
+ * Generator of rounded panels using cobogw library.
+ *
+ * It decorates the panel adding html elements because IE
+ * doesn't support css rounded corners.
+ *
+ * TODO: look for a way to make border color configurable in css
+ *
+ */
+public class RndPanelGeneratorImplIE implements RndPanelGenerator {
+
+ static class MyRoundedLinePanel extends RoundedLinePanel {
+ public MyRoundedLinePanel(int a, int b) {
+ super(a,b);
+ }
+ public void addStyleName(String style){
+ super.addStyleName(style);
+ Element elem = super.getContainerElement();
+ elem.setClassName(elem.getClassName() + " cgb-RPC-" + style);
+ }
+ };
+
+ public FlowPanel createPanel() {
+ return new FlowPanel();
+ }
+
+ public Widget roundPanel(Panel panel) {
+ MyRoundedLinePanel rp = new MyRoundedLinePanel(RoundedPanel.ALL, 3);
+ rp.setCornerColor("#7FAAFF", "");
+ rp.setWidget(panel);
+ return rp;
+ }
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org