001/* 002 * Copyright (c) 2006-2013 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the Eclipse Public License v1.0 006 * which accompanies this distribution, and is available at 007 * http://www.eclipse.org/legal/epl-v10.html 008 * 009 * Contributors: 010 * Vladimir Pasquier <vpasquier@nuxeo.com> 011 */ 012package org.nuxeo.ecm.automation.test.adapter; 013 014import org.nuxeo.ecm.core.api.DocumentModel; 015import org.nuxeo.ecm.core.api.adapter.DocumentAdapterFactory; 016 017public class BusinessBeanAdapterFactory implements DocumentAdapterFactory { 018 019 @Override 020 public Object getAdapter(DocumentModel doc, Class<?> itf) { 021 if ("Note".equals(doc.getType())) { 022 return new BusinessBeanAdapter(doc); 023 } else { 024 return null; 025 } 026 } 027}