Package org.glassfish.deployment.common

Examples of org.glassfish.deployment.common.ModuleDescriptor


            this.appName = Application.class.cast(container).getRegistrationName();
            this.componentName = persistenceUnitsDescriptor.getPuRoot() +
                    "#"+descriptor.getName(); // NOI18N
        } else { // this PU is bundled inside a module
            BundleDescriptor bundleDesc = BundleDescriptor.class.cast(container);
            ModuleDescriptor moduleDesc = bundleDesc.getModuleDescriptor();
            if(!moduleDesc.isStandalone()){ // print app name only for embedded ones
                this.appName = bundleDesc.getApplication().getRegistrationName();
            }
            this.jarName = moduleDesc.getArchiveUri();
            String puRoot = persistenceUnitsDescriptor.getPuRoot();
            // for EJB module, PURoot is empty, so to avoid ## in report, this check is needed.
            this.componentName = ("".equals(puRoot) ? "" : puRoot + "#") + descriptor.getName(); // NOI18N
        }
    }
View Full Code Here


    public abstract Result check(ServiceReferenceDescriptor descriptor);    
   
    protected String getAbstractArchiveUri(ServiceReferenceDescriptor desc) {
        String archBase = getVerifierContext().getAbstractArchive().
                getURI().toString();
        final ModuleDescriptor moduleDescriptor = desc.getBundleDescriptor().
                getModuleDescriptor();
        if (moduleDescriptor.isStandalone()) {
            return archBase; // it must be a stand-alone module; no such physical dir exists
        } else {
            return archBase + "/" +
                    FileUtils.makeFriendlyFilename(moduleDescriptor.getArchiveUri());
        }
    }
View Full Code Here

    }

    protected String getAbstractArchiveUri(ConnectorDescriptor desc) {
        String archBase = getVerifierContext().getAbstractArchive().
                getURI().toString();
        final ModuleDescriptor moduleDescriptor = desc.getModuleDescriptor();
        if (moduleDescriptor.isStandalone()) {
            return archBase; // it must be a stand-alone module; no such physical dir exists
        } else {
            return archBase + "/" +
                    FileUtils.makeFriendlyFilename(moduleDescriptor.getArchiveUri());
        }
    }
View Full Code Here

    private File getJspOutDir(){
        // verificationContext.getJspOutDir() will be non-null only when the
        // call is from deployment backend and precompilejsp is set
        File jspOutDir = verifierFrameworkContext.getJspOutDir();
        if(jspOutDir != null) {
            ModuleDescriptor moduleDescriptor = webd.getModuleDescriptor();
            if(moduleDescriptor.isStandalone())
                return jspOutDir;
            return new File(jspOutDir, FileUtils.makeFriendlyFilename(moduleDescriptor.getArchiveUri()));
        }
        Random random=new Random();
        String prefix=System.getProperty("java.io.tmpdir")+File.separator+".jspc";
        do{
            float f=random.nextFloat();
View Full Code Here

        return true;
    }

    private String getAbstractArchiveUri(EjbBundleDescriptorImpl desc) {
        String archBase = context.getAbstractArchive().getURI().toString();
        ModuleDescriptor mdesc = desc.getModuleDescriptor();
        if(mdesc.isStandalone()) {
            return archBase;
        } else {
            return archBase + "/" +
                    FileUtils.makeFriendlyFilename(mdesc.getArchiveUri());
        }
    }
View Full Code Here

    protected String getAbstractArchiveUri(Descriptor descriptor) {
        String archBase = context.getAbstractArchive().getURI().toString();
        if (descriptor instanceof Application)
            return archBase;
        ModuleDescriptor mdesc = getBundleDescriptor(descriptor).getModuleDescriptor();
        if(mdesc.isStandalone()) {
            return archBase;
        } else {
            return archBase + "/" +
                    FileUtils.makeFriendlyFilename(mdesc.getArchiveUri());
        }
    }
View Full Code Here

                PersistenceUnitDescriptor.class.cast(descriptor);
        RootDeploymentDescriptor rootDD = pu.getParent().getParent();
        if(rootDD.isApplication()) {
            moduleName = Result.APP;
        } else {
            ModuleDescriptor mdesc =
                    BundleDescriptor.class.cast(rootDD).getModuleDescriptor();
            final ArchiveType moduleType = mdesc.getModuleType();
            if(moduleType != null && moduleType.equals(DOLUtils.ejbType())) {
                moduleName = Result.EJB;
            } else if (moduleType != null && moduleType.equals(DOLUtils.warType())) {
                moduleName = Result.WEB;
            } else if (moduleType != null && moduleType.equals(DOLUtils.carType())) {
View Full Code Here

        RootDeploymentDescriptor rootDD =
                PersistenceUnitDescriptor.class.cast(descriptor).getParent().getParent();
        if(rootDD.isApplication()) {
            return archBase;
        } else {
            ModuleDescriptor mdesc =
                    BundleDescriptor.class.cast(rootDD).getModuleDescriptor();
            if(mdesc.isStandalone()) {
                return archBase;
            } else {
                return archBase + "/" +
                        FileUtils.makeFriendlyFilename(mdesc.getArchiveUri());
            }
        }
    }
View Full Code Here

        InputSource source = null;
        if (location.startsWith("/")) // NOI18N
            location = location.substring(1);
        else
            location = "WEB-INF/" + location; // NOI18N
        ModuleDescriptor moduleDesc = webd.getModuleDescriptor();
        String archBase = context.getAbstractArchive().getURI().getPath();
        String uri = null;
        if(moduleDesc.isStandalone()){
            uri = archBase;
        } else {
            uri = archBase + File.separator +
                FileUtils.makeFriendlyFilename(moduleDesc.getArchiveUri());
        }
        FileArchive arch = new FileArchive();
        arch.open(uri);
        InputStream is = arch.getEntry(location);
        try {
        // is can be null if wrong location of tld is specified in web.xml
            if (is == null)
                throw new IOException(smh.getLocalString
                        (getClass().getName() + ".exception1", // NOI18N
                                "Wrong tld [ {0} ] specified in the web.xml of [ {1} ]", // NOI18N
                                new Object[]{location, moduleDesc.getArchiveUri()}));
            source = new InputSource(is);
            document = builder.parse(source);
        } finally {
            try{
                if(is != null)
View Full Code Here

   
    private void readFacesConfigDocument(WebBundleDescriptor webd) throws Exception {
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        factory.setValidating(false);
        DocumentBuilder builder = factory.newDocumentBuilder();
        ModuleDescriptor moduleDesc = webd.getModuleDescriptor();
        String archBase = context.getAbstractArchive().getURI().toString();
        String uri = null;
        if(moduleDesc.isStandalone()){
            uri = archBase;
        } else {
            uri = archBase + File.separator +
                    FileUtils.makeFriendlyFilename(moduleDesc.getArchiveUri());
        }
        FileArchive arch = new FileArchive();
        arch.open(URI.create(uri));
        InputStream is = arch.getEntry(facesConfigFileName);
        InputSource source = new InputSource(is);
View Full Code Here

TOP

Related Classes of org.glassfish.deployment.common.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.