001/* 002 * (C) Copyright 2015 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 * <a href="mailto:tdelprat@nuxeo.com">Tiry</a> 016 */ 017package org.nuxeo.ecm.platform.rendition.lazy; 018 019import java.util.List; 020 021import org.nuxeo.ecm.core.api.Blob; 022import org.nuxeo.ecm.core.api.CoreSession; 023import org.nuxeo.ecm.core.api.DocumentModel; 024import org.nuxeo.ecm.platform.rendition.extension.AutomationRenderer; 025import org.nuxeo.ecm.platform.rendition.service.RenditionDefinition; 026 027/** 028 * @author <a href="mailto:tdelprat@nuxeo.com">Tiry</a> 029 * @since 7.2 030 */ 031public class AutomationRenditionBuilder extends AbstractRenditionBuilderWork { 032 033 private static final long serialVersionUID = 8480090097109149484L; 034 035 public AutomationRenditionBuilder(String key, DocumentModel doc, RenditionDefinition def) { 036 super(key, doc, def); 037 } 038 039 @Override 040 protected List<Blob> doComputeRendition(CoreSession session, DocumentModel doc, RenditionDefinition def) { 041 return AutomationRenderer.render(doc, def, session); 042 } 043 044}