KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > portal > event > impl > CopletStatusEvent


1 /*
2  * Copyright 1999-2002,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.cocoon.portal.event.impl;
17
18 import org.apache.cocoon.portal.coplet.CopletInstanceData;
19 import org.apache.cocoon.portal.event.ComparableEvent;
20 import org.apache.cocoon.portal.event.CopletInstanceEvent;
21 import org.apache.cocoon.portal.event.Event;
22
23 /**
24  * EventSource: copletID
25  *
26  * @author <a HREF="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
27  * @author <a HREF="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
28  *
29  * @version CVS $Id: CopletStatusEvent.java 290527 2005-09-20 18:56:14Z cziegeler $
30  */

31 public abstract class CopletStatusEvent
32     implements Event, ComparableEvent, CopletInstanceEvent {
33
34     protected CopletInstanceData coplet;
35
36     public CopletInstanceData getCopletInstanceData() {
37         return this.coplet;
38     }
39
40     public void setCopletInstanceData(CopletInstanceData data) {
41         this.coplet = data;
42     }
43
44     public boolean equalsEvent(ComparableEvent event) {
45         if (event instanceof CopletStatusEvent) {
46             return ((CopletStatusEvent)event).getCopletInstanceData().getId().equals( this.coplet.getId() );
47         }
48         return false;
49     }
50
51     /**
52      * @see org.apache.cocoon.portal.event.ActionEvent#getTarget()
53      */

54     public Object JavaDoc getTarget() {
55         return this.coplet;
56     }
57
58 }
59
Popular Tags