001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one
003: * or more contributor license agreements. See the NOTICE file
004: * distributed with this work for additional information
005: * regarding copyright ownership. The ASF licenses this file
006: * to you under the Apache License, Version 2.0 (the
007: * "License"); you may not use this file except in compliance
008: * with the License. You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing,
013: * software distributed under the License is distributed on an
014: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015: * KIND, either express or implied. See the License for the
016: * specific language governing permissions and limitations
017: * under the License.
018: */
019:
020: package org.apache.geronimo.kernel.mock;
021:
022: import java.util.List;
023: import java.util.Collections;
024: import java.util.Collection;
025: import java.util.LinkedHashSet;
026: import java.io.IOException;
027:
028: import org.apache.geronimo.kernel.config.ConfigurationManager;
029: import org.apache.geronimo.kernel.config.ConfigurationStore;
030: import org.apache.geronimo.kernel.config.NoSuchStoreException;
031: import org.apache.geronimo.kernel.config.Configuration;
032: import org.apache.geronimo.kernel.config.LifecycleResults;
033: import org.apache.geronimo.kernel.config.NoSuchConfigException;
034: import org.apache.geronimo.kernel.config.LifecycleException;
035: import org.apache.geronimo.kernel.config.ConfigurationData;
036: import org.apache.geronimo.kernel.config.LifecycleMonitor;
037: import org.apache.geronimo.kernel.config.InvalidConfigException;
038: import org.apache.geronimo.kernel.repository.Artifact;
039: import org.apache.geronimo.kernel.repository.Version;
040: import org.apache.geronimo.kernel.repository.ArtifactResolver;
041: import org.apache.geronimo.kernel.repository.Repository;
042: import org.apache.geronimo.kernel.repository.MissingDependencyException;
043: import org.apache.geronimo.gbean.AbstractName;
044:
045: /**
046: * @version $Rev: 620870 $ $Date: 2008-02-12 09:24:48 -0800 (Tue, 12 Feb 2008) $
047: */
048: public class MockConfigurationManager implements ConfigurationManager {
049:
050: public boolean isInstalled(Artifact configurationId) {
051: return false;
052: }
053:
054: public Artifact[] getInstalled(Artifact query) {
055: return new Artifact[0];
056: }
057:
058: public Artifact[] getLoaded(Artifact query) {
059: return new Artifact[0];
060: }
061:
062: public Artifact[] getRunning(Artifact query) {
063: return new Artifact[0];
064: }
065:
066: public boolean isLoaded(Artifact configID) {
067: return false;
068: }
069:
070: public List listStores() {
071: return Collections.EMPTY_LIST;
072: }
073:
074: public ConfigurationStore[] getStores() {
075: return new ConfigurationStore[0];
076: }
077:
078: public ConfigurationStore getStoreForConfiguration(
079: Artifact configuration) {
080: return null;
081: }
082:
083: public List listConfigurations(AbstractName store)
084: throws NoSuchStoreException {
085: return Collections.EMPTY_LIST;
086: }
087:
088: public boolean isRunning(Artifact configurationId) {
089: return false;
090: }
091:
092: public List listConfigurations() {
093: return null;
094: }
095:
096: public boolean isConfiguration(Artifact artifact) {
097: return false;
098: }
099:
100: public Configuration getConfiguration(Artifact configurationId) {
101: return null;
102: }
103:
104: public LifecycleResults loadConfiguration(Artifact configurationId)
105: throws NoSuchConfigException, LifecycleException {
106: return null;
107: }
108:
109: public LifecycleResults loadConfiguration(
110: ConfigurationData configurationData)
111: throws NoSuchConfigException, LifecycleException {
112: return null;
113: }
114:
115: public LifecycleResults loadConfiguration(Artifact configurationId,
116: LifecycleMonitor monitor) throws NoSuchConfigException,
117: LifecycleException {
118: return null;
119: }
120:
121: public LifecycleResults loadConfiguration(
122: ConfigurationData configurationData,
123: LifecycleMonitor monitor) throws NoSuchConfigException,
124: LifecycleException {
125: return null;
126: }
127:
128: public LifecycleResults unloadConfiguration(Artifact configurationId)
129: throws NoSuchConfigException {
130: return null;
131: }
132:
133: public LifecycleResults unloadConfiguration(
134: Artifact configurationId, LifecycleMonitor monitor)
135: throws NoSuchConfigException {
136: return null;
137: }
138:
139: public LifecycleResults startConfiguration(Artifact configurationId)
140: throws NoSuchConfigException, LifecycleException {
141: return null;
142: }
143:
144: public LifecycleResults startConfiguration(
145: Artifact configurationId, LifecycleMonitor monitor)
146: throws NoSuchConfigException, LifecycleException {
147: return null;
148: }
149:
150: public LifecycleResults stopConfiguration(Artifact configurationId)
151: throws NoSuchConfigException {
152: return null;
153: }
154:
155: public LifecycleResults stopConfiguration(Artifact configurationId,
156: LifecycleMonitor monitor) throws NoSuchConfigException {
157: return null;
158: }
159:
160: public LifecycleResults restartConfiguration(
161: Artifact configurationId) throws NoSuchConfigException,
162: LifecycleException {
163: return null;
164: }
165:
166: public LifecycleResults restartConfiguration(
167: Artifact configurationId, LifecycleMonitor monitor)
168: throws NoSuchConfigException, LifecycleException {
169: return null;
170: }
171:
172: public LifecycleResults reloadConfiguration(Artifact configurationId)
173: throws NoSuchConfigException, LifecycleException {
174: return null;
175: }
176:
177: public LifecycleResults reloadConfiguration(
178: Artifact configurationId, LifecycleMonitor monitor)
179: throws NoSuchConfigException, LifecycleException {
180: return null;
181: }
182:
183: public LifecycleResults reloadConfiguration(
184: Artifact configurationId, Version version)
185: throws NoSuchConfigException, LifecycleException {
186: return null;
187: }
188:
189: public LifecycleResults reloadConfiguration(
190: Artifact configurationId, Version version,
191: LifecycleMonitor monitor) throws NoSuchConfigException,
192: LifecycleException {
193: return null;
194: }
195:
196: public LifecycleResults reloadConfiguration(
197: ConfigurationData configurationData)
198: throws NoSuchConfigException, LifecycleException {
199: return null;
200: }
201:
202: public LifecycleResults reloadConfiguration(
203: ConfigurationData configurationData,
204: LifecycleMonitor monitor) throws NoSuchConfigException,
205: LifecycleException {
206: return null;
207: }
208:
209: public void uninstallConfiguration(Artifact configurationId)
210: throws IOException, NoSuchConfigException {
211:
212: }
213:
214: public ArtifactResolver getArtifactResolver() {
215: return null;
216: }
217:
218: public boolean isOnline() {
219: return true;
220: }
221:
222: public void setOnline(boolean online) {
223: }
224:
225: public Collection<? extends Repository> getRepositories() {
226: return null;
227: }
228:
229: public LinkedHashSet<Artifact> sort(List<Artifact> ids,
230: LifecycleMonitor monitor) throws InvalidConfigException,
231: IOException, NoSuchConfigException,
232: MissingDependencyException {
233: return null;
234: }
235: }
|