Rev 1616 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1616 | Rev 1814 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | import org.apache.commons.net.ftp.FTPClient; |
4 | import org.apache.commons.net.ftp.FTPClient; |
5 | import org.apache.commons.net.ftp.FTPFile; |
5 | import org.apache.commons.net.ftp.FTPFile; |
6 | import org.apache.log4j.Logger; |
6 | import org.apache.log4j.Logger; |
7 | import pt.estgp.estgweb.domain.UserSession; |
7 | import pt.estgp.estgweb.domain.UserSession; |
8 | import pt.estgp.estgweb.domain.UserSessionImpl; |
8 | import pt.estgp.estgweb.domain.UserSessionImpl; |
- | 9 | import pt.estgp.estgweb.utils.*; |
|
- | 10 | import pt.estgp.estgweb.utils.Globals; |
|
9 | 11 | ||
10 | import javax.servlet.http.HttpServletRequest; |
12 | import javax.servlet.http.HttpServletRequest; |
11 | import java.io.IOException; |
13 | import java.io.IOException; |
12 | import java.io.InputStream; |
14 | import java.io.InputStream; |
13 | import java.net.MalformedURLException; |
15 | import java.net.MalformedURLException; |
Line 61... | Line 63... | ||
61 | 1.5.0/docs/api/java/lang/String.html">String username = userSession.getUsername(); |
63 | 1.5.0/docs/api/java/lang/String.html">String username = userSession.getUsername(); |
62 | 1.5.0/docs/api/java/lang/String.html">String password = ((UserSessionImpl)userSession).getUserPasswordInSession(); |
64 | 1.5.0/docs/api/java/lang/String.html">String password = ((UserSessionImpl)userSession).getUserPasswordInSession(); |
63 | return new FtpServer(host,port,username,password); |
65 | return new FtpServer(host,port,username,password); |
64 | } |
66 | } |
65 | 67 | ||
66 | private static final int FTP_TIMEOUT_SECONDS = pt.estgp.estgweb.Globals.FTP_TIMEOUT_SECONDS; |
68 | private static final int FTP_TIMEOUT_SECONDS = pt.estgp.estgweb.utils.Globals.FTP_TIMEOUT_SECONDS; |
67 | 69 | ||
68 | public static class Connector implements 1.5.0/docs/api/java/lang/Runnable.html">Runnable |
70 | public static class Connector implements 1.5.0/docs/api/java/lang/Runnable.html">Runnable |
69 | { |
71 | { |
70 | FTPClient ftp; |
72 | FTPClient ftp; |
71 | 1.5.0/docs/api/java/lang/String.html">String host; |
73 | 1.5.0/docs/api/java/lang/String.html">String host; |
Line 623... | Line 625... | ||
623 | } |
625 | } |
624 | 626 | ||
625 | } |
627 | } |
626 | 628 | ||
627 | 629 | ||
628 | public static final int FTP_DATA_STORE_TIMEOUT_SECONDS = pt.estgp.estgweb.Globals.FTP_DATA_STORE_TIMEOUT_SECONDS; |
630 | public static final int FTP_DATA_STORE_TIMEOUT_SECONDS = Globals.FTP_DATA_STORE_TIMEOUT_SECONDS; |
629 | public class MyFTPClient extends FTPClient implements 1.5.0/docs/api/java/lang/Runnable.html">Runnable |
631 | public class MyFTPClient extends FTPClient implements 1.5.0/docs/api/java/lang/Runnable.html">Runnable |
630 | { |
632 | { |
631 | 1.5.0/docs/api/java/lang/String.html">String remote = ""; |
633 | 1.5.0/docs/api/java/lang/String.html">String remote = ""; |
632 | 5+0%2Fdocs%2Fapi+InputStream">InputStream local = null; |
634 | 5+0%2Fdocs%2Fapi+InputStream">InputStream local = null; |
633 | boolean storeResult = false; |
635 | boolean storeResult = false; |