KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > sun > share > configbean > ConfigQuery


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19 package org.netbeans.modules.j2ee.sun.share.configbean;
20
21 import java.util.Collections JavaDoc;
22 import java.util.List JavaDoc;
23 import javax.enterprise.deploy.model.DDBean JavaDoc;
24
25
26 /** Interface to be implemented by
27  * (a) a J2EE module provider to return specific method structures requested
28  * by a J2EE server plugin
29  * (b) j2eeserver module, to implement a pass-through that handles determining
30  * the correct J2EE module to pass to.
31  *
32  * This interface is intended to be used by the configuration DConfigBeans
33  * and their respective UI to aid in usability, e.g. providing a list of messages
34  * that could be secured in the security configuaration, list of ejb interface
35  * methods that can have optimizations configured for them, etc.
36  *
37  * @author Peter Williams
38  */

39 public interface ConfigQuery {
40     
41     /** Invoke this method on a particular ejb to get list of the methods in
42      * each of the possible interfaces, if said interface is provided.
43      *
44      * @param ejbDD DDBean for the ejb whose methods are needed.
45      * @return Structure containing a list for each of the 4 EJB interfaces.
46      */

47     public InterfaceData getEJBMethods(DDBean JavaDoc ejbDD);
48     
49     /** Invoke this method on a particular serviceRef (portInfo within this ref?)
50      * to retrieve a list of the operations on that port
51      *
52      * @param serviceRefDD DDBean for the service ref whose operations are needed.
53      * @return List of operations, along with their parameters for this service.
54      */

55     public List JavaDoc/*MethodData*/ getServiceMessages(DDBean JavaDoc serviceRefDD);
56     
57     
58     public static class InterfaceData {
59        private List JavaDoc/*MethodData*/ homeInterface;
60        private List JavaDoc/*MethodData*/ remoteInterface;
61        private List JavaDoc/*MethodData*/ localHomeInterface;
62        private List JavaDoc/*MethodData*/ localInterface;
63        
64        public InterfaceData(List JavaDoc hi, List JavaDoc ri, List JavaDoc lhi, List JavaDoc li) {
65            homeInterface = Collections.unmodifiableList(hi);
66            remoteInterface = Collections.unmodifiableList(ri);
67            localHomeInterface = Collections.unmodifiableList(lhi);
68            localInterface = Collections.unmodifiableList(li);
69        }
70        
71        public List JavaDoc getHomeInterface() {
72            return homeInterface;
73        }
74        
75        public List JavaDoc getRemoteInterface() {
76            return remoteInterface;
77        }
78        
79        public List JavaDoc getLocalHomeInterface() {
80            return localHomeInterface;
81        }
82        
83        public List JavaDoc getLocalInterface() {
84            return localInterface;
85        }
86     }
87
88     public static class MethodData {
89        private String JavaDoc name;
90        private List JavaDoc/*String*/ parameters;
91        
92        public MethodData(String JavaDoc n, List JavaDoc p) {
93            name = n;
94            parameters = Collections.unmodifiableList(p);
95        }
96        
97        public String JavaDoc getOperationName() {
98            return name;
99        }
100        
101        public List JavaDoc getParameters() {
102            return parameters;
103        }
104     }
105 }
106
Popular Tags