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.io.File;
021import java.lang.annotation.ElementType;
022import java.lang.annotation.Retention;
023import java.lang.annotation.RetentionPolicy;
024import java.lang.annotation.Target;
025
026/**
027 * The {@link org.syncany.plugins.transfer.Setup} annotation alters the initialization process.
028 *
029 * @see org.syncany.plugins.transfer.TransferPluginOptions
030 * @author Christian Roth (christian.roth@port17.de)
031 */
032@Target(ElementType.FIELD)
033@Retention(RetentionPolicy.RUNTIME)
034public @interface Setup {
035        /**
036         * A setting's position in the initialization process (lower comes first).<br>
037         * The order cannot be assured if two fields have the same order position.
038         */
039        int order() default -1;
040
041        /**
042         * A field description to make the meaning of a field better understandable.
043         */
044        String description() default "";
045
046        /**
047         * Suppress key inputs during initialization.
048         */
049        boolean sensitive() default false;
050
051        /**
052         * Singular values have to be inserted again when a user wants to changes values
053         */
054        boolean singular() default false;
055
056        /**
057         * Visible values are shown to the user during setup, invisible one are hidden.
058         */
059        boolean visible() default true;
060        
061        /**
062         * In case the field represents a {@link File}, this option defines whether a file 
063         * or folder is required. This value can be used by front-ends.
064         */
065        FileType fileType() default FileType.NONE;
066        
067        /**
068         * @see org.syncany.plugins.transfer.TransferPluginOptionCallback
069         */
070        Class<? extends TransferPluginOptionCallback> callback() default TransferPluginOptionCallback.class;
071
072        /**
073         * @see org.syncany.plugins.transfer.TransferPluginOptionConverter
074         */
075        Class<? extends TransferPluginOptionConverter> converter() default TransferPluginOptionConverter.class;
076}