View Javadoc

1   /**
2    *
3    * Copyright 2003-2004 The Apache Software Foundation
4    *
5    *  Licensed under the Apache License, Version 2.0 (the "License");
6    *  you may not use this file except in compliance with the License.
7    *  You may obtain a copy of the License at
8    *
9    *     http://www.apache.org/licenses/LICENSE-2.0
10   *
11   *  Unless required by applicable law or agreed to in writing, software
12   *  distributed under the License is distributed on an "AS IS" BASIS,
13   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   *  See the License for the specific language governing permissions and
15   *  limitations under the License.
16   */
17  
18  //
19  // This source code implements specifications defined by the Java
20  // Community Process. In order to remain compliant with the specification
21  // DO NOT add / change / or delete method signatures!
22  //
23  
24  package javax.enterprise.deploy.model;
25  
26  import javax.enterprise.deploy.shared.ModuleType;
27  
28  /**
29   * An interface that represents the root of a standard deployment descriptor.
30   * A DDBeanRoot is a type of DDBean.
31   *
32   * @version $Rev: 46019 $ $Date: 2004-09-14 02:56:06 -0700 (Tue, 14 Sep 2004) $
33   */
34  public interface DDBeanRoot extends DDBean {
35      /**
36       * Return the ModuleType of deployment descriptor.
37       *
38       * @return The ModuleType of deployment descriptor
39       */
40      public ModuleType getType();
41  
42      /**
43       * Return the containing DeployableObject
44       *
45       * @return The DeployableObject that contains this deployment descriptor
46       */
47      public DeployableObject getDeployableObject();
48  
49      /**
50       * A convenience method to return the DTD version number. The DeployableObject has this information.
51       *
52       * Note: the method getDDBeanRootVersion() is preferred to this method.
53       * @see #getDDBeanRootVersion
54       *
55       * @return a string containing the DTD version number
56       */
57      public String getModuleDTDVersion();
58  
59      /**
60       * A convenience method to return the version number of an
61       * XML instance document.  This method is replacing the
62       * method DeployableObject.getModuleDTDVersion, because
63       * it returns the version number of any J2EE XML instance document
64       *
65       * @return <p>a string that is the version number of the XML instance document.
66       *  Null is returned if no version number can be found.</p>
67       * <p>A module's deployment descriptor file always contains
68       * a document type identifier, DOCTYPE.  The DOCTYPE statement
69       * contains the module DTD version number in the label of the
70       * statement.</p>
71       * <p>The format of the DOCTYPE statement is:</p>
72       * <pre>&lt;!DOCTYPE root_element PUBLIC "-//organization//label//language" "location"&gt;</pre>
73       * <dl>
74       *   <dt>root_element</dt><dd>is the name of the root document in the DTD.</dd>
75       *   <dt>organization</dt><dd>is the name of the organization responsible
76       * for the creation and maintenance of the DTD
77       * being referenced.</dd>
78       *   <dt>label</dt><dd>is a unique descriptive name for the public text being
79       * referenced.  </dd>
80       *   <dt>language</dt><dd>is the ISO 639 language id representing the natural
81       * language encoding of th DTD.</dd>
82       *   <dt>location</dt><dd>is the URL of the DTD.</dd>
83       * </dl>
84       * <p>An example J2EE deployment descriptor DOCTYPE statement is:</p>
85       * <pre><!DOCTYPE application-client PUBLIC
86       *                "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN"
87       *                "http://java.sun.com/dtd/application-client_1_3.dtd"></pre>
88       * <p>In this example the label is, "DTD J2EE Application Client 1.3",
89       * and the DTD version number is 1.3. A call to getModuleDTDVersion
90       * would return a string containing, "1.3".</p>
91       */
92      public String getDDBeanRootVersion();
93  
94      /**
95       * Return the XPath for this standard bean. The root XPath is "/".
96       * 
97       * @return "/" this is the root standard bean.
98       */
99      public String getXpath();
100 
101     /**
102      * Returns the filename relative to the root of the module of the XML instance document this
103      * DDBeanRoot represents.
104      *
105      * @since 1.1
106      *
107      *  @return String the filename relative to the root of the module
108      */
109     public String getFilename();
110 }