001/*
002 * Syncany, www.syncany.org
003 * Copyright (C) 2011-2016 Philipp C. Heckel <philipp.heckel@gmail.com>
004 *
005 * This program is free software: you can redistribute it and/or modify
006 * it under the terms of the GNU General Public License as published by
007 * the Free Software Foundation, either version 3 of the License, or
008 * (at your option) any later version.
009 *
010 * This program 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
013 * GNU General Public License for more details.
014 *
015 * You should have received a copy of the GNU General Public License
016 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
017 */
018package org.syncany.plugins.transfer;
019
020import java.lang.reflect.Field;
021import java.lang.reflect.Type;
022import java.util.List;
023
024/**
025 * A nested plugin option is a special {@link TransferPluginOption} -- namely an
026 * option that contains a complex object rather than just a simple value.
027 *
028 * <p>Nested plugin options are typically used to represent/use sub-plugins
029 * within a certain plugin, e.g. to allow building a RAID0/1 plugin.
030 *
031 * @author Christian Roth (christian.roth@port17.de)
032 */
033public class NestedTransferPluginOption extends TransferPluginOption {
034        private final List<TransferPluginOption> options;
035
036        public NestedTransferPluginOption(Field field, String name, String description, Type type, FileType fileType, boolean encrypted, boolean sensitive,
037                        boolean singular, boolean visible, boolean required, Class<? extends TransferPluginOptionCallback> callback,
038                        Class<? extends TransferPluginOptionConverter> converter, List<TransferPluginOption> nestedOptions) {
039
040                super(field, name, description, type, fileType, encrypted, sensitive, singular, visible, required, callback, converter);
041                this.options = nestedOptions;
042        }
043
044        public List<TransferPluginOption> getOptions() {
045                return options;
046        }
047}