KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > guiframework > view > HandlerContext


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package com.sun.enterprise.tools.guiframework.view;
25
26 import com.iplanet.jato.view.View;
27
28 import com.sun.enterprise.tools.guiframework.event.descriptors.HandlerDescriptor;
29 import com.sun.enterprise.tools.guiframework.event.descriptors.UseHandlerDescriptor;
30 import com.sun.enterprise.tools.guiframework.exception.FrameworkException;
31 import com.sun.enterprise.tools.guiframework.view.descriptors.ViewDescriptor;
32
33 import java.util.EventObject JavaDoc;
34
35
36 /**
37  *
38  */

39 public interface HandlerContext {
40
41     /**
42      * This returns the nearest View associated with the handler.
43      */

44     public View getView();
45
46
47     /**
48      * This method returns the nearest ViewDescriptor associated with the
49      * handler.
50      */

51     public ViewDescriptor getViewDescriptor();
52
53
54     /**
55      * This method returns the Event that caused the handler to be invoked.
56      */

57     public EventObject JavaDoc getEvent();
58
59
60     /**
61      * This method returns the UseHandlerDescriptor associated with the
62      * handler. The UseHandlerDescriptor can be thought of the instance
63      * of the handler that is being invoked. It contains the actual input
64      * parameters to sent to the handler (if any), and a reference to the
65      * handler definition (HandlerDescriptor).
66      */

67     public UseHandlerDescriptor getUseHandlerDescriptor();
68
69
70     /**
71      * This method returns the HandlerDescriptor associated with the handler.
72      * The handler descriptor can be thought of the definition to the handler
73      * itself. It contains the method, I/O definition, and may also define
74      * other UseHandlers to be invoked prior to executing itself.
75      */

76     public HandlerDescriptor getHandlerDescriptor();
77
78
79     /**
80      * This method returns the input value for the given input name. The name
81      * must be valid or an exception will be thrown.
82      */

83     public Object JavaDoc getInputValue(String JavaDoc name);
84
85
86     /**
87      * This method sets the specified output value. The name must be valid or
88      * an exception will be thrown.
89      */

90     public void setOutputValue(String JavaDoc name, Object JavaDoc value);
91
92
93     /**
94      * This method retrieves an output value that has already been set.
95      */

96     public Object JavaDoc getOutputValue(String JavaDoc name);
97 }
98
Popular Tags