@Override public int hashCode() { return toString().hashCode(); }
@Override public int hashCode() { return toString().hashCode(); }
@Override public boolean equals(Object obj) { if (obj instanceof ArchiveType) { return toString().equals(obj.toString()); } return false; } }
@Override public boolean equals(Object obj) { if (obj instanceof ArchiveType) { return toString().equals(obj.toString()); } 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.toString().equals(ModuleType.EAR.toString())) { 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.toString().equals(ModuleType.WAR.toString()) || archiveType.toString().equals(ModuleType.EJB.toString())) { 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.toString().equals(ModuleType.WAR.toString()) || archiveType.toString().equals(ModuleType.EJB.toString())) { 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.toString().equals(ModuleType.WAR.toString()) || archiveType.toString().equals(ModuleType.EJB.toString()) || archiveType.toString().equals(ModuleType.CAR.toString())) { 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(ejbType) || archiveType.toString().equals(ModuleType.WAR.toString())) { return true; } return false; }
/** * Returns the scanner for this archivist, usually it is the scanner regitered * with the same module type as this archivist, but subclasses can return a * different version * */ public ModuleScanner getScanner() { Scanner scanner = null; try { scanner = habitat.getService(Scanner.class, getModuleType().toString()); if (scanner==null || !(scanner instanceof ModuleScanner)) { logger.log(Level.SEVERE, "Cannot find module scanner for " + this.getManifest()); } } catch (MultiException e) { // XXX To do logger.log(Level.SEVERE, "Cannot find scanner for " + this.getModuleType(), e); } return (ModuleScanner)scanner; }
cModule.getModuleType().toString());
private static Collection<Sniffer> getSniffersForModule(ServiceLocator habitat, ReadableArchive archive, ModuleDescriptor md, Application app) throws Exception { ArchiveHandler handler = habitat.getService(ArchiveHandler.class, md.getModuleType().toString()); SnifferManager snifferManager = habitat.getService(SnifferManager.class); List<URI> classPathURIs = handler.getClassPathURIs(archive);