001 /**
002 *
003 * Copyright 2003-2004 The Apache Software Foundation
004 *
005 * Licensed under the Apache License, Version 2.0 (the "License");
006 * you may not use this file except in compliance with the License.
007 * You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017
018 //
019 // This source code implements specifications defined by the Java
020 // Community Process. In order to remain compliant with the specification
021 // DO NOT add / change / or delete method signatures!
022 //
023
024 package javax.enterprise.deploy.spi;
025
026 /**
027 * A TargetModuleID interface represents a unique identifier for a deployed
028 * application module. A deployable application module can be an EAR, JAR, WAR or
029 * RAR file. A TargetModuleID can represent a root module or a child module. A
030 * root module TargetModuleID has no parent. It represents a deployed EAR file or
031 * standalone module. A child module TargetModuleID represents a deployed sub
032 * module of a J2EE application. A child TargetModuleID has only one parent, the
033 * super module it was bundled and deployed with. The identifier consists of the
034 * target name and the unique identifier for the deployed application module.
035 *
036 * @version $Rev: 46019 $ $Date: 2004-09-14 02:56:06 -0700 (Tue, 14 Sep 2004) $
037 */
038 public interface TargetModuleID {
039 /**
040 * Retrieve the target server that this module was deployed to.
041 *
042 * @return an object representing a server target.
043 */
044 public Target getTarget();
045
046 /**
047 * Retrieve the id assigned to represent the deployed module.
048 */
049 public String getModuleID();
050
051 /**
052 * If this TargetModulID represents a web module retrieve the URL for it.
053 *
054 * @return the URL of a web module or null if the module is not a web module.
055 */
056 public String getWebURL();
057
058 /**
059 * Retrieve the identifier representing the deployed module.
060 */
061 public String toString();
062
063 /**
064 * Retrieve the identifier of the parent object of this deployed module. If
065 * there is no parent then this is the root object deployed. The root could
066 * represent an EAR file or it could be a stand alone module that was deployed.
067 *
068 * @return the TargetModuleID of the parent of this object. A <code>null</code>
069 * value means this module is the root object deployed.
070 */
071 public TargetModuleID getParentTargetModuleID();
072
073 /**
074 * Retrieve a list of identifiers of the children of this deployed module.
075 *
076 * @return a list of TargetModuleIDs identifying the childern of this object.
077 * A <code>null</code> value means this module has no children
078 */
079 public TargetModuleID[] getChildTargetModuleID();
080 }