View Javadoc
1   /**
2    * Copyright 2010-2014 The Kuali Foundation
3    *
4    * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
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 org.kuali.common.util;
17  
18  import org.slf4j.Logger;
19  import org.slf4j.LoggerFactory;
20  
21  import com.jcraft.jsch.UserInfo;
22  
23  public class DefaultUserInfo implements UserInfo {
24  	private static final Logger logger = LoggerFactory.getLogger(DefaultUserInfo.class);
25  
26  	String passphrase;
27  	String password;
28  
29  	@Override
30  	public boolean promptPassword(String message) {
31  		return false;
32  	}
33  
34  	@Override
35  	public boolean promptPassphrase(String message) {
36  		return false;
37  	}
38  
39  	@Override
40  	public boolean promptYesNo(String message) {
41  		return false;
42  	}
43  
44  	@Override
45  	public void showMessage(String message) {
46  		logger.info(message);
47  	}
48  
49  	@Override
50  	public String getPassphrase() {
51  		return passphrase;
52  	}
53  
54  	public void setPassphrase(String passphrase) {
55  		this.passphrase = passphrase;
56  	}
57  
58  	@Override
59  	public String getPassword() {
60  		return password;
61  	}
62  
63  	public void setPassword(String password) {
64  		this.password = password;
65  	}
66  
67  }