001/* 002 * (C) Copyright 2011 Nuxeo SA (http://nuxeo.com/) and contributors. 003 * 004 * 005 * All rights reserved. This program and the accompanying materials 006 * are made available under the terms of the GNU Lesser General Public License 007 * (LGPL) version 2.1 which accompanies this distribution, and is available at 008 * http://www.gnu.org/licenses/lgpl.html 009 * 010 * This library is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 013 * Lesser General Public License for more details. 014 * 015 * Contributors: 016 * ldoguin 017 */ 018package org.nuxeo.ecm.platform.routing.dm.adapter; 019 020import org.nuxeo.ecm.core.api.DocumentModel; 021import org.nuxeo.ecm.core.api.adapter.DocumentAdapterFactory; 022import org.nuxeo.ecm.platform.routing.api.DocumentRoutingConstants; 023 024/** 025 * @author ldoguin 026 * @deprecated since 5.9.2 - Use only routes of type 'graph' The facet 'RoutingTask' is still used to mark tasks created 027 * by the workflow, but it {@link RoutingTask} class is marked as deprecated as it extends the deprecated 028 * ActionableObject 029 */ 030@Deprecated 031public class RoutingTaskAdapterFactory implements DocumentAdapterFactory { 032 033 @Override 034 public Object getAdapter(DocumentModel doc, @SuppressWarnings("rawtypes") Class itf) { 035 if (doc.hasFacet(DocumentRoutingConstants.ROUTING_TASK_FACET_NAME)) { 036 return new RoutingTaskImpl(doc); 037 } 038 return null; 039 } 040 041}