/**
 * Copyright (c) 2009-2012 EBM WebSourcing, 2012-2013 Linagora
 * 
 * This program/library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 2.1 of the License, or (at your
 * option) any later version.
 * 
 * This program/library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
 * for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program/library; If not, see <http://www.gnu.org/licenses/>
 * for the GNU Lesser General Public License version 2.1.
 */
package org.ow2.petals.bc.sftp;

/**
 * A few constants for parametrizing things like operation name, component's
 * configuration attribute name, etc.
 * 
 * @author Charles Casadei - EBM WebSourcing
 */
public class SFTPConstants {

    // --------------------------------------------------------------------------
    // Default values.
    // --------------------------------------------------------------------------

    /**
     * The default filename for the PUT operation.
     */
    public static final String DEFAULT_FILENAME = "content.xml";

    /**
     * Default max idle connection time (milliseconds).
     */
    public static final long DEFAULT_SSH_MAX_IDLE_TIME = 10000;

    /**
     * Default maximum number of simultaneous connection (unlimited)
     */
    public static final int DEFAULT_MAX_CONNECTION = -1;

    // --------------------------------------------------------------------------
    // XML configuration.
    // --------------------------------------------------------------------------

    /**
     * Reserved XML namespace.
     */
    public static final String SFTP_SERVICE_NS = "http://petals.ow2.org/components/sftp/version-1";

    /**
     * Interface name.
     */
    public static final String SFTP_INTERFACE = "sftp";

    // --------------------------------------------------------------------------
    // Component's configuration.
    // --------------------------------------------------------------------------

    /**
     * The SFTP connection element
     */
    public static final String SFTP_CONNECTION = "connection";

    /**
     * The SFTP server property.
     */
    public static final String SFTP_SERVER = "server";

    /**
     * The SFTP port property.
     */
    public static final String SFTP_PORT = "port";

    /**
     * The working directory.
     */
    public static final String SFTP_FOLDER = "folder";

    /**
     * The SFTP filepattern element.
     */
    public static final String SFTP_FILENAME = "filename";

    /**
     * The sftp "overwrite" element
     */
    public final static String SFTP_OVERWRITE = "overwrite";

    /**
     * The SFTP max idle connection time element (minutes).
     */
    public static final String SFTP_MAX_IDLE_TIME = "max-idle-time";

    /**
     * Specified the maximum number of simultaneous connection
     */
    public static final String SFTP_MAX_CONNECTION = "max-connection";

    // --------------------------------------------------------------------------
    // Authentication related part
    // --------------------------------------------------------------------------

    public static final String SSH_AUTHENTICATION = "SSH Authentication";

    /**
     * The SFTP login property.
     */
    public static final String SFTP_USER = "user";

    /**
     * The SFTP password property.
     */
    public static final String SFTP_PASSWORD = "password";

    /**
     * Private key path property.
     */
    public static final String SFTP_PRIVATE_KEY = "privatekey";

    /**
     * Passpharse property.
     */
    public static final String SFTP_PASSPHRASE = "passphrase";

    // --------------------------------------------------------------------------
    // SFTP operations.
    // --------------------------------------------------------------------------

    /**
     * List the contents of the current remote working directory.
     */
    public static final String DIR = "dir";

    /**
     * Copy incoming XML message on the SFTP server.
     */
    public static final String PUT = "put";

    /**
     * Copy incoming message attachments on the SFTP server.
     */
    public static final String MPUT = "mput";

    /**
     * Put the incoming message onto the default directory of the SFTP server.
     */
    public static final String STANDARD_PUT = "standard_put";

    /**
     * Get one specified file from the SFTP server and return it as an XML
     * message.
     */
    public static final String GET = "get";

    /**
     * Get one specified file from the SFTP server and return it as attachment.
     */
    public static final String GETASATTACHMENT = "getAsAttachment";

    /***
     * operation that removes the specified file.
     */
    public static final String DEL = "del";

    /**
     * Get files from the SFTP server and return them as attachments.
     */
    public static final String MGET = "mget";

    /**
     * The content of the message.
     */
    public static final String BODY = "body";
}
