@Test public void testExctractRelativeUrl() { String jarPath = UpdateSiteAccessor.extractRelativeTargetPlatformFeatureJarUrl(getClass().getResourceAsStream(SITE_TEST_XML), JAR_PREFIX); assertThat(jarPath, equalTo(JAR_PATH)); }
static String extractRelativeTargetPlatformFeatureJarUrl(InputStream siteInputStream, String urlPrefix) { WorkspaceSiteModel model = new WorkspaceSiteModel(new FileWrapper(siteInputStream)); model.load(); for (ISiteFeature f : model.getSite().getFeatures()) { if (f.getURL().startsWith(urlPrefix)) { return f.getURL(); } } return null; }
UpdateSiteAccessor { static String extractRelativeTargetPlatformFeatureJarUrl(InputStream siteInputStream, String urlPrefix) { WorkspaceSiteModel model = new WorkspaceSiteModel(new FileWrapper(siteInputStream)); model.load(); for (ISiteFeature f : model.getSite().getFeatures()) { if (f.getURL().startsWith(urlPrefix)) { return f.getURL(); } } return null; } }
UpdateSiteAccessor { static String extractRelativeTargetPlatformFeatureJarUrl(InputStream siteInputStream, String urlPrefix) { WorkspaceSiteModel model = new WorkspaceSiteModel(new FileWrapper(siteInputStream)); model.load(); for (ISiteFeature f : model.getSite().getFeatures()) { if (f.getURL().startsWith(urlPrefix)) { return f.getURL(); } } return null; }  }
UpdateSiteAccessor { static String extractRelativeTargetPlatformFeatureJarUrl(InputStream siteInputStream, String urlPrefix) { WorkspaceSiteModel model = new WorkspaceSiteModel(new FileWrapper(siteInputStream)); model.load(); for (ISiteFeature f : model.getSite().getFeatures()) { if (f.getURL().startsWith(urlPrefix)) { return f.getURL(); } } return null; }   }
UpdateSiteAccessor { static String extractRelativeTargetPlatformFeatureJarUrl(InputStream siteInputStream, String urlPrefix) { WorkspaceSiteModel model = new WorkspaceSiteModel(new FileWrapper(siteInputStream)); model.load(); for (ISiteFeature f : model.getSite().getFeatures()) { if (f.getURL().startsWith(urlPrefix)) { return f.getURL(); } } return null; }    }