01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: */
18: package org.apache.ivy.plugins.resolver;
19:
20: import org.apache.ivy.plugins.repository.vsftp.VsftpRepository;
21:
22: /**
23: * This resolver uses SecureCRT vsft to access an sftp server. It supports listing and publishing.
24: * The server host should absolutely be set using setHost, so does the username.
25: */
26: public class VsftpResolver extends RepositoryResolver {
27: public VsftpResolver() {
28: setRepository(new VsftpRepository());
29: }
30:
31: public String getTypeName() {
32: return "vsftp";
33: }
34:
35: public VsftpRepository getVsftpRepository() {
36: return (VsftpRepository) getRepository();
37: }
38:
39: public void disconnect() {
40: getVsftpRepository().disconnect();
41: }
42:
43: public String getAuthentication() {
44: return getVsftpRepository().getAuthentication();
45: }
46:
47: public String getHost() {
48: return getVsftpRepository().getHost();
49: }
50:
51: public String getUsername() {
52: return getVsftpRepository().getUsername();
53: }
54:
55: public void setAuthentication(String authentication) {
56: getVsftpRepository().setAuthentication(authentication);
57: }
58:
59: public void setHost(String host) {
60: getVsftpRepository().setHost(host);
61: }
62:
63: public void setUsername(String username) {
64: getVsftpRepository().setUsername(username);
65: }
66:
67: public void setReuseConnection(long time) {
68: getVsftpRepository().setReuseConnection(time);
69: }
70:
71: public void setReadTimeout(long readTimeout) {
72: getVsftpRepository().setReadTimeout(readTimeout);
73: }
74: }
|