ingo@1115: /* ingo@1115: * Copyright (c) 2010 by Intevation GmbH ingo@1115: * ingo@1115: * This program is free software under the LGPL (>=v2.1) ingo@1115: * Read the file LGPL.txt coming with the software for details ingo@1115: * or visit http://www.gnu.org/licenses/ if it does not exist. ingo@1115: */ ingo@1115: tim@102: package de.intevation.gnv.artifacts; tim@102: ingo@1118: import java.util.List; ingo@1118: import java.util.LinkedList; ingo@1118: tim@485: import de.intevation.artifacts.ArtifactDatabase; tim@485: import de.intevation.artifacts.ArtifactFactory; tim@102: import de.intevation.artifacts.CallContext; tim@116: import de.intevation.artifacts.CallMeta; ingo@1118: import de.intevation.artifacts.DataProvider; ingo@1118: import de.intevation.artifacts.Message; tim@102: tim@102: /** sascha@780: * @author Tim Englich sascha@778: * tim@102: */ tim@102: public class TestCallContext implements CallContext { tim@102: tim@485: tim@485: tim@102: private Object globalContext = null; tim@117: private CallMeta callMeta = null; tim@485: private ArtifactFactory artifactFactory = null; tim@485: private ArtifactDatabase artifactDatabase = null; tim@102: /** tim@102: * Constructor tim@102: */ sascha@778: public TestCallContext(Object globalContext, sascha@778: CallMeta callMeta, tim@485: ArtifactFactory artifactFactory) { tim@102: this.globalContext = globalContext; tim@117: this.callMeta = callMeta; tim@485: this.artifactDatabase = new TestArtifactDatabase(artifactFactory); tim@102: } tim@102: tim@102: /** tim@102: * @see de.intevation.artifacts.CallContext#afterBackground(int) tim@102: */ tim@102: public void afterBackground(int action) { tim@102: } tim@102: tim@102: /** tim@102: * @see de.intevation.artifacts.CallContext#afterCall(int) tim@102: */ tim@102: public void afterCall(int action) { tim@102: } tim@102: ingo@1118: public boolean isInBackground() { ingo@1118: throw new UnsupportedOperationException("Not supported yet."); ingo@1118: } ingo@1118: ingo@1118: public void addBackgroundMessage(Message msg) { ingo@1118: throw new UnsupportedOperationException("Not supported yet."); ingo@1118: } ingo@1118: tim@102: /** tim@102: * @see de.intevation.artifacts.CallContext#globalContext() tim@102: */ tim@102: public Object globalContext() { tim@102: return this.globalContext; tim@102: } tim@102: tim@116: public CallMeta getMeta() { tim@117: return this.callMeta; tim@116: } tim@116: tim@306: public Object getContextValue(Object key) { tim@485: return null; tim@306: } tim@306: tim@306: public Object putContextValue(Object key, Object value) { tim@485: return null; tim@306: } tim@306: tim@485: public ArtifactDatabase getDatabase() { tim@485: return this.artifactDatabase; tim@485: } sascha@797: sascha@797: public Long getTimeToLive() { sascha@797: throw new UnsupportedOperationException("Not supported yet."); sascha@797: } ingo@1118: ingo@1118: public Object registerDataProvider(Object key, DataProvider provider) { ingo@1118: throw new UnsupportedOperationException("Not supported yet."); ingo@1118: } ingo@1118: ingo@1118: public List getDataProvider(Object key) { ingo@1118: throw new UnsupportedOperationException("Not supported yet."); ingo@1118: } ingo@1118: ingo@1118: public LinkedList getBackgroundMessages() { ingo@1118: throw new UnsupportedOperationException("Not supported yet."); ingo@1118: } tim@102: }