001/* 002 * (C) Copyright 2013 Nuxeo SA (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-2.1.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 * dmetzler 016 */ 017package org.nuxeo.ecm.automation.io.services.enricher; 018 019import javax.servlet.ServletRequest; 020import javax.ws.rs.core.HttpHeaders; 021 022import org.nuxeo.ecm.core.api.DocumentModel; 023 024/** 025 * Evaluation context from where to get information in order to generate additional JSON. 026 * 027 * @since 5.7.3 028 * @deprecated The JSON marshalling was migrated to nuxeo-core-io. An enricher system is also available. See 029 * org.nuxeo.ecm.core.io.marshallers.json.enrichers.BreadcrumbJsonEnricher for an example. To migrate an 030 * existing enricher, keep the marshalling code and use it in class implementing 031 * AbstractJsonEnricher<DocumentModel> (the use of contextual parameters is a bit different but 032 * compatible / you have to manage the enricher's parameters yourself). Don't forget to contribute to 033 * service org.nuxeo.ecm.core.io.registry.MarshallerRegistry to register your enricher. 034 */ 035@Deprecated 036public interface RestEvaluationContext { 037 038 /** 039 * Gives the contextual document 040 * 041 * @return 042 */ 043 DocumentModel getDocumentModel(); 044 045 /** 046 * Returns the request headers. It may be used by contributors to refine their writing strategies. 047 * 048 * @return 049 */ 050 HttpHeaders getHeaders(); 051 052 /** 053 * Returns the request that is currently served. 054 * 055 * @since 5.9.3 056 */ 057 ServletRequest getRequest(); 058 059}