KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > webdav > event > WebdavEvent


1 /*
2  * $Header: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/event/WebdavEvent.java,v 1.6 2004/08/05 14:43:30 dflorey Exp $
3  * $Revision: 1.6 $
4  * $Date: 2004/08/05 14:43:30 $
5  *
6  * ====================================================================
7  *
8  * Copyright 2004 The Apache Software Foundation
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */

23
24 package org.apache.slide.webdav.event;
25
26 import java.util.EventListener JavaDoc;
27 import java.util.EventObject JavaDoc;
28
29 import org.apache.slide.event.AbstractEventMethod;
30 import org.apache.slide.event.VetoException;
31 import org.apache.slide.event.VetoableEventMethod;
32
33 /**
34  * Webdav event class
35  *
36  * @version $Revision: 1.6 $
37  */

38 public final class WebdavEvent extends EventObject JavaDoc {
39     public static Get GET = new Get();
40     public static Put PUT = new Put();
41     public static PropFind PROPFIND = new PropFind();
42     public static PropPatch PROPPATCH = new PropPatch();
43     public static Bind BIND = new Bind();
44     public static Rebind REBIND = new Rebind();
45     public static Unbind UNBIND = new Unbind();
46     public static Mkcol MKCOL = new Mkcol();
47     public static Copy COPY = new Copy();
48     public static Move MOVE = new Move();
49     public static Delete DELETE = new Delete();
50     public static Lock LOCK = new Lock();
51     public static Unlock UNLOCK = new Unlock();
52     public static Acl ACL = new Acl();
53     public static Report REPORT = new Report();
54     public static Search SEARCH = new Search();
55     public static VersionControl VERSION_CONTROL = new VersionControl();
56     public static Options OPTIONS = new Options();
57     public static Checkin CHECKIN = new Checkin();
58     public static Checkout CHECKOUT= new Checkout();
59     public static Uncheckout UNCHECKOUT = new Uncheckout();
60     public static Update UPDATE = new Update();
61     public static Label LABEL = new Label();
62     public static Mkworkspace MKWORKSPACE = new Mkworkspace();
63     public static Subscribe SUBSCRIBE = new Subscribe();
64     public static Unsubscribe UNSUBSCRIBE = new Unsubscribe();
65     public static Poll POLL = new Poll();
66
67     public final static String JavaDoc GROUP = "webdav";
68     public final static AbstractEventMethod[] methods = new AbstractEventMethod[] { GET, PUT, PROPFIND, PROPPATCH, BIND,
69                                                                                     UNBIND, REBIND, MKCOL, COPY, MOVE, DELETE, LOCK, UNLOCK, ACL,
70                                                                                     REPORT, SEARCH, VERSION_CONTROL, OPTIONS, CHECKIN, CHECKOUT, UNCHECKOUT,
71                                                                                     UPDATE, LABEL, MKWORKSPACE, SUBSCRIBE, UNSUBSCRIBE, POLL };
72
73     public WebdavEvent(Object JavaDoc source) {
74         super(source);
75     }
76
77     public AbstractEventMethod[] getMethods() {
78         return methods;
79     }
80
81     public String JavaDoc getGroup() {
82         return GROUP;
83     }
84
85     public final static class Get extends VetoableEventMethod {
86         public Get() {
87             super(GROUP, "get");
88         }
89
90         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
91             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).get((WebdavEvent)event);
92         }
93     }
94
95     public final static class Put extends VetoableEventMethod {
96         public Put() {
97             super(GROUP, "put");
98         }
99
100         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
101             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).put((WebdavEvent)event);
102         }
103     }
104
105     public final static class PropFind extends VetoableEventMethod {
106         public PropFind() {
107             super(GROUP, "propfind");
108         }
109
110         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
111             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).propFind((WebdavEvent)event);
112         }
113     }
114
115     public final static class PropPatch extends VetoableEventMethod {
116         public PropPatch() {
117             super(GROUP, "proppatch");
118         }
119
120         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
121             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).propPatch((WebdavEvent)event);
122         }
123     }
124
125     public final static class Bind extends VetoableEventMethod {
126         public Bind() {
127             super(GROUP, "bind");
128         }
129
130         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
131             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).bind((WebdavEvent)event);
132         }
133    }
134
135     public final static class Rebind extends VetoableEventMethod {
136         public Rebind() {
137             super(GROUP, "rebind");
138         }
139
140         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
141             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).rebind((WebdavEvent)event);
142         }
143     }
144
145     public final static class Unbind extends VetoableEventMethod {
146         public Unbind() {
147             super(GROUP, "unbind");
148         }
149
150         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
151             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).unbind((WebdavEvent)event);
152         }
153     }
154
155     public final static class Mkcol extends VetoableEventMethod {
156         public Mkcol() {
157             super(GROUP, "mkcol");
158         }
159
160         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
161             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).mkcol((WebdavEvent)event);
162         }
163     }
164
165     public final static class Copy extends VetoableEventMethod {
166         public Copy() {
167             super(GROUP, "copy");
168         }
169
170         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
171             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).copy((WebdavEvent)event);
172         }
173     }
174
175     public final static class Move extends VetoableEventMethod {
176         public Move() {
177             super(GROUP, "move");
178         }
179
180         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
181             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).move((WebdavEvent)event);
182         }
183     }
184
185     public final static class Delete extends VetoableEventMethod {
186         public Delete() {
187             super(GROUP, "delete");
188         }
189
190         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
191             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).delete((WebdavEvent)event);
192         }
193     }
194
195     public final static class Lock extends VetoableEventMethod {
196         public Lock() {
197             super(GROUP, "lock");
198         }
199
200         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
201             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).lock((WebdavEvent)event);
202         }
203     }
204
205     public final static class Unlock extends VetoableEventMethod {
206         public Unlock() {
207             super(GROUP, "unlock");
208         }
209
210         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
211             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).unlock((WebdavEvent)event);
212         }
213     }
214
215     public final static class Acl extends VetoableEventMethod {
216         public Acl() {
217             super(GROUP, "acl");
218         }
219
220         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
221             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).acl((WebdavEvent)event);
222         }
223     }
224
225     public final static class Report extends VetoableEventMethod {
226         public Report() {
227             super(GROUP, "report");
228         }
229
230         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
231             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).report((WebdavEvent)event);
232         }
233     }
234
235     public final static class Search extends VetoableEventMethod {
236         public Search() {
237             super(GROUP, "search");
238         }
239
240         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
241             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).search((WebdavEvent)event);
242         }
243     }
244
245     public final static class VersionControl extends VetoableEventMethod {
246         public VersionControl() {
247             super(GROUP, "version-control");
248         }
249
250         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
251             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).versionControl((WebdavEvent)event);
252         }
253     }
254
255     public final static class Options extends VetoableEventMethod {
256         public Options() {
257             super(GROUP, "options");
258         }
259
260         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
261             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).options((WebdavEvent)event);
262         }
263     }
264
265     public final static class Update extends VetoableEventMethod {
266         public Update() {
267             super(GROUP, "update");
268         }
269
270         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
271             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).update((WebdavEvent)event);
272         }
273     }
274
275     public final static class Checkin extends VetoableEventMethod {
276         public Checkin() {
277             super(GROUP, "checkin");
278         }
279
280         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
281             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).checkin((WebdavEvent)event);
282         }
283     }
284
285     public final static class Checkout extends VetoableEventMethod {
286         public Checkout() {
287             super(GROUP, "checkout");
288         }
289
290         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
291             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).checkout((WebdavEvent)event);
292         }
293     }
294
295     public final static class Uncheckout extends VetoableEventMethod {
296         public Uncheckout() {
297             super(GROUP, "uncheckout");
298         }
299
300         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
301             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).uncheckout((WebdavEvent)event);
302         }
303     }
304
305     public final static class Label extends VetoableEventMethod {
306         public Label() {
307             super(GROUP, "label");
308         }
309
310         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
311             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).label((WebdavEvent)event);
312         }
313     }
314
315     public final static class Mkworkspace extends VetoableEventMethod {
316         public Mkworkspace() {
317             super(GROUP, "mkworkspace");
318         }
319
320         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
321             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).label((WebdavEvent)event);
322         }
323     }
324
325     public final static class Subscribe extends VetoableEventMethod {
326         public Subscribe() {
327             super(GROUP, "subscribe");
328         }
329
330         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
331             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).subscribe((WebdavEvent)event);
332         }
333     }
334
335     public final static class Unsubscribe extends VetoableEventMethod {
336         public Unsubscribe() {
337             super(GROUP, "unsubscribe");
338         }
339
340         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
341             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).unsubscribe((WebdavEvent)event);
342         }
343     }
344
345     public final static class Poll extends VetoableEventMethod {
346         public Poll() {
347             super(GROUP, "poll");
348         }
349
350         public void fireVetaoableEvent(EventListener JavaDoc listener, EventObject JavaDoc event) throws VetoException {
351             if ( listener instanceof WebdavListener ) ((WebdavListener)listener).poll((WebdavEvent)event);
352         }
353     }
354 }
Popular Tags