view gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TestCallContext.java @ 1118:c01c220312d0

Made it compile again with an updated ArtifactDatabase. gnv-artifacts/trunk@4137 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 12 Mar 2012 08:31:46 +0000
parents f953c9a559d8
children
line wrap: on
line source
/*
 * Copyright (c) 2010 by Intevation GmbH
 *
 * This program is free software under the LGPL (>=v2.1)
 * Read the file LGPL.txt coming with the software for details
 * or visit http://www.gnu.org/licenses/ if it does not exist.
 */

package de.intevation.gnv.artifacts;

import java.util.List;
import java.util.LinkedList;

import de.intevation.artifacts.ArtifactDatabase;
import de.intevation.artifacts.ArtifactFactory;
import de.intevation.artifacts.CallContext;
import de.intevation.artifacts.CallMeta;
import de.intevation.artifacts.DataProvider;
import de.intevation.artifacts.Message;

/**
 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a>
 *
 */
public class TestCallContext implements CallContext {



    private Object globalContext = null;
    private CallMeta callMeta = null;
    private ArtifactFactory artifactFactory = null;
    private ArtifactDatabase artifactDatabase = null;
    /**
     * Constructor
     */
    public TestCallContext(Object globalContext,
                           CallMeta callMeta,
                           ArtifactFactory artifactFactory) {
        this.globalContext = globalContext;
        this.callMeta = callMeta;
        this.artifactDatabase  = new TestArtifactDatabase(artifactFactory);
    }

    /**
     * @see de.intevation.artifacts.CallContext#afterBackground(int)
     */
    public void afterBackground(int action) {
    }

    /**
     * @see de.intevation.artifacts.CallContext#afterCall(int)
     */
    public void afterCall(int action) {
    }

    public boolean isInBackground() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void addBackgroundMessage(Message msg) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    /**
     * @see de.intevation.artifacts.CallContext#globalContext()
     */
    public Object globalContext() {
        return this.globalContext;
    }

    public CallMeta getMeta() {
        return this.callMeta;
    }

    public Object getContextValue(Object key) {
        return null;
    }

    public Object putContextValue(Object key, Object value) {
        return null;
    }

    public ArtifactDatabase getDatabase() {
        return this.artifactDatabase;
    }

    public Long getTimeToLive() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public Object registerDataProvider(Object key, DataProvider provider) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public List<DataProvider> getDataProvider(Object key) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public LinkedList<Message> getBackgroundMessages() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}

http://dive4elements.wald.intevation.org