1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.juddi.datatype.subscription;
17
18 import java.util.Vector;
19
20 import org.apache.juddi.datatype.BindingKey;
21 import org.apache.juddi.datatype.BusinessKey;
22 import org.apache.juddi.datatype.RegistryObject;
23 import org.apache.juddi.datatype.ServiceKey;
24 import org.apache.juddi.datatype.TModelKey;
25
26 /***
27 * Example:
28 *
29 * <keyBag>
30 * <deleted>false</deleted>
31 * <serviceKey>uddi:BeerSupplies.com:maltSelectionService</serviceKey>
32 * <serviceKey>uddi:Containers.com:kegs:orderingService</serviceKey>
33 * </keyBag>
34 *
35 * @author Steve Viens (sviens@apache.org)
36 */
37 public class KeyBag implements RegistryObject
38 {
39 boolean deleted;
40 Vector tModelKeyVector;
41 Vector businessKeyVector;
42 Vector serviceKeyVector;
43 Vector bindingKeyVector;
44
45 /***
46 * default constructor
47 */
48 public KeyBag()
49 {
50 }
51
52 /***
53 * @return Returns the deleted.
54 */
55 public boolean isDeleted()
56 {
57 return deleted;
58 }
59
60 /***
61 * @param deleted The deleted to set.
62 */
63 public void setDeleted(boolean deleted)
64 {
65 this.deleted = deleted;
66 }
67
68 /***
69 * @return Returns the bindingKeyVector.
70 */
71 public Vector getBindingKeyVector()
72 {
73 return bindingKeyVector;
74 }
75
76 /***
77 * @param bindingKeyVector The bindingKeyVector to set.
78 */
79 public void setBindingKeyVector(Vector bindingKeyVector)
80 {
81 this.bindingKeyVector = bindingKeyVector;
82 }
83
84 /***
85 *
86 */
87 public void addBindingKey(BindingKey bindingKey)
88 {
89 if ((bindingKey != null) && (bindingKey.getValue() != null))
90 this.addBindingKey(bindingKey.getValue());
91 }
92
93 /***
94 *
95 */
96 public void addBindingKey(String bindingKey)
97 {
98 if (this.bindingKeyVector == null)
99 this.bindingKeyVector = new Vector();
100 this.bindingKeyVector.add(bindingKey);
101 }
102
103 /***
104 * @return Returns the businessKeyVector.
105 */
106 public Vector getBusinessKeyVector()
107 {
108 return businessKeyVector;
109 }
110
111 /***
112 * @param businessKeyVector The businessKeyVector to set.
113 */
114 public void setBusinessKeyVector(Vector businessKeyVector)
115 {
116 this.businessKeyVector = businessKeyVector;
117 }
118
119 /***
120 *
121 */
122 public void addBusinessKey(BusinessKey businessKey)
123 {
124 if ((businessKey != null) && (businessKey.getValue() != null))
125 this.addBusinessKey(businessKey.getValue());
126 }
127
128 /***
129 *
130 */
131 public void addBusinessKey(String businessKey)
132 {
133 if (this.businessKeyVector == null)
134 this.businessKeyVector = new Vector();
135 this.businessKeyVector.add(businessKey);
136 }
137
138 /***
139 * @return Returns the serviceKeyVector.
140 */
141 public Vector getServiceKeyVector()
142 {
143 return serviceKeyVector;
144 }
145
146 /***
147 * @param serviceKeyVector The serviceKeyVector to set.
148 */
149 public void setServiceKeyVector(Vector serviceKeyVector)
150 {
151 this.serviceKeyVector = serviceKeyVector;
152 }
153
154 /***
155 *
156 */
157 public void addServiceKey(ServiceKey serviceKey)
158 {
159 if ((serviceKey != null) && (serviceKey.getValue() != null))
160 addServiceKey(serviceKey.getValue());
161 }
162
163 /***
164 *
165 */
166 public void addServiceKey(String serviceKey)
167 {
168 if (this.serviceKeyVector == null)
169 this.serviceKeyVector = new Vector();
170 this.serviceKeyVector.add(serviceKey);
171 }
172
173 /***
174 * @return Returns the tModelKeyVector.
175 */
176 public Vector getTModelKeyVector()
177 {
178 return tModelKeyVector;
179 }
180
181 /***
182 * @param modelKeyVector The tModelKeyVector to set.
183 */
184 public void setTModelKeyVector(Vector modelKeyVector)
185 {
186 tModelKeyVector = modelKeyVector;
187 }
188
189 /***
190 *
191 */
192 public void addTModelKey(TModelKey tModelKey)
193 {
194 if ((tModelKey != null) && (tModelKey.getValue() != null))
195 addTModelKey(tModelKey.getValue());
196 }
197
198 /***
199 *
200 */
201 public void addTModelKey(String tModelKey)
202 {
203 if (this.tModelKeyVector == null)
204 this.tModelKeyVector = new Vector();
205 this.tModelKeyVector.add(tModelKey);
206 }
207 }