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