1 package cz.cuni.amis.pogamut.usar2004.communication.messages.usarcommands;
2
3 import cz.cuni.amis.pogamut.base.communication.messages.*;
4 import cz.cuni.amis.pogamut.usar2004.communication.messages.datatypes.CustomTypes.*;
5
6
7
8
9
10
11
12
13
14 public class GetConf extends CommandMessage
15 {
16 public GetConf(String Type, String Name)
17 {
18 this.Type = Type;
19 this.Name = Name;
20 }
21
22
23
24
25
26 public GetConf()
27 {
28 }
29
30 protected String Type = null;
31
32 public String getType()
33 {
34 return Type;
35 }
36
37 public GetConf setType(String Type)
38 {
39 this.Type = Type;
40 return this;
41 }
42
43
44
45
46
47 protected String Name = null;
48
49 public String getName()
50 {
51 return Name;
52 }
53
54 public GetConf setName(String Name)
55 {
56 this.Name = Name;
57 return this;
58 }
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74 public GetConf(GetConf original)
75 {
76 this.Type = original.Type;
77 this.Name = original.Name;
78 }
79
80 @Override
81 public String toString()
82 {
83 return toMessage();
84 }
85
86 public String toHtmlString()
87 {
88 return super.toString()
89 + "<b>Type</b> : "
90 + String.valueOf(Type)
91 + " <br/> "
92 + "<b>Name</b> : "
93 + String.valueOf(Name)
94 + " <br/> "
95 + "";
96 }
97
98 public String toMessage()
99 {
100 StringBuilder buf = new StringBuilder();
101
102 buf.append("GETCONF");
103
104 if(Type != null)
105 {
106 buf.append(" {Type ").append(Type).append("}");
107 }
108
109 if(Name != null)
110 {
111 buf.append(" {Name ").append(Name).append("}");
112 }
113
114 return buf.toString();
115 }
116 }