tim@8: package de.intevation.gnv.action.sessionmodel; tim@8: tim@954: import java.io.Serializable; tim@954: import java.util.Collection; tim@954: import java.util.Locale; tim@954: tim@30: import de.intevation.gnv.artifactdatabase.objects.ArtifactDescription; tim@8: import de.intevation.gnv.artifactdatabase.objects.ArtifactObject; tim@164: import de.intevation.gnv.artifactdatabase.objects.ArtifactStatisticsSet; tim@30: import de.intevation.gnv.artifactdatabase.objects.OutputMode; tim@8: tim@8: /** ingo@690: * This interface describe basic methods to store artifacts and diagram options. ingo@690: * The SessionModel is saved in the session, which keeps alive during the work. sascha@699: * sascha@684: * @author Tim Englich sascha@681: * tim@8: */ tim@36: public interface SessionModel extends Serializable { tim@36: tim@954: /** tim@954: * Returns all Artifactfactories which were retrieved from the tim@954: * Artifactdatabases which are connected to the Client. tim@954: * @return the artifactfactories. tim@954: */ tim@8: Collection getArtifactFactories(); tim@36: tim@954: /** tim@954: * Sets all Artifactfactories which were retieved from the Artifactdatabases tim@954: * to the SessionModel. tim@954: * @param artifactFactories the artifactfactories. tim@954: */ tim@8: void setArtifacteFactories(Collection artifactFactories); tim@36: tim@954: /** tim@954: * Set the Artifactfactory which match to the given id to selected. tim@954: * @param artiFactFactoryId the id of the artifactfactory which should tim@954: * be selected. tim@954: */ tim@8: void selectArtifactFactory(String artiFactFactoryId); tim@36: tim@954: /** tim@954: * Returns the Artifactfactory which is selected. tim@954: * @return the artifactfactory which is selected. tim@954: */ tim@8: ArtifactObject getSelectedArtifactFactory(); tim@36: tim@954: /** tim@954: * Returns the currently used artifact. tim@954: * This Artifact will retrieved from the selected artifactfactory and will tim@954: * be used to do handle the special businesslogic. tim@954: * @return the artifact which is currently used. tim@954: */ tim@8: ArtifactObject getCurrentArtifact(); tim@36: tim@954: /** tim@954: * Sets a new Artifact as the artifact that should be used. tim@954: * @param artifact the new artifact which should be used. tim@954: */ tim@8: void setCurrentArtifact(ArtifactObject artifact); tim@36: tim@954: /** tim@954: * Sets the currently used diagrammoptions to the Sessionmodel. tim@954: * Diagrammoptions will be used to manipulate the look of diagramms tim@954: * and render the GUI so that the user is enabled to switch the options. tim@954: * Diagrammoptions are also used for Histogram, all Exports and WMS tim@954: * @param diagrammOptions the Options that should be used. tim@954: */ tim@30: void setDiagrammOptions(DiagrammOptions diagrammOptions); tim@36: tim@954: /** tim@954: * Returns the diagrammoptions that currently set to the SessionModel. tim@954: * @return the diagrammoptions that currently set to the SessionModel. tim@954: */ tim@29: DiagrammOptions getDiagrammOptions(); tim@36: tim@954: /** tim@954: * Returns the Outputmode that matches to the given name of an mode. tim@954: * Outputmodes are used to define which kind of modes are defined to tim@954: * generate an result for a given Artifact (chart, export, wms,...) tim@954: * @param name the name of the OutputMode that should be used tim@954: * @return the OutputMode that matches to the given name. tim@954: */ tim@30: OutputMode getOutputMode(String name); tim@36: tim@954: /** tim@954: * Returns the description to the currently used Artifact. tim@954: * The description can be used to retrieve the supported OutputModes, tim@954: * the parameters that could be feed, ... tim@954: * @return the description of the artifact which is currently used. tim@954: */ tim@30: ArtifactDescription getArtifactDescription(); tim@36: tim@954: /** tim@954: * Reset the Model. So that it will have the status as no Artifactfactory tim@954: * was selected. tim@954: */ tim@30: void resetModel(); tim@36: tim@954: /** tim@954: * Sets the Statistics that were retrieved from the currently used Artifact tim@954: * to the SessionModel. tim@954: * @param statistics the Statistics that should be shown in the GUI. tim@954: */ tim@164: void setStatistics(Collection statistics); tim@36: tim@954: /** tim@954: * Returns the statistics that are currently set to the SessionModel tim@954: * @return the statistics that are currently set to the SessionModel tim@954: */ tim@164: Collection getStatistics(); ingo@706: tim@954: /** tim@954: * Sets the locale that should be used. tim@954: * The loacle will be used to customize the GUI for a language that matches tim@954: * to the locale or it will be used to tell the Artifactdatabase which locale tim@954: * has to be used. tim@954: * @param locale the locale that should be used. tim@954: */ ingo@706: void setCurrentLocale(Locale locale); ingo@706: tim@954: /** tim@954: * Returns the currently used locale. tim@954: * @return the locale that is currently used. tim@954: */ ingo@706: Locale getCurrentLocale(); tim@8: } sascha@700: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :