001/*
002 * (C) Copyright 2006-2007 Nuxeo SAS (http://nuxeo.com/) and contributors.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser General Public License
006 * (LGPL) version 2.1 which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/lgpl.html
008 *
009 * This library is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012 * Lesser General Public License for more details.
013 *
014 * Contributors:
015 *     Nuxeo - initial API and implementation
016 *
017 * $Id: DocumentView.java 22535 2007-07-13 14:57:58Z atchertchian $
018 */
019
020package org.nuxeo.ecm.platform.url.api;
021
022import java.util.Map;
023
024import org.nuxeo.ecm.core.api.DocumentLocation;
025
026/**
027 * Document information describing a document context.
028 * <p>
029 * Some information is required (document location). Other information (like the currently selected tab) are handled
030 * through parameters.*
031 * <p>
032 * This interface is used to map a url to a document context.
033 */
034public interface DocumentView {
035
036    /**
037     * Returns the url pattern names used to generate this document view.
038     */
039    String getPatternName();
040
041    void setPatternName(String patternName);
042
043    void setDocumentLocation(DocumentLocation documentLocation);
044
045    DocumentLocation getDocumentLocation();
046
047    Map<String, String> getParameters();
048
049    String getParameter(String name);
050
051    void addParameter(String name, String value);
052
053    void removeParameter(String name);
054
055    /**
056     * Returns the outcome to use for this document view.
057     * <p>
058     * XXX AT: Can be considered to be badly named "view id".
059     */
060    String getViewId();
061
062    void setViewId(String viewId);
063
064    String getSubURI();
065
066    void setSubURI(String subURI);
067
068    /**
069     * @deprecated should use the parameters map for the tab identifier.
070     */
071    @Deprecated
072    String getTabId();
073
074}