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.api;
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.exception.DocumentRouteException;
027import org.nuxeo.ecm.platform.task.Task;
028
029/**
030 * A small service adding Routing behavior to tasks.
031 * <p>
032 *
033 * @deprecated since 5.6, use DocumentRoutingService instead
034 */
035@Deprecated
036public interface RoutingTaskService {
037
038    /**
039     * Marks the tasks as Routing tasks.
040     * <p>
041     * This allows the related documents to be adapted to {@code RoutingTask}.
042     *
043     * @param session the session
044     * @param tasks the tasks
045     * @deprecated since 5.6, use DocumentRoutingService instead
046     */
047    @Deprecated
048    void makeRoutingTasks(CoreSession session, List<Task> tasks);
049
050    /**
051     * Ends a task
052     *
053     * @param status name of the button clicked to submit the task form
054     * @deprecated since 5.6, use DocumentRoutingService instead
055     */
056    @Deprecated
057    void endTask(CoreSession session, Task task, Map<String, Object> data, String status) throws DocumentRouteException;
058
059    /**
060     * Gets the documents following the workflow to which the given task belongs
061     *
062     * @deprecated since 5.6, use DocumentRoutingService instead
063     */
064    @Deprecated
065    List<DocumentModel> getWorkflowInputDocuments(CoreSession session, Task task) throws DocumentRouteException;
066}