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
20
21
22
23
24 package javax.enterprise.deploy.spi;
25
26 /**
27 * A TargetModuleID interface represents a unique identifier for a deployed
28 * application module. A deployable application module can be an EAR, JAR, WAR or
29 * RAR file. A TargetModuleID can represent a root module or a child module. A
30 * root module TargetModuleID has no parent. It represents a deployed EAR file or
31 * standalone module. A child module TargetModuleID represents a deployed sub
32 * module of a J2EE application. A child TargetModuleID has only one parent, the
33 * super module it was bundled and deployed with. The identifier consists of the
34 * target name and the unique identifier for the deployed application module.
35 *
36 * @version $Rev: 46019 $ $Date: 2004-09-14 02:56:06 -0700 (Tue, 14 Sep 2004) $
37 */
38 public interface TargetModuleID {
39 /**
40 * Retrieve the target server that this module was deployed to.
41 *
42 * @return an object representing a server target.
43 */
44 public Target getTarget();
45
46 /**
47 * Retrieve the id assigned to represent the deployed module.
48 */
49 public String getModuleID();
50
51 /**
52 * If this TargetModulID represents a web module retrieve the URL for it.
53 *
54 * @return the URL of a web module or null if the module is not a web module.
55 */
56 public String getWebURL();
57
58 /**
59 * Retrieve the identifier representing the deployed module.
60 */
61 public String toString();
62
63 /**
64 * Retrieve the identifier of the parent object of this deployed module. If
65 * there is no parent then this is the root object deployed. The root could
66 * represent an EAR file or it could be a stand alone module that was deployed.
67 *
68 * @return the TargetModuleID of the parent of this object. A <code>null</code>
69 * value means this module is the root object deployed.
70 */
71 public TargetModuleID getParentTargetModuleID();
72
73 /**
74 * Retrieve a list of identifiers of the children of this deployed module.
75 *
76 * @return a list of TargetModuleIDs identifying the childern of this object.
77 * A <code>null</code> value means this module has no children
78 */
79 public TargetModuleID[] getChildTargetModuleID();
80 }