KickJava   Java API By Example, From Geeks To Geeks.

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


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 org.eclipse.core.boot.IPlatformConfiguration.ISitePolicy;
14 import org.eclipse.update.configurator.IPlatformConfiguration;
15
16 public class SitePolicy implements ISitePolicy {
17     private IPlatformConfiguration.ISitePolicy newPolicy;
18
19     public SitePolicy(IPlatformConfiguration.ISitePolicy policy) {
20         newPolicy = policy;
21     }
22
23     public int getType() {
24         return newPolicy.getType();
25     }
26
27     public String JavaDoc[] getList() {
28         return newPolicy.getList();
29     }
30
31     public void setList(String JavaDoc[] list) {
32         newPolicy.setList(list);
33     }
34
35     public IPlatformConfiguration.ISitePolicy getNewPolicy() {
36         return newPolicy;
37     }
38
39     public boolean equals(Object JavaDoc o) {
40         if (o instanceof SitePolicy)
41             return newPolicy.equals(((SitePolicy) o).newPolicy);
42         return false;
43     }
44
45     public int hashCode() {
46         return newPolicy.hashCode();
47     }
48 }
49
Popular Tags