KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > kilim > description > EventSource


1 /**
2  * Copyright (C) 2002 Kelua SA
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18
19 package org.objectweb.kilim.description;
20
21 import java.util.Iterator JavaDoc;
22
23 import org.objectweb.kilim.KilimException;
24
25 /**
26  * @author horn
27  */

28 public class EventSource implements BasicElement {
29     /** EVENT_SOURCE is a singleton indicating that a parameter or a support is the trigger source */
30     public static final EventSource EVENT_SOURCE = new EventSource();
31
32     private EventSource() { }
33     
34     /**
35      * @see org.objectweb.kilim.description.lang.Source#isEventSource()
36      */

37     public boolean isEventSource() {
38         return true;
39     }
40     
41     /**
42      * @see org.objectweb.kilim.description.TemplateElement#providesValue()
43      */

44     public boolean providesValue() {
45         return true;
46     }
47     
48     /**
49      * @see org.objectweb.kilim.description.TemplateElement#performsAction()
50      */

51     public boolean performsAction() {
52         return false;
53     }
54                 
55     /**
56      * @see org.objectweb.kilim.description.TemplateElement#getContainingTemplate()
57      */

58     public TemplateDescription getContainingTemplate() {
59         return null;
60     }
61     
62     /**
63      * @see org.objectweb.kilim.description.TemplateElement#getTemplateDefHierarchy()
64      */

65     public Iterator JavaDoc getTemplateDefHierarchy() {
66         return KILIM.EMPTY_ITERATOR;
67     }
68         
69     /**
70      * @see org.objectweb.kilim.description.TemplateElement#setContainingTemplate(TemplateDescription)
71      */

72     public void setContainingTemplate(TemplateDescription aTemplate) throws KilimException { }
73                 
74     /**
75      * @see org.objectweb.kilim.description.BasicElement#getKind()
76      */

77     public int getKind() {
78         return KILIM.EVENT_SOURCE;
79     }
80     
81     /**
82      * @see java.lang.Object#clone()
83      */

84     public Object JavaDoc clone() {
85         return this;
86     }
87 }
88
89     /**
90      * Method setLocalName.
91      * @param aName
92      * @throws KilimException
93      *
94      *
95      public String getLocalName() {
96         return null;
97     }
98
99     public void setLocalName(String aName) throws KilimException {
100         throw new KilimException("attempt to set a local name to an event source in template " + getContainingTemplate().getName());
101     }
102     */

103
Popular Tags