001/* 002 * Copyright (c) 2006-2011 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the Eclipse Public License v1.0 006 * which accompanies this distribution, and is available at 007 * http://www.eclipse.org/legal/epl-v10.html 008 * 009 * Contributors: 010 * bstefanescu 011 * 012 * $Id$ 013 */ 014 015package org.nuxeo.ecm.platform.rendering.api; 016 017import java.io.Writer; 018import java.util.ResourceBundle; 019 020/** 021 * @author <a href="mailto:bs@nuxeo.com">Bogdan Stefanescu</a> 022 */ 023public interface RenderingEngine { 024 025 void setMessageBundle(ResourceBundle messages); 026 027 ResourceBundle getMessageBundle(); 028 029 void setResourceLocator(ResourceLocator locator); 030 031 ResourceLocator getResourceLocator(); 032 033 void setSharedVariable(String key, Object value); 034 035 /** 036 * Starts the rendering for the given document context. 037 * 038 * @throws RenderingException 039 */ 040 void render(String template, Object input, Writer writer) throws RenderingException; 041 042 public View getView(String path); 043 044 public View getView(String path, Object object); 045 046 public void flushCache(); 047 048}