View Javadoc
1   package info.ejava.examples.secureping.dto;
2   
3   import javax.xml.bind.annotation.XmlRootElement;
4   
5   @XmlRootElement(name="pingResult", namespace="urn:ejava.ejb.security.ping")
6   public class PingResult {
7       private String context;
8       private String userName;
9       private Boolean isAdmin;
10      private Boolean isUser;
11      private String serviceResult;
12      
13      public PingResult() {}
14      public PingResult(String context, String user, Boolean isAdmin, Boolean isUser) {
15          this.context = context;
16          this.userName = user;
17          this.isAdmin = isAdmin;
18          this.isUser = isUser;
19      }
20      
21      public void setServiceResult(String serviceResult) {
22          this.serviceResult = serviceResult;        
23      }
24      public String getContext() {
25          return context;
26      }
27      public void setContext(String context) {
28          this.context = context;
29      }
30      public String getUserName() {
31          return userName;
32      }
33      public void setUserName(String userName) {
34          this.userName = userName;
35      }
36      public Boolean getIsAdmin() {
37          return isAdmin;
38      }
39      public void setIsAdmin(Boolean isAdmin) {
40          this.isAdmin = isAdmin;
41      }
42      public Boolean getIsUser() {
43          return isUser;
44      }
45      public void setIsUser(Boolean isUser) {
46          this.isUser = isUser;
47      }
48      public String getServiceResult() {
49          return serviceResult;
50      }
51      @Override
52      public String toString() {
53          StringBuilder builder = new StringBuilder();
54          builder.append("PingResult [context=").append(context)
55                 .append(", userName=").append(userName)
56                 .append(", isAdmin=").append(isAdmin)
57                 .append(", isUser=").append(isUser)
58                 .append(",\nserviceResult=")
59                 .append(serviceResult).append("]");
60          return builder.toString();
61      }
62  }