KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > juddi > datatype > request > DeleteSubscription


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 JavaDoc;
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 DeleteSubscription implements RegistryObject,Subscribe
29 {
30   String JavaDoc generic;
31   AuthInfo authInfo;
32   Vector JavaDoc subscriptionKeyVector;
33
34   /**
35    *
36    */

37   public DeleteSubscription()
38   {
39   }
40
41
42   /**
43    *
44    */

45   public DeleteSubscription(AuthInfo authInfo,String JavaDoc subscriptionKey)
46   {
47     setAuthInfo(authInfo);
48     addSubscriptionKey(subscriptionKey);
49   }
50
51   /**
52    *
53    */

54   public DeleteSubscription(AuthInfo authInfo,Vector JavaDoc subscriptionKeys)
55   {
56     setAuthInfo(authInfo);
57     setSubscriptionKeyVector(subscriptionKeys);
58   }
59
60   /**
61    *
62    * @param genericValue
63    */

64   public void setGeneric(String JavaDoc genericValue)
65   {
66     this.generic = genericValue;
67   }
68
69   /**
70    *
71    * @return String request's generic value.
72    */

73   public String JavaDoc getGeneric()
74   {
75     return this.generic;
76   }
77
78   /**
79    *
80    */

81   public void setAuthInfo(AuthInfo authInfo)
82   {
83     this.authInfo = authInfo;
84   }
85
86   /**
87    *
88    */

89   public AuthInfo getAuthInfo()
90   {
91     return this.authInfo;
92   }
93
94   /**
95    *
96    */

97   public void addSubscriptionKey(SubscriptionKey subscriptionKey)
98   {
99     if ((subscriptionKey != null) && (subscriptionKey.getValue() != null))
100       addSubscriptionKey(subscriptionKey.getValue());
101   }
102
103   /**
104    *
105    */

106   public void addSubscriptionKey(String JavaDoc subscriptionKey)
107   {
108     if (this.subscriptionKeyVector == null)
109       this.subscriptionKeyVector = new Vector JavaDoc();
110     this.subscriptionKeyVector.add(subscriptionKey);
111   }
112
113   /**
114    *
115    */

116   public void setSubscriptionKeyVector(Vector JavaDoc subscriptionKeys)
117   {
118     this.subscriptionKeyVector = subscriptionKeys;
119   }
120
121   /**
122    *
123    */

124   public Vector JavaDoc getSubscriptionKeyVector()
125   {
126     return this.subscriptionKeyVector;
127   }
128 }
Popular Tags