view artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultFacet.java @ 280:7fbe674d758a

Facets got a method that return its required data from the owner artifact. artifacts/trunk@2139 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 17 Jun 2011 07:40:20 +0000
parents 0a579b71496b
children 7c33cac15134
line wrap: on
line source
package de.intevation.artifactdatabase.state;

import de.intevation.artifacts.Artifact;
import de.intevation.artifacts.CallContext;


/**
 * The default implementation of a Facet.
 *
 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
 */
public class DefaultFacet implements Facet {

    /** The index of this facet.*/
    protected int index;

    /** The name of this facet.*/
    protected String name;

    /** The description of this facet.*/
    protected String description;


    /**
     * The default constructor to create new Facet objects.
     *
     * @param name The name of this new facet.
     * @param description The description of this new facet.
     */
    public DefaultFacet(String name, String description) {
        this(0, name, description);
    }


    /**
     * The default constructor to create new Facet objects.
     *
     * @param index The index of this new facet.
     * @param name The name of this new facet.
     * @param description The description of this new facet.
     */
    public DefaultFacet(int index, String name, String description) {
        this.index       = index;
        this.name        = name;
        this.description = description;
    }


    public int getIndex() {
        return index;
    }


    public String getName() {
        return name;
    }


    public String getDescription() {
        return description;
    }


    public Object getData(Artifact artifact, CallContext context) {
        return null;
    }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org