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 * Mariana Cedica 016 */ 017package org.nuxeo.ecm.platform.importer.service; 018 019import org.nuxeo.common.xmap.annotation.XNode; 020import org.nuxeo.common.xmap.annotation.XObject; 021import org.nuxeo.ecm.platform.importer.factories.DefaultDocumentModelFactory; 022import org.nuxeo.ecm.platform.importer.log.ImporterLogger; 023import org.nuxeo.ecm.platform.importer.source.FileSourceNode; 024 025@XObject("importerConfig") 026public class ImporterConfigurationDescriptor { 027 028 @XNode("@sourceNodeClass") 029 protected Class<? extends FileSourceNode> sourceNodeClass; 030 031 @XNode("@importerLogClass") 032 protected Class<? extends ImporterLogger> importerLogClass; 033 034 @XNode("documentModelFactory") 035 protected DocumentModelFactory documentModelFactory; 036 037 @XNode("repository") 038 protected String repository; 039 040 @XObject("documentModelFactory") 041 public static class DocumentModelFactory { 042 043 @XNode("@documentModelFactoryClass") 044 protected Class<? extends DefaultDocumentModelFactory> documentModelFactoryClass; 045 046 @XNode("@leafType") 047 protected String leafType; 048 049 @XNode("@folderishType") 050 protected String folderishType; 051 052 public String getFolderishType() { 053 return folderishType; 054 } 055 056 public String getLeafType() { 057 return leafType; 058 } 059 060 public Class<? extends DefaultDocumentModelFactory> getDocumentModelFactoryClass() { 061 return documentModelFactoryClass; 062 } 063 } 064 065 public Class<?> getSourceNodeClass() { 066 return sourceNodeClass; 067 } 068 069 public DocumentModelFactory getDocumentModelFactory() { 070 return documentModelFactory; 071 } 072 073 public Class<? extends ImporterLogger> getImporterLog() { 074 return importerLogClass; 075 } 076 077 public String getRepository() { 078 return repository; 079 } 080 081}