001/* 002 * (C) Copyright 2006-2016 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 */ 019package org.nuxeo.ecm.platform.url.api; 020 021import java.util.Map; 022 023import org.nuxeo.ecm.core.api.DocumentLocation; 024 025/** 026 * Document information describing a document context. 027 * <p> 028 * Some information is required (document location). Other information (like the currently selected tab) are handled 029 * through parameters.* 030 * <p> 031 * This interface is used to map a url to a document context. 032 */ 033public interface DocumentView { 034 035 /** 036 * Returns the url pattern names used to generate this document view. 037 */ 038 String getPatternName(); 039 040 void setPatternName(String patternName); 041 042 void setDocumentLocation(DocumentLocation documentLocation); 043 044 DocumentLocation getDocumentLocation(); 045 046 Map<String, String> getParameters(); 047 048 String getParameter(String name); 049 050 void addParameter(String name, String value); 051 052 void removeParameter(String name); 053 054 /** 055 * Returns the outcome to use for this document view. 056 * <p> 057 * XXX AT: Can be considered to be badly named "view id". 058 */ 059 String getViewId(); 060 061 void setViewId(String viewId); 062 063 String getSubURI(); 064 065 void setSubURI(String subURI); 066 067}