KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > enterprise > deploy > spi > TargetModuleID


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.spi;
25
26 /**
27  * A TargetModuleID interface represents a unique
28  * identifier for a deployed application module.
29  * A deployable application module can be an EAR,
30  * JAR, WAR or RAR file.
31  *
32  * A TargetModuleID can represent a root module or
33  * a child module. A root module TargetModuleID
34  * has no parent. It represents a deployed EAR
35  * file or stand alone module. A child module
36  * TargetModuleID represents a deployed sub module
37  * of a J2EE application.
38  *
39  * A child TargetModuleID has only one parent,
40  * the super module it was bundled and deployed
41  * with.
42  *
43  * The identifier consists of the target name
44  * and the unique identifier for the deployed
45  * application module.
46  */

47 public interface TargetModuleID
48 {
49    /**
50     * Retrieve the name of the target server.
51     * this module was deployed to.
52     *
53     * @return Target an object representing
54     * a server target.
55     */

56    public Target JavaDoc getTarget();
57
58    /**
59     * Retrieve the id assigned to represent
60     * the deployed module.
61     */

62    public String JavaDoc getModuleID();
63
64
65    /**
66     * If this TargetModulID represents a web
67     * module retrieve the URL for it.
68     *
69     * @return the URL of a web module or null
70     * if the module is not a web module.
71     */

72    public String JavaDoc getWebURL();
73
74    /**
75     * Retrieve the identifier representing
76     * the deployed module.
77     */

78    public String JavaDoc toString();
79
80    /**
81     * Retrieve the identifier of the parent
82     * object of this deployed module. If there
83     * is no parent then this is the root object
84     * deployed. The root could represent an EAR
85     * file or it could be a stand alone module
86     * that was deployed.
87     *
88     * @return the TargetModuleID of the parent
89     * of this object. A <code>null</code>
90     * value means this module is the root
91     * object deployed.
92     */

93    public TargetModuleID JavaDoc getParentTargetModuleID();
94
95    /**
96     * Retrieve a list of identifiers of the children
97     * of this deployed module.
98     *
99     * @return a list of TargetModuleIDs identifying the
100     * childern of this object. A <code>null</code>
101     * value means this module has no childern
102     */

103    public TargetModuleID JavaDoc[] getChildTargetModuleID();
104 }
105
Popular Tags