KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > juddi > datatype > subscription > Subscription


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.subscription;
17
18 import java.util.Date JavaDoc;
19
20 import org.apache.juddi.datatype.BindingKey;
21 import org.apache.juddi.datatype.RegistryObject;
22
23 /**
24  * Example:
25  *
26  * <subscription brief="true">
27  * <subscriptionFilter>
28  * <find_service xmlns="urn:uddi-org:api_v3" >
29  * <categoryBag>
30  * <keyedReference
31  * tModeKey="uddi:ubr.uddi.org: taxonomy:unspsc"
32  * keyName="Beer"
33  * keyValue="50.20.20.02.00"/>
34  * </categoryBag>
35  * </find_service>
36  * </subscriptionFilter>
37  * <bindingKey>
38  * BindingKey of the subscribers NotifySubscriptionListener service
39  * </bindingKey>
40  * <notificationInterval>P1D</notificationInterval>
41  * <maxEntities>1000</maxEntities>
42  * <expiresAfter>20030101T00:00:00</expiresAfter>
43  * </subscription>
44  *
45  * @author Steve Viens (sviens@apache.org)
46  */

47 public class Subscription implements RegistryObject
48 {
49   String JavaDoc subscriptionKey;
50   SubscriptionFilter subscriptionFilter;
51   String JavaDoc notificationInterval;
52   int maxEntities;
53   Date JavaDoc expiresAfter;
54   BindingKey bindingKey;
55   boolean brief;
56
57   /**
58    * default constructor
59    */

60   public Subscription()
61   {
62   }
63
64   /**
65    * @return Returns the subscriptionKey.
66    */

67   public String JavaDoc getSubscriptionKey()
68   {
69     return subscriptionKey;
70   }
71
72   /**
73    * @param subscriptionKey The subscriptionKey to set.
74    */

75   public void setSubscriptionKey(String JavaDoc subscriptionKey)
76   {
77     this.subscriptionKey = subscriptionKey;
78   }
79
80   /**
81    * @return Returns the bindingKey.
82    */

83   public BindingKey getBindingKey()
84   {
85     return bindingKey;
86   }
87
88   /**
89    * @param bindingKey The bindingKey to set.
90    */

91   public void setBindingKey(BindingKey bindingKey)
92   {
93     this.bindingKey = bindingKey;
94   }
95
96   /**
97    * @return Returns the brief.
98    */

99   public boolean isBrief()
100   {
101     return brief;
102   }
103
104   /**
105    * @param brief The brief to set.
106    */

107   public void setBrief(boolean brief)
108   {
109     this.brief = brief;
110   }
111
112   /**
113    * @return Returns the expiresAfter.
114    */

115   public Date JavaDoc getExpiresAfter()
116   {
117     return expiresAfter;
118   }
119
120   /**
121    * @param expiresAfter The expiresAfter to set.
122    */

123   public void setExpiresAfter(Date JavaDoc expiresAfter)
124   {
125     this.expiresAfter = expiresAfter;
126   }
127
128   /**
129    * @return Returns the maxEntities.
130    */

131   public int getMaxEntities()
132   {
133     return maxEntities;
134   }
135
136   /**
137    * @param maxEntities The maxEntities to set.
138    */

139   public void setMaxEntities(int maxEntities)
140   {
141     this.maxEntities = maxEntities;
142   }
143
144   /**
145    * @return Returns the notificationInterval.
146    */

147   public String JavaDoc getNotificationInterval()
148   {
149     return notificationInterval;
150   }
151
152   /**
153    * @param notificationInterval The notificationInterval to set.
154    */

155   public void setNotificationInterval(String JavaDoc notificationInterval)
156   {
157     this.notificationInterval = notificationInterval;
158   }
159
160   /**
161    * @return Returns the subscriptionFilter.
162    */

163   public SubscriptionFilter getSubscriptionFilter()
164   {
165     return subscriptionFilter;
166   }
167
168   /**
169    * @param subscriptionFilter The subscriptionFilter to set.
170    */

171   public void setSubscriptionFilter(SubscriptionFilter subscriptionFilter)
172   {
173     this.subscriptionFilter = subscriptionFilter;
174   }
175 }
Popular Tags