ingo@63: package de.intevation.flys.client.shared.model;
ingo@63:
ingo@63: import java.io.Serializable;
ingo@275: import java.util.List;
ingo@63:
ingo@796: import de.intevation.flys.client.client.ui.CollectionView;
ingo@796: import de.intevation.flys.client.client.ui.OutputTab;
ingo@796:
ingo@63:
ingo@63: /**
ingo@63: * This interface describes an output mode of an artifact.
ingo@63: *
ingo@63: * @author Ingo Weinzierl
ingo@63: */
ingo@63: public interface OutputMode extends Serializable {
ingo@63:
ingo@63: /**
ingo@63: * Retrieves the name of this mode.
ingo@63: *
ingo@63: * @return the name of this mode.
ingo@63: */
ingo@63: String getName();
ingo@63:
ingo@63:
ingo@63: /**
ingo@63: * Retrieves the description of this mode.
ingo@63: *
ingo@63: * @return the description of this mode.
ingo@63: */
ingo@63: String getDescription();
ingo@63:
ingo@63:
ingo@63: /**
ingo@63: * Retrieves the mime-type of this mode.
ingo@63: *
ingo@63: *
ingo@63: * @return the mime-type of this mode.
ingo@63: */
ingo@63: String getMimeType();
ingo@270:
ingo@270:
ingo@270: /**
ingo@796: * Returns the type of this mode.
ingo@796: *
ingo@796: * @return the type of this mode.
ingo@796: */
ingo@796: String getType();
ingo@796:
ingo@796:
ingo@796: /**
ingo@270: * Adds a new facet to this mode.
ingo@270: *
ingo@270: * @param facet The new facet.
ingo@270: */
ingo@270: void addFacet(Facet facet);
ingo@270:
ingo@270:
ingo@270: /**
ingo@270: * Returns the number of facets supported by this mode.
ingo@270: *
ingo@270: * @return the number of facets.
ingo@270: */
ingo@270: int getFacetCount();
ingo@270:
ingo@270:
ingo@270: /**
ingo@270: * Returns the facet at a given position.
ingo@270: *
ingo@270: * @param idx The position of a facet.
ingo@270: *
ingo@270: * @return a facet.
ingo@270: */
ingo@270: Facet getFacet(int idx);
ingo@270:
ingo@270:
ingo@270: /**
ingo@270: * Returns a facet based on its name.
ingo@270: *
ingo@270: * @param name The name of the facet.
ingo@270: *
ingo@270: * @return a facet or null if no such facet is available.
ingo@270: */
ingo@270: Facet getFacet(String name);
ingo@275:
ingo@275:
ingo@275: /**
ingo@275: * Returns all facets of this mode.
ingo@275: *
ingo@275: * @return all facets.
ingo@275: */
ingo@275: List getFacets();
ingo@796:
ingo@796:
ingo@796: /**
ingo@796: * Returns an OutputTab that is used to render the output mode.
ingo@796: *
ingo@796: * @param t The title.
ingo@796: * @param c The Collection.
ingo@796: * @param p The parent CollectionView.
ingo@796: *
ingo@796: * @return an OutputTab.
ingo@796: */
ingo@796: OutputTab createOutputTab(String t, Collection c, CollectionView p);
ingo@63: }
ingo@63: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :