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