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 * dragos 016 * 017 * $Id$ 018 */ 019 020package org.nuxeo.ecm.platform.rendering; 021 022import java.io.Serializable; 023import java.util.Map; 024 025import org.nuxeo.runtime.model.Adaptable; 026 027/** 028 * Base class for rendering contexts. 029 * <p> 030 * The org.nuxeo.runtime.model.Adaptable interface may be used to add adapting capabilities to context objects. This may 031 * be used to retrieve adapters to other type of contexts (like the freemarker one). 032 * 033 * @author <a href="mailto:dm@nuxeo.com">Dragos Mihalache</a> 034 */ 035public interface RenderingContext extends Map<String, Object>, Adaptable, Serializable { 036 037 /** 038 * Either or not this rendering context accepts the given engine. 039 * <p> 040 * If the engione is not acepted it will be ignored by the rendering service when processing this context 041 * 042 * @param engine the engine to test 043 * @return true if the engine is eligible to process this context, false otherwise 044 */ 045 boolean accept(RenderingEngine engine); 046 047}