1 /* 2 * Copyright 2012 smartics, Kronseder & Reiner GmbH 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package de.smartics.ci.comm; 17 18 /** 19 * The credentials that can be used to authenticate. 20 */ 21 public class Credentials 22 { 23 // ********************************* Fields ********************************* 24 25 /** 26 * The name of the user to use to get access. 27 */ 28 private final String userName; 29 30 /** 31 * The password for the user. 32 */ 33 private final String password; 34 35 // --- constants ------------------------------------------------------------ 36 37 // --- members -------------------------------------------------------------- 38 39 // ****************************** Initializer ******************************* 40 41 // ****************************** Constructors ****************************** 42 43 /** 44 * Constructor. 45 * 46 * @param userName the name of the user to use to get access. 47 * @param password the password for the user. 48 */ 49 public Credentials(final String userName, final String password) 50 { 51 this.userName = userName; 52 this.password = password; 53 } 54 55 // ****************************** Inner Classes ***************************** 56 57 // ********************************* Methods ******************************** 58 59 // --- init ----------------------------------------------------------------- 60 61 // --- get&set -------------------------------------------------------------- 62 63 /** 64 * Returns the name of the user to use to get access. 65 * 66 * @return the name of the user to use to get access. 67 */ 68 public String getUserName() 69 { 70 return userName; 71 } 72 73 /** 74 * Returns the password for the user. 75 * 76 * @return the password for the user. 77 */ 78 public String getPassword() 79 { 80 return password; 81 } 82 83 // --- business ------------------------------------------------------------- 84 85 // --- object basics -------------------------------------------------------- 86 87 }