001/* 002 * (C) Copyright 2011 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.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 * ldoguin 016 */ 017package org.nuxeo.ecm.platform.routing.core.impl; 018 019import java.util.List; 020import java.util.Map; 021 022import org.nuxeo.ecm.core.api.CoreSession; 023import org.nuxeo.ecm.core.api.DocumentModel; 024import org.nuxeo.ecm.platform.routing.api.DocumentRoutingService; 025import org.nuxeo.ecm.platform.routing.api.RoutingTaskService; 026import org.nuxeo.ecm.platform.routing.api.exception.DocumentRouteException; 027import org.nuxeo.ecm.platform.task.Task; 028import org.nuxeo.runtime.api.Framework; 029import org.nuxeo.runtime.model.DefaultComponent; 030 031/** 032 * @deprecated since 5.6, use DocumentRoutingService instead 033 */ 034@Deprecated 035public class RoutingTaskServiceImpl extends DefaultComponent implements RoutingTaskService { 036 037 @Override 038 public void makeRoutingTasks(CoreSession session, List<Task> tasks) { 039 DocumentRoutingService routing = Framework.getLocalService(DocumentRoutingService.class); 040 routing.makeRoutingTasks(session, tasks); 041 } 042 043 @Override 044 public void endTask(CoreSession session, Task task, Map<String, Object> data, String status) 045 throws DocumentRouteException { 046 DocumentRoutingService routing = Framework.getLocalService(DocumentRoutingService.class); 047 routing.endTask(session, task, data, status); 048 } 049 050 @Override 051 public List<DocumentModel> getWorkflowInputDocuments(CoreSession session, Task task) throws DocumentRouteException { 052 DocumentRoutingService routing = Framework.getLocalService(DocumentRoutingService.class); 053 return routing.getWorkflowInputDocuments(session, task); 054 } 055 056}