KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cactus > integration > ant > deployment > application > ApplicationXml


1 /*
2  * ========================================================================
3  *
4  * Copyright 2003 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * ========================================================================
19  */

20 package org.apache.cactus.integration.ant.deployment.application;
21
22 import java.util.Iterator JavaDoc;
23
24 import org.w3c.dom.Document JavaDoc;
25 import org.w3c.dom.Element JavaDoc;
26
27 /**
28  * Encapsulates the DOM representation of an EAR descriptor
29  * (<code>application.xml</code>) to provide convenience methods for easy
30  * access and manipulation.
31  *
32  * @since Cactus 1.5
33  * @version $Id: ApplicationXml.java,v 1.1 2004/05/31 20:05:24 vmassol Exp $
34  */

35 public interface ApplicationXml
36 {
37     /**
38      * Returns the DOM document representing the deployment descriptor. The
39      * document will contain any modifications made through this instance.
40      *
41      * @return The document representing the deploy descriptor
42      */

43     Document JavaDoc getDocument();
44
45     /**
46      * Returns the J2EE API version.
47      *
48      * @return The version
49      */

50     ApplicationXmlVersion getVersion();
51
52     /**
53      * Returns the element that contains the definition of a specific web
54      * module, or <code>null</code> if a web module with the specified web-uri
55      * is not defined.
56      *
57      * @param theWebUri The uri of the web module
58      * @return The DOM element representing the web module definition
59      */

60     Element JavaDoc getWebModule(String JavaDoc theWebUri);
61     
62     /**
63      * Returns the context root of the the specified web module.
64      *
65      * @param theWebUri The uri of the web module
66      * @return The context root of the web module
67      */

68     String JavaDoc getWebModuleContextRoot(String JavaDoc theWebUri);
69     
70     /**
71      * Returns an iterator over the URIs of the web modules defined in the
72      * descriptor.
73      *
74      * @return An iterator over the URIs of the web modules
75      */

76     Iterator JavaDoc getWebModuleUris();
77     
78     /**
79      * Returns an iterator over the elements that match the specified tag.
80      *
81      * @param theTag The descriptor tag of which the elements should be
82      * returned
83      * @return An iterator over the elements matching the tag, in the order
84      * they occur in the descriptor
85      */

86     Iterator JavaDoc getElements(ApplicationXmlTag theTag);
87 }
88
Popular Tags