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.RegistryObject;
21  import org.apache.juddi.datatype.subscription.SubscriptionKey;
22  
23  /***
24   * Used to register or update complete information about a publisher.
25   *
26   * @author Steve Viens (sviens@apache.org)
27   */
28  public class GetSubscriptions implements RegistryObject,Subscribe
29  {
30    String generic;
31    AuthInfo authInfo;
32    Vector subscriptionKeyVector;
33  
34    /***
35     *
36     */
37    public GetSubscriptions()
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 request's generic value.
53     */
54    public String getGeneric()
55    {
56      return this.generic;
57    }
58  
59    /***
60     *
61     */
62    public void setAuthInfo(AuthInfo authInfo)
63    {
64      this.authInfo = authInfo;
65    }
66  
67    /***
68     *
69     */
70    public AuthInfo getAuthInfo()
71    {
72      return this.authInfo;
73    }
74  
75    /***
76     *
77     */
78    public Vector getSubscriptionKeyVector()
79    {
80      return this.subscriptionKeyVector;
81    }
82  
83    /***
84     * Add a SubscriptionKey to the collection of SubscriptionKeys
85     *
86     * @param key The new SubscriptionKey to add
87     */
88    public void addSubscriptionKey(SubscriptionKey key)
89    {
90      if ((key != null) && (key.getValue() != null))
91        addSubscriptionKey(key.getValue());
92    }
93  
94    /***
95     * Add a SubscriptionKey to the collection of SubscriptionKeys
96     *
97     * @param key The new SubscriptionKey to add to the collection of SubscriptionKeys
98     */
99    public void addSubscriptionKey(String key)
100   {
101     if (subscriptionKeyVector == null)
102       subscriptionKeyVector = new Vector();
103     subscriptionKeyVector.add(key);
104   }
105 
106   /***
107    * Sets the SubscriptionKey Vector
108    *
109    * @param keys The new collection of SubscriptionKeys
110    */
111   public void setSubscriptionKeyVector(Vector keys)
112   {
113     this.subscriptionKeyVector = keys;
114   }
115 }