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());
}
}
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);
}
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());
}
}
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());
}
}
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());
}
}
Aggregations