001/* 002 * (C) Copyright 2012 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 * Anahide Tchertchian 016 */ 017package org.nuxeo.ecm.directory.registry; 018 019import java.util.ArrayList; 020import java.util.List; 021 022/** 023 * Pseudo contribution, to make the mapping between a directory and its factory. 024 * 025 * @since 5.6 026 */ 027public class DirectoryFactoryMapper { 028 029 protected String directoryName; 030 031 protected List<String> factories; 032 033 public DirectoryFactoryMapper() { 034 super(); 035 } 036 037 public DirectoryFactoryMapper(String directoryName, String factory) { 038 super(); 039 this.directoryName = directoryName; 040 this.factories = new ArrayList<String>(); 041 this.factories.add(factory); 042 } 043 044 public DirectoryFactoryMapper(String directoryName, List<String> factories) { 045 super(); 046 this.directoryName = directoryName; 047 this.factories = factories; 048 } 049 050 public String getDirectoryName() { 051 return directoryName; 052 } 053 054 public void setDirectoryName(String directoryName) { 055 this.directoryName = directoryName; 056 } 057 058 public List<String> getFactories() { 059 return factories; 060 } 061 062 public void setFactories(List<String> factories) { 063 this.factories = factories; 064 } 065 066 public DirectoryFactoryMapper clone() { 067 DirectoryFactoryMapper clone = new DirectoryFactoryMapper(); 068 clone.setDirectoryName(directoryName); 069 clone.setFactories(factories); 070 return clone; 071 } 072 073}