KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > osgi > internal > resolver > ReadOnlyState


1 /*******************************************************************************
2  * Copyright (c) 2004, 2007 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.osgi.internal.resolver;
12
13 import java.util.Dictionary JavaDoc;
14
15 import org.eclipse.osgi.service.resolver.*;
16 import org.osgi.framework.BundleException;
17 import org.osgi.framework.Version;
18
19 public class ReadOnlyState implements State {
20     private State target;
21
22     public ReadOnlyState(State target) {
23         this.target = target;
24     }
25
26     public boolean addBundle(BundleDescription description) {
27         throw new UnsupportedOperationException JavaDoc();
28     }
29
30     public StateDelta compare(State state) throws BundleException {
31         return target.compare(state);
32     }
33
34     public BundleDescription getBundle(long id) {
35         return target.getBundle(id);
36     }
37
38     public BundleDescription getBundle(String JavaDoc symbolicName, Version version) {
39         return target.getBundle(symbolicName, version);
40     }
41
42     public BundleDescription getBundleByLocation(String JavaDoc location) {
43         return target.getBundleByLocation(location);
44     }
45
46     public BundleDescription[] getBundles() {
47         return target.getBundles();
48     }
49
50     public BundleDescription[] getBundles(String JavaDoc symbolicName) {
51         return target.getBundles(symbolicName);
52     }
53
54     public StateDelta getChanges() {
55         return target.getChanges();
56     }
57
58     public ExportPackageDescription[] getExportedPackages() {
59         return target.getExportedPackages();
60     }
61
62     public StateObjectFactory getFactory() {
63         return target.getFactory();
64     }
65
66     public BundleDescription[] getResolvedBundles() {
67         return target.getResolvedBundles();
68     }
69
70     public long getTimeStamp() {
71         return target.getTimeStamp();
72     }
73
74     public boolean isEmpty() {
75         return target.isEmpty();
76     }
77
78     public boolean isResolved() {
79         return target.isResolved();
80     }
81
82     public boolean removeBundle(BundleDescription bundle) {
83         throw new UnsupportedOperationException JavaDoc();
84     }
85
86     public BundleDescription removeBundle(long bundleId) {
87         throw new UnsupportedOperationException JavaDoc();
88     }
89
90     public StateDelta resolve() {
91         throw new UnsupportedOperationException JavaDoc();
92     }
93
94     public StateDelta resolve(boolean incremental) {
95         throw new UnsupportedOperationException JavaDoc();
96     }
97
98     public StateDelta resolve(BundleDescription[] discard) {
99         throw new UnsupportedOperationException JavaDoc();
100     }
101
102     public void setOverrides(Object JavaDoc value) {
103         throw new UnsupportedOperationException JavaDoc();
104     }
105
106     public boolean updateBundle(BundleDescription newDescription) {
107         throw new UnsupportedOperationException JavaDoc();
108     }
109
110     public void resolveConstraint(VersionConstraint constraint, BaseDescription supplier) {
111         throw new UnsupportedOperationException JavaDoc();
112     }
113
114     public void resolveBundle(BundleDescription bundle, boolean status, BundleDescription[] host, ExportPackageDescription[] selectedExports, BundleDescription[] resolvedRequires, ExportPackageDescription[] resolveImports) {
115         throw new UnsupportedOperationException JavaDoc();
116     }
117
118     public void removeBundleComplete(BundleDescription bundle) {
119         throw new UnsupportedOperationException JavaDoc();
120     }
121
122     public Resolver getResolver() {
123         return null;
124     }
125
126     public void setResolver(Resolver value) {
127         throw new UnsupportedOperationException JavaDoc();
128     }
129
130     public boolean setPlatformProperties(Dictionary JavaDoc platformProperties) {
131         throw new UnsupportedOperationException JavaDoc();
132     }
133
134     public boolean setPlatformProperties(Dictionary JavaDoc platformProperties[]) {
135         throw new UnsupportedOperationException JavaDoc();
136     }
137
138     public Dictionary JavaDoc[] getPlatformProperties() {
139         return target.getPlatformProperties();
140     }
141
142     public ExportPackageDescription linkDynamicImport(BundleDescription importingBundle, String JavaDoc requestedPackage) {
143         throw new UnsupportedOperationException JavaDoc();
144     }
145
146     public void setTimeStamp(long timeStamp) {
147         throw new UnsupportedOperationException JavaDoc();
148     }
149
150     public ExportPackageDescription[] getSystemPackages() {
151         return target.getSystemPackages();
152     }
153
154     public void addResolverError(BundleDescription bundle, int type, String JavaDoc data, VersionConstraint unsatisfied) {
155         throw new UnsupportedOperationException JavaDoc();
156     }
157
158     public ResolverError[] getResolverErrors(BundleDescription bundle) {
159         return target.getResolverErrors(bundle);
160     }
161
162     public void removeResolverErrors(BundleDescription bundle) {
163         throw new UnsupportedOperationException JavaDoc();
164     }
165
166     public StateHelper getStateHelper() {
167         return StateHelperImpl.getInstance();
168     }
169
170     public long getHighestBundleId() {
171         return target.getHighestBundleId();
172     }
173 }
174
Popular Tags