/** * * This API is used to help determine if the sniffer should recognize * the current archive. * If the sniffer does not support the archive type associated with * the current deployment, the sniffer should not recognize the archive. * * @param archiveType the archive type to check * @return whether the sniffer supports the archive type * */ public boolean supportsArchiveType(ArchiveType archiveType) { if (archiveType.equals(warType)) { return true; } return false; }
/** * * This API is used to help determine if the sniffer should recognize * the current archive. * If the sniffer does not support the archive type associated with * the current deployment, the sniffer should not recognize the archive. * * @param archiveType the archive type to check * @return whether the sniffer supports the archive type * */ public boolean supportsArchiveType(ArchiveType archiveType) { if (archiveType.equals(rarType)) { return true; } return false; }
/** * * This API is used to help determine if the sniffer should recognize * the current archive. * If the sniffer does not support the archive type associated with * the current deployment, the sniffer should not recognize the archive. * * @param archiveType the archive type to check * @return whether the sniffer supports the archive type * */ public boolean supportsArchiveType(ArchiveType archiveType) { if (archiveType.equals(earType)) { return true; } return false; }
private static String getTypeFromModuleType(ArchiveType moduleType) { if (moduleType.equals(DOLUtils.warType())) { return "web"; } else if (moduleType.equals(DOLUtils.ejbType())) { return "ejb"; } else if (moduleType.equals(DOLUtils.carType())) { return "appclient"; } else if (moduleType.equals(DOLUtils.rarType())) { return "connector"; } return null; }
@Override public boolean supportsModuleType(ArchiveType moduleType) { return moduleType != null && moduleType.equals(DOLUtils.warType()); }
@Override public boolean supportsModuleType(ArchiveType moduleType) { return moduleType!=null && moduleType.equals(DOLUtils.earType()); }
@Override public boolean supportsModuleType(ArchiveType moduleType) { return moduleType != null && moduleType.equals(DOLUtils.warType()); }
/** * @return the location of the DeploymentDescriptor file for a * particular type of J2EE Archive */ public String getDeploymentDescriptorPath() { return DOLUtils.warType().equals(getArchiveType()) ? DescriptorConstants.GF_EJB_IN_WAR_ENTRY : DescriptorConstants.GF_EJB_JAR_ENTRY; }
/** * Lookup module by uri. * * @return a bundle descriptor in this application identified by uri * or null if not found. */ public Collection<ModuleDescriptor<BundleDescriptor>> getModuleDescriptorsByType(ArchiveType type) { if (type==null) { throw new IllegalArgumentException("type cannot be null"); } LinkedList<ModuleDescriptor<BundleDescriptor>> results = new LinkedList<ModuleDescriptor<BundleDescriptor>>(); for (ModuleDescriptor<BundleDescriptor> aModule : getModules()) { if (type.equals(aModule.getModuleType())) { results.add(aModule); } } return results; }
/** * @return the location of the DeploymentDescriptor file for a * particular type of J2EE Archive */ public String getDeploymentDescriptorPath() { return DOLUtils.warType().equals(getArchiveType()) ? DescriptorConstants.S1AS_EJB_IN_WAR_ENTRY : DescriptorConstants.S1AS_EJB_JAR_ENTRY; }
private ArchiveHandler getArchiveHandlerFromModuleType(ArchiveType type) { if (type.equals(DOLUtils.warType())) { return habitat.getService(ArchiveHandler.class, WarDetector.ARCHIVE_TYPE); } else if (type.equals(DOLUtils.rarType())) { return habitat.getService(ArchiveHandler.class, RarDetector.ARCHIVE_TYPE); } else if (type.equals(DOLUtils.ejbType())) { return habitat.getService(ArchiveHandler.class, EjbJarDetector.ARCHIVE_TYPE); } else if (type.equals(DOLUtils.carType())) { return habitat.getService(ArchiveHandler.class, CarDetector.ARCHIVE_TYPE); } else { return null; } }
@Override public boolean supportsModuleType(ArchiveType moduleType) { // Reads persitence.xml for ejb jars return moduleType != null && (moduleType.equals(DOLUtils.ejbType()) || // Or App client modules if running inside server (moduleType.equals(DOLUtils.carType()) && env.getProcessType().isServer())); }
/** * @return the location of the DeploymentDescriptor file for a * particular type of J2EE Archive */ public String getDeploymentDescriptorPath() { return DOLUtils.warType().equals(getArchiveType()) ? DescriptorConstants.EJB_IN_WAR_ENTRY : DescriptorConstants.EJB_JAR_ENTRY; }
private String getModuleType(ModuleDescriptor modDesc) { String type = null; if (modDesc.getModuleType().equals(DOLUtils.ejbType())) { type = "EJBModule"; } else if (modDesc.getModuleType().equals(DOLUtils.warType())) { type = "WebModule"; } else if (modDesc.getModuleType().equals(DOLUtils.carType())) { type = "AppClientModule"; } else if (modDesc.getModuleType().equals(DOLUtils.rarType())) { type = "ConnectorModule"; } return type; } }
@Override public boolean supportsModuleType(ArchiveType moduleType) { return (moduleType != null && moduleType.equals(DOLUtils.carType())) && (env.getProcessType() == ProcessType.ACC) ; }
public final static String [] getDescriptorsList (ArchiveType moduleType) { if (moduleType == null) return null; if (moduleType.equals(DOLUtils.earType())) { return (String[])earList.clone(); } else if (moduleType.equals(DOLUtils.ejbType())) { return (String[])ejbList.clone(); } else if (moduleType.equals(DOLUtils.warType())) { return (String[])warList.clone(); } else if (moduleType.equals(DOLUtils.rarType())) { return (String[])rarList.clone(); } else if (moduleType.equals(DOLUtils.carType())) { return (String[])carList.clone(); } return null; } }
public WLSWebServicesDeploymentDescriptorFile(RootDeploymentDescriptor desc) { if (desc instanceof WebServicesDescriptor) { descriptorPath = (((WebServicesDescriptor)desc).getBundleDescriptor().getModuleType().equals(DOLUtils.warType())) ? WLDescriptorConstants.WL_WEB_WEBSERVICES_JAR_ENTRY : WLDescriptorConstants.WL_EJB_WEBSERVICES_JAR_ENTRY; } else if (desc instanceof WebBundleDescriptor) { descriptorPath = WLDescriptorConstants.WL_WEB_WEBSERVICES_JAR_ENTRY; } else if (desc instanceof EjbBundleDescriptor) { descriptorPath = WLDescriptorConstants.WL_EJB_WEBSERVICES_JAR_ENTRY; } }
private List<String> getSubModulesForEar(com.sun.enterprise.deployment.Application application, String type) { List<String> moduleInfoList = new ArrayList<String>(); Collection<ModuleDescriptor<BundleDescriptor>> modules = getSubModuleListForEar(application, type); for (ModuleDescriptor moduleDesc : modules) { String moduleInfo = moduleDesc.getArchiveUri() + ":" + moduleDesc.getModuleType(); if (moduleDesc.getModuleType().equals(DOLUtils.warType())) { moduleInfo = moduleInfo + ":" + moduleDesc.getContextRoot(); } moduleInfoList.add(moduleInfo); } return moduleInfoList; }
/** * Returns true if the passed file or directory is recognized by this * sniffer. * * @param context deployment context * @return true if the location is recognized by this sniffer */ @Override public boolean handles(DeploymentContext context) { ArchiveType archiveType = habitat.getService(ArchiveType.class, context.getArchiveHandler().getArchiveType()); if (archiveType != null && !supportsArchiveType(archiveType)) { return false; } if (archiveType != null && (archiveType.equals(DOLUtils.warType()) || archiveType.equals(DOLUtils.earType()) || archiveType.equals(DOLUtils.ejbType()))) return true; return handles(context.getSource()); }