KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > update > internal > search > UpdateSiteAdapter


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.update.internal.search;
12
13 import java.net.*;
14
15 import org.eclipse.update.search.*;
16
17 /**
18  */

19 public class UpdateSiteAdapter implements IUpdateSiteAdapter {
20     private String JavaDoc label;
21     private URL url;
22     
23     public UpdateSiteAdapter(String JavaDoc label, URL url) {
24         this.label = label;
25         this.url = url;
26     }
27     public URL getURL() {
28         return url;
29     }
30     public String JavaDoc getLabel() {
31         return label;
32     }
33 /*
34     public ISite getSite(IProgressMonitor monitor) {
35         try {
36             return SiteManager.getSite(getURL(), monitor);
37         } catch (CoreException e) {
38             return null;
39         }
40     }
41 */

42     public String JavaDoc toString(){
43         return "" + getURL(); //$NON-NLS-1$
44
}
45 }
46
Popular Tags