comparison gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TestCallContext.java @ 1119:7c4f81f74c47

merged gnv-artifacts
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:00 +0200
parents c01c220312d0
children
comparison
equal deleted inserted replaced
1027:fca4b5eb8d2f 1119:7c4f81f74c47
1 /*
2 * Copyright (c) 2010 by Intevation GmbH
3 *
4 * This program is free software under the LGPL (>=v2.1)
5 * Read the file LGPL.txt coming with the software for details
6 * or visit http://www.gnu.org/licenses/ if it does not exist.
7 */
8
9 package de.intevation.gnv.artifacts;
10
11 import java.util.List;
12 import java.util.LinkedList;
13
14 import de.intevation.artifacts.ArtifactDatabase;
15 import de.intevation.artifacts.ArtifactFactory;
16 import de.intevation.artifacts.CallContext;
17 import de.intevation.artifacts.CallMeta;
18 import de.intevation.artifacts.DataProvider;
19 import de.intevation.artifacts.Message;
20
21 /**
22 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a>
23 *
24 */
25 public class TestCallContext implements CallContext {
26
27
28
29 private Object globalContext = null;
30 private CallMeta callMeta = null;
31 private ArtifactFactory artifactFactory = null;
32 private ArtifactDatabase artifactDatabase = null;
33 /**
34 * Constructor
35 */
36 public TestCallContext(Object globalContext,
37 CallMeta callMeta,
38 ArtifactFactory artifactFactory) {
39 this.globalContext = globalContext;
40 this.callMeta = callMeta;
41 this.artifactDatabase = new TestArtifactDatabase(artifactFactory);
42 }
43
44 /**
45 * @see de.intevation.artifacts.CallContext#afterBackground(int)
46 */
47 public void afterBackground(int action) {
48 }
49
50 /**
51 * @see de.intevation.artifacts.CallContext#afterCall(int)
52 */
53 public void afterCall(int action) {
54 }
55
56 public boolean isInBackground() {
57 throw new UnsupportedOperationException("Not supported yet.");
58 }
59
60 public void addBackgroundMessage(Message msg) {
61 throw new UnsupportedOperationException("Not supported yet.");
62 }
63
64 /**
65 * @see de.intevation.artifacts.CallContext#globalContext()
66 */
67 public Object globalContext() {
68 return this.globalContext;
69 }
70
71 public CallMeta getMeta() {
72 return this.callMeta;
73 }
74
75 public Object getContextValue(Object key) {
76 return null;
77 }
78
79 public Object putContextValue(Object key, Object value) {
80 return null;
81 }
82
83 public ArtifactDatabase getDatabase() {
84 return this.artifactDatabase;
85 }
86
87 public Long getTimeToLive() {
88 throw new UnsupportedOperationException("Not supported yet.");
89 }
90
91 public Object registerDataProvider(Object key, DataProvider provider) {
92 throw new UnsupportedOperationException("Not supported yet.");
93 }
94
95 public List<DataProvider> getDataProvider(Object key) {
96 throw new UnsupportedOperationException("Not supported yet.");
97 }
98
99 public LinkedList<Message> getBackgroundMessages() {
100 throw new UnsupportedOperationException("Not supported yet.");
101 }
102 }

http://dive4elements.wald.intevation.org