Search in sources :

Example 31 with ModuleDescriptor

use of org.glassfish.deployment.common.ModuleDescriptor in project Payara by payara.

the class EjbCheckMgrImpl method getAbstractArchiveUri.

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());
    }
}
Also used : ModuleDescriptor(org.glassfish.deployment.common.ModuleDescriptor)

Example 32 with ModuleDescriptor

use of org.glassfish.deployment.common.ModuleDescriptor in project Payara by payara.

the class PersistenceUnitCheckMgrImpl method check.

@Override
protected void check(Descriptor descriptor) throws Exception {
    PersistenceUnitDescriptor pu = 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())) {
            moduleName = Result.APPCLIENT;
        } else {
            throw new RuntimeException(// NOI18N
            smh.getLocalString(// NOI18N
            getClass().getName() + ".exception", // NOI18N
            "Unknown module type : {0}", new Object[] { moduleType }));
        }
    }
    super.check(descriptor);
}
Also used : ModuleDescriptor(org.glassfish.deployment.common.ModuleDescriptor) BundleDescriptor(com.sun.enterprise.deployment.BundleDescriptor) ArchiveType(org.glassfish.api.deployment.archive.ArchiveType) RootDeploymentDescriptor(org.glassfish.deployment.common.RootDeploymentDescriptor) PersistenceUnitDescriptor(com.sun.enterprise.deployment.PersistenceUnitDescriptor)

Example 33 with ModuleDescriptor

use of org.glassfish.deployment.common.ModuleDescriptor in project Payara by payara.

the class AppClientTest method getAbstractArchiveUri.

protected String getAbstractArchiveUri(ApplicationClientDescriptor desc) {
    String archBase = getVerifierContext().getAbstractArchive().getURI().toString();
    final ModuleDescriptor moduleDescriptor = desc.getModuleDescriptor();
    if (moduleDescriptor.isStandalone()) {
        // it must be a stand-alone module; no such physical dir exists
        return archBase;
    } else {
        return archBase + "/" + FileUtils.makeFriendlyFilename(moduleDescriptor.getArchiveUri());
    }
}
Also used : ModuleDescriptor(org.glassfish.deployment.common.ModuleDescriptor)

Example 34 with ModuleDescriptor

use of org.glassfish.deployment.common.ModuleDescriptor in project Payara by payara.

the class EjbTest method getAbstractArchiveUri.

protected String getAbstractArchiveUri(EjbDescriptor desc) {
    String archBase = getVerifierContext().getAbstractArchive().getURI().toString();
    final ModuleDescriptor moduleDescriptor = desc.getEjbBundleDescriptor().getModuleDescriptor();
    if (moduleDescriptor.isStandalone()) {
        // it must be a stand-alone module; no such physical dir exists
        return archBase;
    } else {
        return archBase + "/" + FileUtils.makeFriendlyFilename(moduleDescriptor.getArchiveUri());
    }
}
Also used : ModuleDescriptor(org.glassfish.deployment.common.ModuleDescriptor)

Example 35 with ModuleDescriptor

use of org.glassfish.deployment.common.ModuleDescriptor in project Payara by payara.

the class ConnectorTest method getAbstractArchiveUri.

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

Aggregations

ModuleDescriptor (org.glassfish.deployment.common.ModuleDescriptor)44 BundleDescriptor (com.sun.enterprise.deployment.BundleDescriptor)13 Application (com.sun.enterprise.deployment.Application)8 ReadableArchive (org.glassfish.api.deployment.archive.ReadableArchive)7 WebBundleDescriptor (com.sun.enterprise.deployment.WebBundleDescriptor)6 RootDeploymentDescriptor (org.glassfish.deployment.common.RootDeploymentDescriptor)6 DOLUtils.setExtensionArchivistForSubArchivist (com.sun.enterprise.deployment.util.DOLUtils.setExtensionArchivistForSubArchivist)5 File (java.io.File)5 IOException (java.io.IOException)5 ArrayList (java.util.ArrayList)5 EjbBundleDescriptor (com.sun.enterprise.deployment.EjbBundleDescriptor)4 InputStream (java.io.InputStream)4 ApplicationDeploymentDescriptorFile (com.sun.enterprise.deployment.io.ApplicationDeploymentDescriptorFile)3 ConfigurationDeploymentDescriptorFile (com.sun.enterprise.deployment.io.ConfigurationDeploymentDescriptorFile)3 DeploymentDescriptorFile (com.sun.enterprise.deployment.io.DeploymentDescriptorFile)3 FileArchive (com.sun.enterprise.deploy.shared.FileArchive)2 MalformedURLException (java.net.MalformedURLException)2 URL (java.net.URL)2 Enumeration (java.util.Enumeration)2 Vector (java.util.Vector)2