KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > enterprise > deploy > model > J2eeApplicationObject


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 javax.enterprise.deploy.model;
25
26 import javax.enterprise.deploy.shared.ModuleType JavaDoc;
27
28 /**
29  * J2eeApplicationObject is an interface that represents a J2EE
30  * application (EAR); it maintains a DeployableObject for each
31  * module in the archive.
32  */

33 public interface J2eeApplicationObject extends DeployableObject JavaDoc {
34     
35     /**
36      * Return the DeployableObject of the specified URI designator.
37      * @param uri Describes where to get the module from.
38      * @return the DeployableObject describing the j2ee module at this uri
39      * or 'null' if there is not match.
40      */

41     public DeployableObject JavaDoc getDeployableObject(String JavaDoc uri);
42     
43     /**
44      * Return the all DeployableObjects of the specified type.
45      * @param type The type of module to return.
46      * @return the list of DeployableObjects describing the j2ee module
47      * at this uri or 'null' if there are no matches.
48      */

49     public DeployableObject JavaDoc[] getDeployableObjects(ModuleType JavaDoc type);
50     
51     /**
52      * Return the all DeployableObjects in this application.
53      * @return the DeployableObject describing the j2ee module at this uri
54      * or 'null' if there are no matches.
55      */

56     public DeployableObject JavaDoc[] getDeployableObjects();
57         
58     /**
59      * Return the list of URIs of the designated module type.
60      * @param type The type of module to return.
61      * @return the Uris of the contained modules or 'null' if there
62      * are no matches.
63      */

64     public String JavaDoc[] getModuleUris(ModuleType JavaDoc type);
65     
66     /**
67      * Return the list of URIs for all modules in the application.
68      * @return the Uris of the contained modules or 'null' if there
69      * are no matches.
70      */

71     public String JavaDoc[] getModuleUris();
72     
73     /**
74      * Return a list of DDBean based upon an XPath; all
75      * deployment descriptors of the specified type are searched.
76      *
77      * @param type The type of deployment descriptor to query.
78      * @param xpath An XPath string referring to a location in the
79      * deployment descriptor
80      * @return The list of DDBeans or 'null' of there are no matches.
81      */

82    public DDBean JavaDoc[] getChildBean(ModuleType JavaDoc type, String JavaDoc xpath);
83    
84    /**
85     * Return the text value from the XPath; search only the
86     * deployment descriptors of the specified type.
87     *
88     * @param type The type of deployment descriptor to query.
89     * @param xpath An xpath string referring to a location in the
90     * deployment descriptor
91     * @return The text values of this xpath or 'null' if there are no
92     * matches.
93     */

94    public String JavaDoc[] getText(ModuleType JavaDoc type, String JavaDoc xpath);
95    
96    /**
97     * Register a listener for changes in XPath that are related
98     * to this deployableObject.
99     *
100     * @param type The type of deployment descriptor to query.
101     * @param xpath The xpath to listen for.
102     * @param xpl The listener.
103     */

104    public void addXpathListener(ModuleType JavaDoc type, String JavaDoc xpath,
105         XpathListener JavaDoc xpl);
106    
107    /**
108     * Unregister the listener for an XPath.
109     *
110     * @param type The type of deployment descriptor to query.
111     * @param xpath he XPath to listen for
112     * @param xpl The listener
113     */

114    public void removeXpathListener(ModuleType JavaDoc type, String JavaDoc xpath,
115         XpathListener JavaDoc xpl);
116    
117 }
118
119
Popular Tags