01: package org.gridsphere.portletcontainer;
02:
03: /**
04: * @author <a href="mailto:novotny@gridsphere.org">Jason Novotny</a>
05: * @version $Id: PortletStatus.java 6385 2007-10-25 14:02:26Z wehrens $
06: */
07: public class PortletStatus {
08:
09: public static PortletStatus SUCCESS = new PortletStatus("success");
10:
11: public static PortletStatus FAILURE = new PortletStatus("failure");
12:
13: private String status;
14:
15: private PortletStatus(String status) {
16: this .status = status;
17: }
18:
19: public boolean equals(Object o) {
20: if ((o != null) && (o instanceof PortletStatus)) {
21: return (this .status.equals(((PortletStatus) o).toString()));
22: }
23: return false;
24: }
25:
26: public String toString() {
27: return status;
28: }
29:
30: public int hashCode() {
31: return status.hashCode();
32: }
33:
34: }
|