view flys-artifacts/src/main/java/de/intevation/flys/exports/OutGenerator.java @ 1944:21a4d2c677a1

Changed doOut signature, side effect from blackboard feature (to come). flys-artifacts/trunk@3334 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 30 Nov 2011 10:10:42 +0000
parents bdb05dc9b763
children 65f9d707caff
line wrap: on
line source
package de.intevation.flys.exports;

import java.io.IOException;
import java.io.OutputStream;

import org.w3c.dom.Document;

import de.intevation.artifactdatabase.state.ArtifactAndFacet;
import de.intevation.artifacts.Artifact;
import de.intevation.artifacts.CallContext;

import de.intevation.artifactdatabase.state.Facet;


/**
 * An OutGenerator is used to create a collected outputs of a list of Artifacts.
 *
 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
 */
public interface OutGenerator {

    /**
     * Initializes the OutGenerator with meta information which are necessary
     * for the output generation.
     *
     * @param request The incomding request document.
     * @param out     The output stream.
     * @param context The CallContext that provides further information and
     * objects used for the output generation.
     */
    void init(Document request, OutputStream out, CallContext context);

    /**
     * This method is used to tell the OutGenerator which artifact is the master
     * artifact which is used for special operations.
     *
     * @param master The master artifact.
     */
    void setMasterArtifact(Artifact master);

    /**
     * Creates the output of an Artifact and appends that single output to the
     * total output.
     *
     * @param artifact The artifact that provides information and data for the
     * single output.
     * @param attr A document that might contain some attributes used while
     * producing the output.
     * @param visible Specifies, if this output should be visible or not.
     */
    void doOut(ArtifactAndFacet bundle, Document attr, boolean visible);

    /**
     * Writes the collected output of all artifacts specified in the
     * <i>request</i> (see init()) document to the OutputStream <i>out</i> (see
     * init()).
     */
    void generate() throws IOException;
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org