001/*
002 * (C) Copyright 2011 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 *
016 * Contributors:
017 *     ldoguin
018 */
019package org.nuxeo.ecm.platform.routing.core.impl;
020
021import java.util.List;
022import java.util.Map;
023
024import org.nuxeo.ecm.core.api.CoreSession;
025import org.nuxeo.ecm.core.api.DocumentModel;
026import org.nuxeo.ecm.platform.routing.api.DocumentRoutingService;
027import org.nuxeo.ecm.platform.routing.api.RoutingTaskService;
028import org.nuxeo.ecm.platform.routing.api.exception.DocumentRouteException;
029import org.nuxeo.ecm.platform.task.Task;
030import org.nuxeo.runtime.api.Framework;
031import org.nuxeo.runtime.model.DefaultComponent;
032
033/**
034 * @deprecated since 5.6, use DocumentRoutingService instead
035 */
036@Deprecated
037public class RoutingTaskServiceImpl extends DefaultComponent implements RoutingTaskService {
038
039    @Override
040    public void makeRoutingTasks(CoreSession session, List<Task> tasks) {
041        DocumentRoutingService routing = Framework.getService(DocumentRoutingService.class);
042        routing.makeRoutingTasks(session, tasks);
043    }
044
045    @Override
046    public void endTask(CoreSession session, Task task, Map<String, Object> data, String status)
047            throws DocumentRouteException {
048        DocumentRoutingService routing = Framework.getService(DocumentRoutingService.class);
049        routing.endTask(session, task, data, status);
050    }
051
052    @Override
053    public List<DocumentModel> getWorkflowInputDocuments(CoreSession session, Task task) throws DocumentRouteException {
054        DocumentRoutingService routing = Framework.getService(DocumentRoutingService.class);
055        return routing.getWorkflowInputDocuments(session, task);
056    }
057
058}