view artifacts/src/main/java/de/intevation/artifacts/ArtifactDatabase.java @ 10:e8626caac353

* Made Artifact life cycle symmetric: setup/endOfLife. * Implement defaults for Artifact and ArtifactFactory. * Added connection pooling from apache commons dbcp * Made sql schema of artifact database more compatible. * Improve example config. * Made artifactdb start with 'mvn exec:exec' * minor fixes. artifacts/trunk@25 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 06 Sep 2009 12:00:56 +0000
parents 13a12b607baf
children c2d53bd30ab8
line wrap: on
line source
package de.intevation.artifacts;

/**
 * Interface of an artifact managing database.
 *
 * @author Sascha L. Teichmann (sascha.teichmann@intevation.de)
 */
public interface ArtifactDatabase
{
    /**
     * List of artifact factories names accessible through the database.
     * @return names of the factories.
     */
    String [] getArtifactFactoryNames();

    /**
     * Look up an artifact by its identifier.
     * @return the artifact. null if the artifact is not found.
     */
    Artifact getArtifact(String identifier);

    /**
     * Creates new artifact with a certain factory.
     * @param factoryName the name of the factory. Name out of {@link #getArtifactFactoryNames() getArtifactFactoryNames()}.
     */
    Artifact createArtifactWithFactory(String factoryName);


    /**
     * Returns the global artifact runtime context.
     * @return the runtime context
     */
    Object getArtifactContext();
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

http://dive4elements.wald.intevation.org