Mercurial > dive4elements > gnv-client
view gnv/src/main/java/de/intevation/gnv/action/sessionmodel/SessionModel.java @ 1022:28a0628b11b0
Added license file and license header.
gnv/trunk@1258 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 02 Nov 2010 17:15:08 +0000 |
parents | d1ed5c51c0de |
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.action.sessionmodel; import java.io.Serializable; import java.util.Collection; import java.util.Locale; import de.intevation.gnv.artifactdatabase.objects.ArtifactDescription; import de.intevation.gnv.artifactdatabase.objects.ArtifactObject; import de.intevation.gnv.artifactdatabase.objects.ArtifactStatisticsSet; import de.intevation.gnv.artifactdatabase.objects.OutputMode; import de.intevation.gnv.artifactdatabase.objects.map.MapService; /** * This interface describe basic methods to store artifacts and diagram options. * The SessionModel is saved in the session, which keeps alive during the work. * * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> * */ public interface SessionModel extends Serializable { /** * Returns all Artifactfactories which were retrieved from the * Artifactdatabases which are connected to the Client. * @return the artifactfactories. */ Collection<ArtifactObject> getArtifactFactories(); /** * Sets all Artifactfactories which were retieved from the Artifactdatabases * to the SessionModel. * @param artifactFactories the artifactfactories. */ void setArtifacteFactories(Collection<ArtifactObject> artifactFactories); /** * Set the Artifactfactory which match to the given id to selected. * @param artiFactFactoryId the id of the artifactfactory which should * be selected. */ void selectArtifactFactory(String artiFactFactoryId); /** * Returns the Artifactfactory which is selected. * @return the artifactfactory which is selected. */ ArtifactObject getSelectedArtifactFactory(); /** * Returns the currently used artifact. * This Artifact will retrieved from the selected artifactfactory and will * be used to do handle the special businesslogic. * @return the artifact which is currently used. */ ArtifactObject getCurrentArtifact(); /** * Sets a new Artifact as the artifact that should be used. * @param artifact the new artifact which should be used. */ void setCurrentArtifact(ArtifactObject artifact); /** * Sets the currently used diagrammoptions to the Sessionmodel. * Diagrammoptions will be used to manipulate the look of diagramms * and render the GUI so that the user is enabled to switch the options. * Diagrammoptions are also used for Histogram, all Exports and WMS * @param diagrammOptions the Options that should be used. */ void setDiagrammOptions(DiagrammOptions diagrammOptions); /** * Returns the diagrammoptions that currently set to the SessionModel. * @return the diagrammoptions that currently set to the SessionModel. */ DiagrammOptions getDiagrammOptions(); /** * Returns the Outputmode that matches to the given name of an mode. * Outputmodes are used to define which kind of modes are defined to * generate an result for a given Artifact (chart, export, wms,...) * @param name the name of the OutputMode that should be used * @return the OutputMode that matches to the given name. */ OutputMode getOutputMode(String name); /** * Returns the description to the currently used Artifact. * The description can be used to retrieve the supported OutputModes, * the parameters that could be feed, ... * @return the description of the artifact which is currently used. */ ArtifactDescription getArtifactDescription(); /** * Reset the Model. So that it will have the status as no Artifactfactory * was selected. */ void resetModel(); /** * Sets the Statistics that were retrieved from the currently used Artifact * to the SessionModel. * @param statistics the Statistics that should be shown in the GUI. */ void setStatistics(Collection<ArtifactStatisticsSet> statistics); /** * Returns the statistics that are currently set to the SessionModel * @return the statistics that are currently set to the SessionModel */ Collection<ArtifactStatisticsSet> getStatistics(); /** * Sets the locale that should be used. * The loacle will be used to customize the GUI for a language that matches * to the locale or it will be used to tell the Artifactdatabase which locale * has to be used. * @param locale the locale that should be used. */ void setCurrentLocale(Locale locale); /** * Returns the currently used locale. * @return the locale that is currently used. */ Locale getCurrentLocale(); void setLocalMapService(MapService mapService); MapService getLocalMapService(); } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :