View | Details | Raw Unified | Return to bug 196632 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/rse/internal/subsystems/files/ftp/connectorservice/FTPConnectorService.java (-12 / +18 lines)
Lines 19-24 Link Here
19
 * Javier Montalvo Orus (Symbian) - Fixing 176216 - [api] FTP sould provide API to allow clients register their own FTPListingParser
19
 * Javier Montalvo Orus (Symbian) - Fixing 176216 - [api] FTP sould provide API to allow clients register their own FTPListingParser
20
 * Javier Montalvo Orus (Symbian) - [187531] Improve exception thrown when Login Failed on FTP
20
 * Javier Montalvo Orus (Symbian) - [187531] Improve exception thrown when Login Failed on FTP
21
 * David Dykstal (IBM) - added RESID_FTP_SETTINGS_LABEL
21
 * David Dykstal (IBM) - added RESID_FTP_SETTINGS_LABEL
22
 * David McKnight       (IBM)     - [196632] [ftp] Passive mode setting does not work
22
 ********************************************************************************/
23
 ********************************************************************************/
23
24
24
package org.eclipse.rse.internal.subsystems.files.ftp.connectorservice;
25
package org.eclipse.rse.internal.subsystems.files.ftp.connectorservice;
Lines 48-68 Link Here
48
public class FTPConnectorService extends StandardConnectorService 
49
public class FTPConnectorService extends StandardConnectorService 
49
{
50
{
50
	protected FTPService _ftpService;
51
	protected FTPService _ftpService;
51
	private IPropertySet _propertySet;
52
	//private IPropertySet _propertySet;
52
	
53
	
53
	public FTPConnectorService(IHost host, int port)
54
	public FTPConnectorService(IHost host, int port)
54
	{		
55
	{		
55
		super(FTPSubsystemResources.RESID_FTP_CONNECTORSERVICE_NAME,FTPSubsystemResources.RESID_FTP_CONNECTORSERVICE_DESCRIPTION, host, port);
56
		super(FTPSubsystemResources.RESID_FTP_CONNECTORSERVICE_NAME,FTPSubsystemResources.RESID_FTP_CONNECTORSERVICE_DESCRIPTION, host, port);
56
		_ftpService = new FTPService();
57
		_ftpService = new FTPService();
57
			
58
		getPropertySet();
58
		_propertySet = getPropertySet("FTP Settings"); //$NON-NLS-1$
59
	}
60
	
61
	private IPropertySet getPropertySet()
62
	{
63
		IPropertySet propertySet = getPropertySet("FTP Settings"); //$NON-NLS-1$
59
		
64
		
60
		if(_propertySet==null)
65
		if(propertySet==null)
61
		{
66
		{
62
			
67
			
63
			//Active - passive mode
68
			//Active - passive mode
64
			_propertySet = createPropertySet("FTP Settings"); //$NON-NLS-1$
69
			propertySet = createPropertySet("FTP Settings"); //$NON-NLS-1$
65
			_propertySet.addProperty("passive","false",PropertyType.getEnumPropertyType(new String[]{"true","false"})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
70
			propertySet.addProperty("passive","false",PropertyType.getEnumPropertyType(new String[]{"true","false"})); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
66
			
71
			
67
			// FTP List parser
72
			// FTP List parser
68
			String[] keys = FTPClientConfigFactory.getParserFactory().getKeySet();
73
			String[] keys = FTPClientConfigFactory.getParserFactory().getKeySet();
Lines 74-86 Link Here
74
			
79
			
75
			Arrays.sort(keysArray);
80
			Arrays.sort(keysArray);
76
			
81
			
77
			_propertySet.addProperty("parser","AUTO",PropertyType.getEnumPropertyType(keysArray)); //$NON-NLS-1$ //$NON-NLS-2$
82
			propertySet.addProperty("parser","AUTO",PropertyType.getEnumPropertyType(keysArray)); //$NON-NLS-1$ //$NON-NLS-2$
78
		}
83
		}
79
		if (_propertySet instanceof ILabeledObject) {
84
		if (propertySet instanceof ILabeledObject) {
80
			String label = FTPSubsystemResources.RESID_FTP_SETTINGS_LABEL;
85
			String label = FTPSubsystemResources.RESID_FTP_SETTINGS_LABEL;
81
			((ILabeledObject)_propertySet).setLabel(label);
86
			((ILabeledObject)propertySet).setLabel(label);
82
		}
87
		}
83
	} 
88
		return propertySet;
89
	}
84
	
90
	
85
	protected void internalConnect(IProgressMonitor monitor)  throws RemoteFileException, IOException
91
	protected void internalConnect(IProgressMonitor monitor)  throws RemoteFileException, IOException
86
	{
92
	{
Lines 89-102 Link Here
89
95
90
	private void internalConnect() throws RemoteFileException, IOException
96
	private void internalConnect() throws RemoteFileException, IOException
91
	{
97
	{
92
98
		IPropertySet propertySet = getPropertySet();
93
		SystemSignonInformation info = getSignonInformation();
99
		SystemSignonInformation info = getSignonInformation();
94
		_ftpService.setHostName(info.getHostname());
100
		_ftpService.setHostName(info.getHostname());
95
		_ftpService.setUserId(info.getUserId());
101
		_ftpService.setUserId(info.getUserId());
96
		_ftpService.setPassword(info.getPassword());
102
		_ftpService.setPassword(info.getPassword());
97
		_ftpService.setPortNumber(getPort());
103
		_ftpService.setPortNumber(getPort());
98
		_ftpService.setLoggingStream(getLoggingStream(info.getHostname(),getPort()));
104
		_ftpService.setLoggingStream(getLoggingStream(info.getHostname(),getPort()));
99
		_ftpService.setPropertySet(_propertySet);
105
		_ftpService.setPropertySet(propertySet);
100
		_ftpService.setFTPClientConfigFactory(FTPClientConfigFactory.getParserFactory());
106
		_ftpService.setFTPClientConfigFactory(FTPClientConfigFactory.getParserFactory());
101
		
107
		
102
		
108
		

Return to bug 196632