001/* 002 * (C) Copyright 2006-2007 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Nuxeo - initial API and implementation 018 * 019 * $Id: DocumentView.java 22535 2007-07-13 14:57:58Z atchertchian $ 020 */ 021 022package org.nuxeo.ecm.platform.url.api; 023 024import java.util.Map; 025 026import org.nuxeo.ecm.core.api.DocumentLocation; 027 028/** 029 * Document information describing a document context. 030 * <p> 031 * Some information is required (document location). Other information (like the currently selected tab) are handled 032 * through parameters.* 033 * <p> 034 * This interface is used to map a url to a document context. 035 */ 036public interface DocumentView { 037 038 /** 039 * Returns the url pattern names used to generate this document view. 040 */ 041 String getPatternName(); 042 043 void setPatternName(String patternName); 044 045 void setDocumentLocation(DocumentLocation documentLocation); 046 047 DocumentLocation getDocumentLocation(); 048 049 Map<String, String> getParameters(); 050 051 String getParameter(String name); 052 053 void addParameter(String name, String value); 054 055 void removeParameter(String name); 056 057 /** 058 * Returns the outcome to use for this document view. 059 * <p> 060 * XXX AT: Can be considered to be badly named "view id". 061 */ 062 String getViewId(); 063 064 void setViewId(String viewId); 065 066 String getSubURI(); 067 068 void setSubURI(String subURI); 069 070 /** 071 * @deprecated should use the parameters map for the tab identifier. 072 */ 073 @Deprecated 074 String getTabId(); 075 076}