KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > internal > boot > SiteEntry


1 /*******************************************************************************
2  * Copyright (c) 2003, 2006 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.core.internal.boot;
12
13 import java.net.URL JavaDoc;
14 import org.eclipse.core.boot.IPlatformConfiguration.ISiteEntry;
15 import org.eclipse.core.boot.IPlatformConfiguration.ISitePolicy;
16 import org.eclipse.update.configurator.IPlatformConfiguration;
17
18 public class SiteEntry implements ISiteEntry {
19     private org.eclipse.update.configurator.IPlatformConfiguration.ISiteEntry newSiteEntry;
20
21     public SiteEntry(IPlatformConfiguration.ISiteEntry entry) {
22         newSiteEntry = entry;
23     }
24
25     public URL JavaDoc getURL() {
26         return newSiteEntry.getURL();
27     }
28
29     public ISitePolicy getSitePolicy() {
30         return new SitePolicy(newSiteEntry.getSitePolicy());
31     }
32
33     public void setSitePolicy(ISitePolicy policy) {
34         newSiteEntry.setSitePolicy(((SitePolicy) policy).getNewPolicy());
35     }
36
37     public String JavaDoc[] getFeatures() {
38         return newSiteEntry.getFeatures();
39     }
40
41     public String JavaDoc[] getPlugins() {
42         return newSiteEntry.getPlugins();
43     }
44
45     public long getChangeStamp() {
46         return newSiteEntry.getChangeStamp();
47     }
48
49     public long getFeaturesChangeStamp() {
50         return newSiteEntry.getFeaturesChangeStamp();
51     }
52
53     public long getPluginsChangeStamp() {
54         return newSiteEntry.getPluginsChangeStamp();
55     }
56
57     public boolean isUpdateable() {
58         return newSiteEntry.isUpdateable();
59     }
60
61     public boolean isNativelyLinked() {
62         return newSiteEntry.isNativelyLinked();
63     }
64
65     public org.eclipse.update.configurator.IPlatformConfiguration.ISiteEntry getNewSiteEntry() {
66         return newSiteEntry;
67     }
68
69     public boolean equals(Object JavaDoc o) {
70         if (o instanceof SiteEntry)
71             return newSiteEntry.equals(((SiteEntry) o).newSiteEntry);
72         return false;
73     }
74
75     public int hashCode() {
76         return newSiteEntry.hashCode();
77     }
78 }
79
Popular Tags