/** * Returns true if a JAR entry exists. * @param entryPath * @return true if the JAR contains the given entry */ public boolean hasJarEntry(String entryPath) { return getJarEntry(entryPath) != null; }
/** * @see org.overlord.sramp.atom.archive.expand.ArtifactFilter#setContext(org.overlord.sramp.atom.archive.expand.ZipToSrampArchiveContext) */ @Override public void setContext(ZipToSrampArchiveContext context) { syIndex = (SwitchYardAppIndex) context.get("switchyard.index"); //$NON-NLS-1$ if (syIndex == null) { File switchyardXmlFile = context.getJarEntry("META-INF/switchyard.xml"); //$NON-NLS-1$ if (switchyardXmlFile == null) { switchyardXmlFile = context.getJarEntry("WEB-INF/switchyard.xml"); //$NON-NLS-1$ } if (switchyardXmlFile != null) { syIndex = new SwitchYardAppIndex(switchyardXmlFile); context.put("switchyard.index", switchyardXmlFile); //$NON-NLS-1$ } } }