public Map getProperties() { return resource.getProperties(); }
public Map getProperties() { return resource.getProperties(); }
public Map getProperties() { return resource.getProperties(); }
protected void doExecute(RepositoryAdmin admin) throws Exception { for (String bundle : bundles) { String[] target = getTarget(bundle); Resource resource = selectNewestVersion(searchRepository(admin, target[0], target[1])); if (resource == null) { System.err.println("Unknown bundle and/or version: " + target[0]); } else { URI srcURL = (URI) resource.getProperties().get(Resource.SOURCE_URI); if (srcURL != null) { FileUtil.downloadSource(System.out, System.err, srcURL.toURL(), localDir, extract); } else { System.err.println("Missing source URL: " + target[0]); } } } }
protected void doExecute(RepositoryAdmin admin) throws Exception { for (String bundle : bundles) { String[] target = getTarget(bundle); Resource resource = selectNewestVersion(searchRepository(admin, target[0], target[1])); if (resource == null) { System.err.println("Unknown bundle and/or version: " + target[0]); } else { URI srcURL = (URI) resource.getProperties().get(Resource.SOURCE_URI); if (srcURL != null) { FileUtil.downloadSource(System.out, System.err, srcURL.toURL(), localDir, extract); } else { System.err.println("Missing source URL: " + target[0]); } } } }
protected void doExecute(RepositoryAdmin admin) throws Exception { for (String bundle : bundles) { String[] target = getTarget(bundle); Resource resource = selectNewestVersion(searchRepository(admin, target[0], target[1])); if (resource == null) { System.err.println("Unknown bundle and/or version: " + target[0]); } else { URI srcURL = (URI) resource.getProperties().get(Resource.SOURCE_URI); if (srcURL != null) { FileUtil.downloadSource(System.out, System.err, srcURL.toURL(), localDir, extract); } else { System.err.println("Missing source URL: " + target[0]); } } } }
protected void doExecute(RepositoryAdmin admin) throws Exception { for (String bundle : bundles) { String[] target = getTarget(bundle); Resource resource = selectNewestVersion(searchRepository(admin, target[0], target[1])); if (resource == null) { System.err.println("Unknown bundle and/or version: " + target[0]); } else { URI srcURL = (URI) resource.getProperties().get(Resource.SOURCE_URI); if (srcURL != null) { FileUtil.downloadSource(System.out, System.err, srcURL.toURL(), localDir, extract); } else { System.err.println("Missing source URL: " + target[0]); } } } }
protected void doExecute(RepositoryAdmin admin) throws Exception { for (String bundle : bundles) { String[] target = getTarget(bundle); Resource resource = selectNewestVersion(searchRepository(admin, target[0], target[1])); if (resource == null) { System.err.println("Unknown bundle and/or version: " + target[0]); } else { URI srcURL = (URI) resource.getProperties().get(Resource.SOURCE_URI); if (srcURL != null) { FileUtil.downloadSource(System.out, System.err, srcURL.toURL(), localDir, extract); } else { System.err.println("Missing source URL: " + target[0]); } } } }
printUnderline(out, resourceId.length()); Map map = resource.getProperties(); for (Object o : map.entrySet()) { Map.Entry entry = (Map.Entry) o;
printUnderline(out, resourceId.length()); Map map = resource.getProperties(); for (Object o : map.entrySet()) { Map.Entry entry = (Map.Entry) o;
private Resource[] discoverResources(String filterExpr) throws InvalidSyntaxException { // TODO(Sahoo): File a bug against Obr to add a suitable method to Repository interface. // We can't use the following method, because we can't rely on the RepositoryAdmin to have the correct // list of repositories. So, we do the discovery ourselves. // return getRepositoryAdmin().discoverResources(query); Filter filter = filterExpr != null ? getRepositoryAdmin().getHelper().filter(filterExpr) : null; Resource[] resources; Repository[] repos = getRepositories(); List<Resource> matchList = new ArrayList<Resource>(); for (int repoIdx = 0; (repos != null) && (repoIdx < repos.length); repoIdx++) { resources = repos[repoIdx].getResources(); for (int resIdx = 0; (resources != null) && (resIdx < resources.length); resIdx++) { Hashtable dict = new Hashtable(); dict.putAll(resources[resIdx].getProperties()); if (filter == null || filter.match(dict)) { matchList.add(resources[resIdx]); } } } return matchList.toArray(new Resource[matchList.size()]); }
printUnderline(out, resource.getPresentationName().length()); Map map = resource.getProperties(); for (Iterator iter = map.entrySet().iterator(); iter.hasNext(); )
printUnderline(out, resource.getPresentationName().length()); Map map = resource.getProperties(); for (Iterator iter = map.entrySet().iterator(); iter.hasNext(); )
printUnderline(out, resource.getPresentationName().length()); Map map = resource.getProperties(); for (Iterator iter = map.entrySet().iterator(); iter.hasNext(); )
printUnderline(out, name .length()); Map map = resource.getProperties(); for (Object o : map.entrySet()) { Map.Entry entry = (Map.Entry) o;
printUnderline(out, name .length()); Map map = resource.getProperties(); for (Iterator iter = map.entrySet().iterator(); iter.hasNext(); )
printUnderline(out, name .length()); Map map = resource.getProperties(); for (Object o : map.entrySet()) { Map.Entry entry = (Map.Entry) o;
printUnderline(out, name .length()); Map map = resource.getProperties(); for (Iterator iter = map.entrySet().iterator(); iter.hasNext(); )
printUnderline(out, name .length()); Map map = resource.getProperties(); for (Iterator iter = map.entrySet().iterator(); iter.hasNext(); )
@Override protected void populateItem(ListItem<ResourceWrapper> item) { ResourceWrapper resourceWrapper = item.getModelObject(); Resource resource = resourceWrapper.getResource(); String name = resource.getSymbolicName(); item.add(new Label("name", name)); String description = (String) resource.getProperties().get(Resource.DESCRIPTION); if(description==null) description = resource.getPresentationName(); item.add(new Label("description", description)); item.add(new Label("version", resource.getVersion().toString())); item.add(new CheckBox("install",new PropertyModel<Boolean>(item.getModel(),"checked"))); } };