1 11 package org.eclipse.update.search; 12 13 import java.net.*; 14 import java.util.Vector ; 15 16 import org.eclipse.update.internal.search.*; 17 18 33 34 public class UpdateSearchScope { 35 private Vector sites; 36 private URL updateMapURL; 37 private boolean isFeatureProvidedSitesEnabled = true; 38 39 private static class UpdateSearchSite 40 extends UpdateSiteAdapter 41 implements IUpdateSearchSite { 42 private String [] categoriesToSkip; 43 44 public UpdateSearchSite( 45 String label, 46 URL siteURL, 47 String [] categoriesToSkip) { 48 super(label, siteURL); 49 this.categoriesToSkip = categoriesToSkip; 50 } 51 public String [] getCategoriesToSkip() { 52 return categoriesToSkip; 53 } 54 } 55 56 59 public UpdateSearchScope() { 60 sites = new Vector (); 61 } 62 63 72 73 public void setUpdateMapURL(URL url) { 74 this.updateMapURL = url; 75 } 76 77 83 84 public URL getUpdateMapURL() { 85 return updateMapURL; 86 } 87 88 94 public void addSearchSite( 95 String label, 96 URL siteURL, 97 String [] categoriesToSkip) { 98 sites.add(new UpdateSearchSite(label, siteURL, categoriesToSkip)); 99 } 100 101 105 public IUpdateSearchSite[] getSearchSites() { 106 return (UpdateSearchSite[]) sites.toArray( 107 new UpdateSearchSite[sites.size()]); 108 } 109 110 115 public boolean isFeatureProvidedSitesEnabled(){ 116 return isFeatureProvidedSitesEnabled; 117 } 118 119 124 public void setFeatureProvidedSitesEnabled(boolean enable){ 125 this.isFeatureProvidedSitesEnabled = enable; 126 } 127 } 128 | Popular Tags |