Package com.sun.enterprise.deployment.util

Examples of com.sun.enterprise.deployment.util.ModuleDescriptor


        }

        //Add expanded modules to classpath
        for (Iterator modules = app.getModules(); modules.hasNext();) {

            ModuleDescriptor md = (ModuleDescriptor) modules.next();

            String moduleUri = md.getArchiveUri();
            String parentPath = new File(appLibDirPath).getParentFile(
                ).getAbsolutePath();
            String moduleRoot = DeploymentUtils.getEmbeddedModulePath(
                parentPath, moduleUri);
View Full Code Here


    public String getAbsolutePuRoot() {
        RootDeploymentDescriptor rootDD = getParent();
        if(rootDD.isApplication()){
            return getPuRoot();
        } else {
            ModuleDescriptor module = BundleDescriptor.class.cast(rootDD).
                    getModuleDescriptor();
            if(module.isStandalone()) {
                return getPuRoot();
            } else {
                final String moduleLocation = module.getArchiveUri();
                return moduleLocation + '/' + getPuRoot(); // see we always '/'
            }
        }
    }
View Full Code Here

        Node appNode = super.writeDescriptor(parent, application);
       
        // module
        ModuleNode moduleNode = new ModuleNode();
        for (Iterator modules = application.getModules();modules.hasNext();) {
            ModuleDescriptor next = (ModuleDescriptor) modules.next();
            moduleNode.writeDescriptor(appNode, ApplicationTagNames.MODULE, next);
        }

        // security-role*
        // this information is not written out since it's already included
View Full Code Here

    /**
     * @return the module descriptor for this bundle
     */
    public ModuleDescriptor getModuleDescriptor() {
        if (moduleDescriptor==null) {
            moduleDescriptor = new ModuleDescriptor();
            moduleDescriptor.setModuleType(getModuleType());
            moduleDescriptor.setDescriptor(this);
        }
        return moduleDescriptor;
    }
View Full Code Here

     *
     * @param element the xml element
     * @param value it's associated value
     */   
    public void setElementValue(XMLElement element, String value) {
        ModuleDescriptor descriptor = (ModuleDescriptor) getDescriptor();
         if (element.getQName().equals(ApplicationTagNames.WEB_URI)) {           
            descriptor.setModuleType(ModuleType.WAR);
            descriptor.setArchiveUri(value);               
        } else if (element.getQName().equals(ApplicationTagNames.EJB)) {
            descriptor.setModuleType(ModuleType.EJB);
            descriptor.setArchiveUri(value);
        } else if (element.getQName().equals(ApplicationTagNames.CONNECTOR)) {
            descriptor.setModuleType(ModuleType.RAR);
            descriptor.setArchiveUri(value);
        } else if (element.getQName().equals(ApplicationTagNames.APPLICATION_CLIENT)) {
            descriptor.setModuleType(ModuleType.CAR);
            descriptor.setArchiveUri(value);
        } else if (element.getQName().equals(ApplicationTagNames.WEB)) {
            descriptor.setModuleType(ModuleType.WAR);
        } else super.setElementValue(element, value);
    }   
View Full Code Here

     */
     public BundleDescriptor getStandaloneBundleDescriptor() {
   if (isVirtual()) {
       Iterator modules = getModules();
       if (modules.hasNext()) {
     ModuleDescriptor module = (ModuleDescriptor) modules.next();
     if (modules.hasNext()) {
         // this is an error, the application is virtual,
         // which mean a wrapper for a standalone module and
         // it seems I have more than one module in my list...
         throw new IllegalStateException("Virtual application contains more than one module");
     }
     return module.getDescriptor();
       }
       return null;
   } else {
       return null;
   }
View Full Code Here

        if (type==null) {
            return null;
        }
        Set bundleSet = new OrderedSet();
        for (Iterator bundles = getModules();bundles.hasNext();) {
            ModuleDescriptor aModule = (ModuleDescriptor) bundles.next();
            if (type.equals(aModule.getModuleType())) {
                if (aModule.getDescriptor()!=null) {
                    bundleSet.add(aModule.getDescriptor());
                } else {
                    DOLUtils.getDefaultLogger().fine("Null descriptor for module " + aModule.getArchiveUri());
                }
            }
        }
        return bundleSet;
    }
View Full Code Here

     * @return the set of bundle descriptors
     */
    public Set getBundleDescriptors() {
        Set bundleSet = new OrderedSet();
        for (Iterator bundles = getModules();bundles.hasNext();) {
            ModuleDescriptor aModule = (ModuleDescriptor) bundles.next();
                if (aModule.getDescriptor()!=null) {
                    bundleSet.add(aModule.getDescriptor());
                } else {
                    DOLUtils.getDefaultLogger().fine("Null descriptor for module " + aModule.getArchiveUri());
                }
        }
        return bundleSet;
    }
View Full Code Here

    }
   
    /** Method added for extension modules that extend a BundleDesc
     */
    public void  addExtensionBundleDescriptor(BundleDescriptor bundleDescriptor) {
        ModuleDescriptor newModule = bundleDescriptor.getModuleDescriptor();
        addModule(newModule);
    }
View Full Code Here

        ModuleDescriptor newModule = bundleDescriptor.getModuleDescriptor();
        addModule(newModule);
    }
   
    private void addBundleDescriptor(BundleDescriptor bundleDescriptor) {
        ModuleDescriptor newModule = bundleDescriptor.getModuleDescriptor();
        addModule(newModule);
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.util.ModuleDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.