001/* 002 * #%L 003 * Netarchivesuite - common 004 * %% 005 * Copyright (C) 2005 - 2014 The Royal Danish Library, the Danish State and University Library, 006 * the National Library of France and the Austrian National Library. 007 * %% 008 * This program is free software: you can redistribute it and/or modify 009 * it under the terms of the GNU Lesser General Public License as 010 * published by the Free Software Foundation, either version 2.1 of the 011 * License, or (at your option) any later version. 012 * 013 * This program is distributed in the hope that it will be useful, 014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 016 * GNU General Lesser Public License for more details. 017 * 018 * You should have received a copy of the GNU General Lesser Public 019 * License along with this program. If not, see 020 * <http://www.gnu.org/licenses/lgpl-2.1.html>. 021 * #L% 022 */ 023package dk.netarkivet.common.distribute; 024 025import java.io.Serializable; 026 027/** 028 * Container for the RemoteFile settings used by one app, so they can be used by another app. 029 */ 030@SuppressWarnings({"serial"}) 031public class RemoteFileSettings implements Serializable { 032 033 /** server host name. */ 034 private String serverName; 035 036 /** The server port. */ 037 private int serverPort; 038 039 /** The username used to connect to the server. */ 040 private String userName; 041 042 /** The password used to connect to the server. */ 043 private String userPassword; 044 045 /** 046 * Constructor. 047 * 048 * @param serverName The hostname of the server. 049 * @param serverPort The port name of the server. 050 * @param userName The username used for connecting. 051 * @param userPassword The password used for connecting. 052 */ 053 public RemoteFileSettings(String serverName, int serverPort, String userName, String userPassword) { 054 this.serverName = serverName; 055 this.serverPort = serverPort; 056 this.userName = userName; 057 this.userPassword = userPassword; 058 } 059 060 /** 061 * @return servername 062 */ 063 public String getServerName() { 064 return serverName; 065 } 066 067 /** 068 * @return server port. 069 */ 070 public int getServerPort() { 071 return serverPort; 072 } 073 074 /** 075 * @return user name 076 */ 077 public String getUserName() { 078 return userName; 079 } 080 081 /** 082 * @return user password 083 */ 084 public String getUserPassword() { 085 return userPassword; 086 } 087 088}