1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.juddi.datatype.request;
17
18 import java.util.Vector;
19
20 import org.apache.juddi.datatype.BindingKey;
21 import org.apache.juddi.datatype.RegistryObject;
22
23 /***
24 * "Used to get full bindingTemplate information suitable for make one
25 * or more service requests. Returns a bindingDetail message."
26 *
27 * @author Steve Viens (sviens@apache.org)
28 */
29 public class GetBindingDetail implements RegistryObject,Inquiry
30 {
31 String generic;
32 Vector bindingKeyVector;
33
34 /***
35 * Construct a new empty get_bindingDetail request
36 */
37 public GetBindingDetail()
38 {
39 }
40
41 /***
42 *
43 * @param genericValue
44 */
45 public void setGeneric(String genericValue)
46 {
47 this.generic = genericValue;
48 }
49
50 /***
51 *
52 * @return String UDDI request's generic value.
53 */
54 public String getGeneric()
55 {
56 return this.generic;
57 }
58
59 /***
60 * Add a reference to a bindingTemplate to this search. All the details for the
61 * referenced bindingTemplate will be searched.
62 *
63 * @param key The bindingkey of the referenced bindingTemplate.
64 */
65 public void addBindingKey(BindingKey key)
66 {
67 if ((key != null) && (key.getValue() != null))
68 addBindingKey(key.getValue());
69 }
70
71 /***
72 * Adds a BindingKey to the collection of binding keys used by this query.
73 *
74 * @param key A BindingKey
75 */
76 public void addBindingKey(String key)
77 {
78 if (bindingKeyVector == null)
79 bindingKeyVector = new Vector();
80 bindingKeyVector.add(key);
81 }
82
83 /***
84 * Add a collection of bindingTemplate references to this search. All the details for the
85 * given referenced bindingTemplates will be searched.
86 *
87 * @param keys The collection of bindingkeys.
88 */
89 public void setBindingKeyVector(Vector keys)
90 {
91 this.bindingKeyVector = keys;
92 }
93
94 /***
95 *
96 */
97 public Vector getBindingKeyVector()
98 {
99 return this.bindingKeyVector;
100 }
101
102 /***
103 *
104 */
105 public String toString()
106 {
107 StringBuffer buffer = new StringBuffer();
108
109 if (this.bindingKeyVector != null)
110 for (int i=0; i<this.bindingKeyVector.size(); i++)
111 buffer.append(this.bindingKeyVector.elementAt(i));
112
113 return buffer.toString();
114 }
115 }