View Javadoc

1   /*
2    * Copyright 2001-2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.apache.juddi.datatype.request;
17  
18  import java.util.Vector;
19  
20  import org.apache.juddi.datatype.BusinessKey;
21  import org.apache.juddi.datatype.RegistryObject;
22  
23  /***
24   * "Used to get the full businessEntity information for one or more
25   *  businesses. Returns a businessDetail message."
26   *
27   * @author Steve Viens (sviens@apache.org)
28   */
29  public class GetBusinessDetail implements RegistryObject,Inquiry
30  {
31    String generic;
32    Vector businessKeyVector;
33  
34    /***
35     * Construct a new empty get_businessDetail request.
36     */
37    public GetBusinessDetail()
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 BusinessKey to the collection of BusinessKeys
61     *
62     * @param key The new BusinessKey to add
63     */
64    public void addBusinessKey(BusinessKey key)
65    {
66      if ((key != null) && (key.getValue() != null))
67        addBusinessKey(key.getValue());
68    }
69  
70    /***
71     * Add a reference to an extended business entity.
72     *
73     * @param key The key of the referenced extended business entity.
74     * @throws ClassCastException If the given key is not a businesskey.
75     */
76    public void addBusinessKey(String key)
77    {
78      if (businessKeyVector == null)
79        businessKeyVector = new Vector();
80      businessKeyVector.add(key);
81    }
82  
83    /***
84     * Returns the BusinessKey Vector
85     */
86    public Vector getBusinessKeyVector()
87    {
88      return this.businessKeyVector;
89    }
90  
91    /***
92     * Sets the BusinessKey Vector
93     *
94     * @param keys The new collection of BusinessKeys
95     */
96    public void setBusinessKeyVector(Vector keys)
97    {
98      this.businessKeyVector = keys;
99    }
100 }