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 java.io.IOException; 020import java.util.Map; 021 022import org.codehaus.jackson.JsonGenerator; 023 024/** 025 * A Content Enricher knows how to enrich to some Json serialization. 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 ContentEnricher { 037 /** 038 * @param jg 039 * @param ec 040 * @throws IOException 041 */ 042 void enrich(JsonGenerator jg, RestEvaluationContext ec) throws IOException; 043 044 void setParameters(Map<String, String> parameters); 045}