view artifact-database/src/main/java/de/intevation/artifactdatabase/CollectionCallContext.java @ 330:3168af23aec5

Added a CallContext.isInBackground() method to determine if an Artifact or a Collection has started a background thread and is currently locked. artifacts/trunk@2666 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 07 Sep 2011 13:51:02 +0000
parents a8a06bbe306c
children 089c6f7794b5
line wrap: on
line source
/*
 * Copyright (c) 2011 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.artifactdatabase;

import org.apache.log4j.Logger;

import de.intevation.artifacts.ArtifactCollection;
import de.intevation.artifacts.CallMeta;


/**
 * Class that implements the call context handed to ArtifactCollection specific
 * operations.
 *
 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
 */
public class CollectionCallContext extends AbstractCallContext {

    private static Logger log = Logger.getLogger(CollectionCallContext.class);

    /**
     * The ArtifactCollection.
     */
    protected ArtifactCollection collection;


    public CollectionCallContext(
        ArtifactDatabaseImpl artifactDatabase,
        int                  action,
        CallMeta             callMeta,
        ArtifactCollection   collection)
    {
        super(artifactDatabase, action, callMeta);

        this.collection = collection;
    }


    public void afterCall(int action) {
        log.debug("CollectionCallContext.afterCall - NOT IMPLEMENTED");
    }


    public void afterBackground(int action) {
        log.debug("CollectionCallContext.afterBackground - NOT IMPLEMENTED");
    }


    public boolean isInBackground() {
        log.debug("CollectionCallContext.isInBackground - NOT IMPLEMENTED");
        return false;
    }


    public Long getTimeToLive() {
        log.debug("CollectionCallContext.getTimeToLive - NOT IMPLEMENTED");
        return null;
    }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org