View Javadoc
1   package wjhk.jupload2.testhelpers;
2   
3   import java.awt.Cursor;
4   import java.awt.dnd.DropTargetDropEvent;
5   import java.io.File;
6   import java.text.SimpleDateFormat;
7   import java.util.Locale;
8   
9   import javax.swing.Icon;
10  import javax.swing.JButton;
11  import javax.swing.JLabel;
12  import javax.swing.JOptionPane;
13  import javax.swing.JPanel;
14  import javax.swing.JProgressBar;
15  
16  import org.apache.log4j.Logger;
17  
18  import wjhk.jupload2.context.JUploadContext;
19  import wjhk.jupload2.exception.JUploadException;
20  import wjhk.jupload2.exception.JUploadExceptionStopAddingFiles;
21  import wjhk.jupload2.exception.JUploadIOException;
22  import wjhk.jupload2.filedata.DefaultFileData;
23  import wjhk.jupload2.filedata.FileData;
24  import wjhk.jupload2.gui.JUploadFileChooser;
25  import wjhk.jupload2.gui.JUploadPanel;
26  import wjhk.jupload2.gui.filepanel.FilePanel.FileListViewMode;
27  import wjhk.jupload2.policies.UploadPolicy;
28  import wjhk.jupload2.upload.helper.ByteArrayEncoder;
29  import wjhk.jupload2.upload.helper.InteractiveTrustManager;
30  
31  /**
32   * This basic {@link UploadPolicy} is used to run test cases, and manage what happens in them.
33   * 
34   * @author etienne_sf
35   */
36  public class UploadPolicyTestHelper implements UploadPolicy {
37      /** Logger for this class */
38      protected final Logger logger = Logger.getLogger(getClass());
39  
40      /** */
41      public JUploadContext uploadContext = null;
42  
43      /** */
44      public long maxFileSize;
45  
46      /** */
47      public String lastMsgReceived = null;
48  
49      /**
50       * Creates a JUploadContextTextCase, which will read the default test properties file.
51       * 
52       * @param juploadPanel
53       */
54      public UploadPolicyTestHelper(JUploadPanel juploadPanel) {
55          this.uploadContext = new JUploadContextTestHelper(this, juploadPanel);
56  
57          this.maxFileSize = this.uploadContext.getParameter(PROP_MAX_FILE_SIZE, DEFAULT_MAX_FILE_SIZE);
58      }
59  
60      /** @see UploadPolicy#start() */
61      public void start() {
62      }
63  
64      /**
65       * @see wjhk.jupload2.policies.UploadPolicy#addComponentsToJUploadPanel(wjhk.jupload2.gui.JUploadPanel)
66       */
67      public void addComponentsToJUploadPanel(JUploadPanel jUploadPanel) {
68          displayWarn("UnsupportedOperationException: addComponentsToJUploadPanel() is not implemented in tests cases");
69  
70      }
71  
72      /**
73       * @see wjhk.jupload2.policies.UploadPolicy#addHeader(java.lang.String)
74       */
75      public void addHeader(String header) {
76          this.logger.warn(this.getClass() + ".addHeader() is not implemented in tests cases");
77  
78      }
79  
80      /**
81       * @see wjhk.jupload2.policies.UploadPolicy#afterFileDropped(java.awt.dnd.DropTargetDropEvent)
82       */
83      public void afterFileDropped(DropTargetDropEvent dropEvent) {
84          this.logger.warn(this.getClass() + ".afterFileDropped() is not implemented in tests cases");
85  
86      }
87  
88      /**
89       * @see wjhk.jupload2.policies.UploadPolicy#afterUpload(java.lang.Exception, java.lang.String)
90       */
91      public void afterUpload(Exception e, String serverOutput) throws JUploadException {
92          this.logger.warn(this.getClass() + ".afterUpload() is not implemented in tests cases");
93  
94      }
95  
96      /**
97       * @see wjhk.jupload2.policies.UploadPolicy#alert(java.lang.String)
98       */
99      public void alert(String key) {
100         this.logger.warn(this.getClass() + ".alert() is not implemented in tests cases");
101 
102     }
103 
104     /**
105      * @see wjhk.jupload2.policies.UploadPolicy#alertStr(java.lang.String)
106      */
107     public void alertStr(String str) {
108         this.logger.warn(this.getClass() + ".alertStr() is not implemented in tests cases");
109 
110     }
111 
112     /**
113      * @see wjhk.jupload2.policies.UploadPolicy#beforeUpload()
114      */
115     public boolean beforeUpload() {
116         this.logger.warn(this.getClass() + ".beforeUpload() is not implemented in tests cases");
117         return true;
118     }
119 
120     /**
121      * @see wjhk.jupload2.policies.UploadPolicy#checkUploadSuccess(int, java.lang.String, java.lang.String)
122      */
123     public boolean checkUploadSuccess(int status, String msg, String body) throws JUploadException {
124         this.logger.warn(this.getClass() + ".checkUploadSuccess() is not implemented in tests cases");
125         return true;
126     }
127 
128     /**
129      * @see wjhk.jupload2.policies.UploadPolicy#confirmDialogStr(java.lang.String, int)
130      */
131     public int confirmDialogStr(String str, int optionTypes) {
132         this.logger.warn(this.getClass() + ".confirmDialogStr() is not implemented in tests cases");
133         return JOptionPane.OK_OPTION;
134     }
135 
136     /**
137      * @see wjhk.jupload2.policies.UploadPolicy#createFileChooser()
138      */
139     public JUploadFileChooser createFileChooser() {
140         this.logger.warn(this.getClass() + ".createFileChooser() is not implemented in tests cases");
141         return null;
142     }
143 
144     /**
145      * @see wjhk.jupload2.policies.UploadPolicy#createFileData(java.io.File, java.io.File)
146      */
147     public FileData createFileData(File file) throws JUploadExceptionStopAddingFiles {
148         return new DefaultFileData(file, this);
149     }
150 
151     /**
152      * @see wjhk.jupload2.policies.UploadPolicy#createProgressPanel(javax.swing.JProgressBar, javax.swing.JProgressBar,
153      *      javax.swing.JButton, javax.swing.JButton, JUploadPanel)
154      */
155     public JPanel createProgressPanel(JProgressBar preparationProgressBar, JProgressBar uploadProgressBar,
156             JButton uploadButton, JButton stopButton, JUploadPanel mainPanel) {
157         this.logger.warn(this.getClass() + ".createProgressPanel() is not implemented in tests cases");
158         return null;
159     }
160 
161     /**
162      * @see wjhk.jupload2.policies.UploadPolicy#createStatusBar(javax.swing.JLabel, JUploadPanel)
163      */
164     public JPanel createStatusBar(JLabel statusContent, JUploadPanel mainPanel) {
165         this.logger.warn(this.getClass() + ".createStatusBar() is not implemented in tests cases");
166         return null;
167     }
168 
169     /**
170      * @see wjhk.jupload2.policies.UploadPolicy#createTopPanel(javax.swing.JButton, javax.swing.JButton,
171      *      javax.swing.JButton, wjhk.jupload2.gui.JUploadPanel)
172      */
173     public JPanel createTopPanel(JButton browse, JButton remove, JButton removeAll, JUploadPanel mainPanel) {
174         this.logger.warn(this.getClass() + ".createTopPanel() is not implemented in tests cases");
175         return null;
176     }
177 
178     /**
179      * @see wjhk.jupload2.policies.UploadPolicy#displayDebug(java.lang.String, int)
180      */
181     public void displayDebug(String debug, int minDebugLevel) {
182         this.lastMsgReceived = debug;
183         this.logger.debug(debug);
184     }
185 
186     void displayMsg(String msg) {
187         this.lastMsgReceived = msg;
188         this.logger.info(msg);
189     }
190 
191     /**
192      * @see wjhk.jupload2.policies.UploadPolicy#displayErr(java.lang.Exception)
193      */
194     public void displayErr(Exception e) {
195         this.lastMsgReceived = null;
196         this.logger.error(e.getClass().getName() + ": " + e.getMessage());
197     }
198 
199     /**
200      * @see wjhk.jupload2.policies.UploadPolicy#displayErr(java.lang.String, java.lang.Exception, int)
201      */
202     public int displayErr(String err, Exception e, int optionType) {
203         this.lastMsgReceived = err;
204         this.logger.error("[ERROR] " + e.getClass().getName() + ": " + e.getMessage() + " [" + err + "]");
205         return JOptionPane.OK_OPTION;
206     }
207 
208     /**
209      * @see wjhk.jupload2.policies.UploadPolicy#displayErr(java.lang.String)
210      */
211     public void displayErr(String err) {
212         this.lastMsgReceived = err;
213         this.logger.error("[ERROR] " + err);
214     }
215 
216     /**
217      * @see wjhk.jupload2.policies.UploadPolicy#displayErr(java.lang.String, java.lang.Exception)
218      */
219     public void displayErr(String err, Exception e) {
220         this.lastMsgReceived = err;
221         this.logger.error("[ERROR] " + e.getClass().getName() + ": " + e.getMessage() + " [" + err + "]");
222     }
223 
224     /**
225      * @see wjhk.jupload2.policies.UploadPolicy#displayInfo(java.lang.String)
226      */
227     public void displayInfo(String info) {
228         this.lastMsgReceived = info;
229         this.logger.info("[INFO] " + info);
230     }
231 
232     /**
233      * @see wjhk.jupload2.policies.UploadPolicy#displayParameterStatus()
234      */
235     public void displayParameterStatus() {
236         this.logger.warn(this.getClass() + ".displayParameterStatus() is not implemented in tests cases");
237     }
238 
239     /**
240      * @see wjhk.jupload2.policies.UploadPolicy#displayWarn(java.lang.String)
241      */
242     public void displayWarn(String warn) {
243         this.lastMsgReceived = warn;
244         displayMsg("[WARNING] " + warn);
245     }
246 
247     /**
248      * @see wjhk.jupload2.policies.UploadPolicy#fileFilterAccept(java.io.File)
249      */
250     public boolean fileFilterAccept(File file) {
251         this.logger.warn(this.getClass() + ".fileFilterAccept() is not implemented in tests cases");
252         return true;
253     }
254 
255     /**
256      * @see wjhk.jupload2.policies.UploadPolicy#fileFilterGetDescription()
257      */
258     public String fileFilterGetDescription() {
259         this.logger.warn(this.getClass() + ".fileFilterGetDescription() is not implemented in tests cases");
260         return null;
261 
262     }
263 
264     /**
265      * @see wjhk.jupload2.policies.UploadPolicy#fileViewGetIcon(java.io.File)
266      */
267     public Icon fileViewGetIcon(File file) {
268         this.logger.warn(this.getClass() + ".fileViewGetIcon() is not implemented in tests cases");
269         return null;
270     }
271 
272     /**
273      * @see wjhk.jupload2.policies.UploadPolicy#getAfterUploadTarget()
274      */
275     public String getAfterUploadTarget() {
276         return this.uploadContext.getParameter(PROP_AFTER_UPLOAD_TARGET, DEFAULT_AFTER_UPLOAD_TARGET);
277     }
278 
279     /**
280      * @see wjhk.jupload2.policies.UploadPolicy#getAfterUploadURL()
281      */
282     public String getAfterUploadURL() {
283         return this.uploadContext.getParameter(PROP_AFTER_UPLOAD_URL, DEFAULT_AFTER_UPLOAD_URL);
284     }
285 
286     /**
287      * @see wjhk.jupload2.policies.UploadPolicy#getAllowHttpPersistent()
288      */
289     public boolean getAllowHttpPersistent() {
290         return this.uploadContext.getParameter(PROP_ALLOW_HTTP_PERSISTENT, DEFAULT_ALLOW_HTTP_PERSISTENT);
291     }
292 
293     /**
294      * @see wjhk.jupload2.policies.UploadPolicy#getAllowedFileExtensions()
295      */
296     public String getAllowedFileExtensions() {
297         return this.uploadContext.getParameter(PROP_ALLOWED_FILE_EXTENSIONS, DEFAULT_ALLOWED_FILE_EXTENSIONS);
298     }
299 
300     /**
301      * @see wjhk.jupload2.policies.UploadPolicy#getContext()
302      */
303     public JUploadContext getContext() {
304         return this.uploadContext;
305     }
306 
307     /**
308      * @see wjhk.jupload2.policies.UploadPolicy#getCurrentBrowsingDirectory()
309      */
310     public File getCurrentBrowsingDirectory() {
311         this.logger.warn(this.getClass() + ".getCurrentBrowsingDirectory() is not implemented in tests cases");
312         return null;
313     }
314 
315     /**
316      * @see wjhk.jupload2.policies.UploadPolicy#getDateFormat()
317      */
318     public String getDateFormat() {
319         return new SimpleDateFormat().toPattern();
320     }
321 
322     /**
323      * @see wjhk.jupload2.policies.UploadPolicy#getDebugLevel()
324      */
325     public int getDebugLevel() {
326         return this.uploadContext.getParameter(PROP_DEBUG_LEVEL, DEFAULT_DEBUG_LEVEL);
327     }
328 
329     /** @see UploadPolicy#getFileFilterName() */
330     public String getFileFilterName() {
331         return this.uploadContext.getParameter(PROP_FILE_FILTER_NAME, DEFAULT_FILE_FILTER_NAME);
332     }
333 
334     /**
335      * @see wjhk.jupload2.policies.UploadPolicy#getFileChooserIconFromFileContent()
336      */
337     public int getFileChooserIconFromFileContent() {
338         return this.uploadContext.getParameter(PROP_FILE_CHOOSER_ICON_FROM_FILE_CONTENT,
339                 DEFAULT_FILE_CHOOSER_ICON_FROM_FILE_CONTENT);
340     }
341 
342     /**
343      * @see wjhk.jupload2.policies.UploadPolicy#getFileChooserIconSize()
344      */
345     public int getFileChooserIconSize() {
346         return this.uploadContext.getParameter(PROP_FILE_CHOOSER_ICON_SIZE, DEFAULT_FILE_CHOOSER_ICON_SIZE);
347     }
348 
349     /** @see UploadPolicy#getFileListViewMode() */
350     public FileListViewMode getFileListViewMode() {
351         return this.uploadContext.getParameter(PROP_FILE_LIST_VIEW_MODE, DEFAULT_FILE_LIST_VIEW_MODE);
352     }
353 
354     /**
355      * @see wjhk.jupload2.policies.UploadPolicy#getFilenameEncoding()
356      */
357     public String getFilenameEncoding() {
358         return this.uploadContext.getParameter(PROP_FILENAME_ENCODING, DEFAULT_FILENAME_ENCODING);
359     }
360 
361     /**
362      * @see wjhk.jupload2.policies.UploadPolicy#getFormdata()
363      */
364     public String getFormdata() {
365         return this.uploadContext.getParameter(PROP_FORMDATA, DEFAULT_FORMDATA);
366     }
367 
368     /**
369      * @see wjhk.jupload2.policies.UploadPolicy#getFtpCreateDirectoryStructure()
370      */
371     public boolean getFtpCreateDirectoryStructure() {
372         return this.uploadContext.getParameter(PROP_FTP_CREATE_DIRECTORY_STRUCTURE,
373                 DEFAULT_FTP_CREATE_DIRECTORY_STRUCTURE);
374     }
375 
376     /**
377      * @see wjhk.jupload2.policies.UploadPolicy#getFtpTransfertBinary()
378      */
379     public boolean getFtpTransfertBinary() {
380         return this.uploadContext.getParameter(PROP_FTP_TRANSFERT_BINARY, DEFAULT_FTP_TRANSFERT_BINARY);
381     }
382 
383     /**
384      * @see wjhk.jupload2.policies.UploadPolicy#getFtpTransfertPassive()
385      */
386     public boolean getFtpTransfertPassive() {
387         return this.uploadContext.getParameter(PROP_FTP_TRANSFERT_PASSIVE, DEFAULT_FTP_TRANSFERT_PASSIVE);
388     }
389 
390     /**
391      * @see wjhk.jupload2.policies.UploadPolicy#getHttpUploadParameterName()
392      */
393     public String getHttpUploadParameterName() {
394         return this.uploadContext.getParameter(PROP_HTTP_UPLOAD_PARAMETER_NAME, DEFAULT_HTTP_UPLOAD_PARAMETER_NAME);
395     }
396 
397     /**
398      * @see wjhk.jupload2.policies.UploadPolicy#getHttpUploadParameterType()
399      */
400     public String getHttpUploadParameterType() {
401         return this.uploadContext.getParameter(PROP_HTTP_UPLOAD_PARAMETER_TYPE, DEFAULT_HTTP_UPLOAD_PARAMETER_TYPE);
402     }
403 
404     /**
405      * @see wjhk.jupload2.policies.UploadPolicy#getLastException()
406      */
407     public JUploadException getLastException() {
408         this.logger.warn(this.getClass() + ".getLastException() is not implemented in tests cases");
409         return null;
410     }
411 
412     /**
413      * @see wjhk.jupload2.policies.UploadPolicy#getLastResponseBody()
414      */
415     public String getLastResponseBody() {
416         this.logger.warn(this.getClass() + ".getLastResponseBody() is not implemented in tests cases");
417         return null;
418     }
419 
420     /**
421      * @see wjhk.jupload2.policies.UploadPolicy#getLastResponseMessage()
422      */
423     public String getLastResponseMessage() {
424         this.logger.warn(this.getClass() + ".getLastResponseMessage() is not implemented in tests cases");
425         return null;
426     }
427 
428     /** {@inheritDoc} */
429     public Locale getLocale() {
430         return Locale.getDefault();
431     }
432 
433     /**
434      * @see wjhk.jupload2.policies.UploadPolicy#getLocalizedString(java.lang.String, java.lang.Object[])
435      */
436     public String getLocalizedString(String key, Object... args) {
437         if (key.equals("dateformat")) {
438             return "MM/dd/yyyy";
439         } else {
440             return key;
441         }
442     }
443 
444     /**
445      * @see wjhk.jupload2.policies.UploadPolicy#getMaxChunkSize()
446      */
447     public long getMaxChunkSize() {
448         return this.uploadContext.getParameter(PROP_MAX_CHUNK_SIZE, DEFAULT_MAX_CHUNK_SIZE);
449     }
450 
451     /**
452      * @see wjhk.jupload2.policies.UploadPolicy#getMaxFileSize()
453      */
454     public long getMaxFileSize() {
455         return this.maxFileSize;
456     }
457 
458     /**
459      * @see wjhk.jupload2.policies.UploadPolicy#getNbFilesPerRequest()
460      */
461     public int getNbFilesPerRequest() {
462         return this.uploadContext.getParameter(PROP_NB_FILES_PER_REQUEST, DEFAULT_NB_FILES_PER_REQUEST);
463     }
464 
465     /**
466      * @see wjhk.jupload2.policies.UploadPolicy#getPostURL()
467      */
468     public String getPostURL() {
469         return this.uploadContext.getParameter(PROP_POST_URL, DEFAULT_POST_URL);
470     }
471 
472     /**
473      * @see wjhk.jupload2.policies.UploadPolicy#getReadCookieFromNavigator()
474      */
475     public boolean getReadCookieFromNavigator() {
476         return this.uploadContext.getParameter(PROP_READ_COOKIE_FROM_NAVIGATOR, DEFAULT_READ_COOKIE_FROM_NAVIGATOR);
477     }
478 
479     /**
480      * @see wjhk.jupload2.policies.UploadPolicy#getReadUserAgentFromNavigator()
481      */
482     public boolean getReadUserAgentFromNavigator() {
483         return this.uploadContext.getParameter(PROP_READ_USER_AGENT_FROM_NAVIGATOR,
484                 DEFAULT_READ_USER_AGENT_FROM_NAVIGATOR);
485     }
486 
487     /**
488      * @see wjhk.jupload2.policies.UploadPolicy#getServerProtocol()
489      */
490     public String getServerProtocol() {
491         return this.uploadContext.getParameter(PROP_SERVER_PROTOCOL, DEFAULT_SERVER_PROTOCOL);
492     }
493 
494     /**
495      * @see wjhk.jupload2.policies.UploadPolicy#getShowLogWindow()
496      */
497     public String getShowLogWindow() {
498         return this.uploadContext.getParameter(PROP_SHOW_LOGWINDOW, DEFAULT_SHOW_LOGWINDOW);
499     }
500 
501     /**
502      * @see wjhk.jupload2.policies.UploadPolicy#getSpecificHeaders()
503      */
504     public String getSpecificHeaders() {
505         return this.uploadContext.getParameter(PROP_SPECIFIC_HEADERS, DEFAULT_SPECIFIC_HEADERS);
506     }
507 
508     /**
509      * @see wjhk.jupload2.policies.UploadPolicy#getSslVerifyCert()
510      */
511     public int getSslVerifyCert() {
512         final String sslVerifyCert = this.uploadContext.getParameter(PROP_SSL_VERIFY_CERT, DEFAULT_SSL_VERIFY_CERT);
513         if (sslVerifyCert.toLowerCase().equals("none")) {
514             return InteractiveTrustManager.NONE;
515         } else if (sslVerifyCert.toLowerCase().equals("server")) {
516             return InteractiveTrustManager.SERVER;
517         } else if (sslVerifyCert.toLowerCase().equals("client")) {
518             return InteractiveTrustManager.CLIENT;
519         } else if (sslVerifyCert.toLowerCase().equals("strict")) {
520             return InteractiveTrustManager.STRICT;
521         } else {
522             this.logger.warn("Invalid parameter sslVerifyCert (" + sslVerifyCert + ")");
523             return InteractiveTrustManager.NONE;
524         }
525     }
526 
527     /**
528      * @see wjhk.jupload2.policies.UploadPolicy#getStringUploadError()
529      */
530     public String getStringUploadError() {
531         return this.uploadContext.getParameter(PROP_STRING_UPLOAD_ERROR, DEFAULT_STRING_UPLOAD_ERROR);
532     }
533 
534     /**
535      * @see wjhk.jupload2.policies.UploadPolicy#getStringUploadSuccess()
536      */
537     public String getStringUploadSuccess() {
538         return this.uploadContext.getParameter(PROP_STRING_UPLOAD_SUCCESS, DEFAULT_STRING_UPLOAD_SUCCESS);
539     }
540 
541     /**
542      * @see wjhk.jupload2.policies.UploadPolicy#getStringUploadWarning()
543      */
544     public String getStringUploadWarning() {
545         return this.uploadContext.getParameter(PROP_STRING_UPLOAD_WARNING, DEFAULT_STRING_UPLOAD_WARNING);
546     }
547 
548     /**
549      * @see wjhk.jupload2.policies.UploadPolicy#getUploadFilename(wjhk.jupload2.filedata.FileData, int)
550      */
551     public String getUploadFilename(final FileData fileData, final int index) throws JUploadException {
552         this.logger.warn(this.getClass() + ".getUploadFilename() is not implemented in tests cases");
553         return null;
554     }
555 
556     /**
557      * @see wjhk.jupload2.policies.UploadPolicy#getUploadName(wjhk.jupload2.filedata.FileData, int)
558      */
559     public String getUploadName(final FileData fileData, final int index) throws JUploadException {
560         this.logger.warn(this.getClass() + ".getUploadName() is not implemented in tests cases");
561         return null;
562     }
563 
564     /**
565      * @see wjhk.jupload2.policies.UploadPolicy#getUrlToSendErrorTo()
566      */
567     public String getUrlToSendErrorTo() {
568         return this.uploadContext.getParameter(PROP_URL_TO_SEND_ERROR_TO, DEFAULT_URL_TO_SEND_ERROR_TO);
569     }
570 
571     /**
572      * @see wjhk.jupload2.policies.UploadPolicy#onAppendHeader(wjhk.jupload2.upload.helper.ByteArrayEncoder)
573      */
574     public ByteArrayEncoder onAppendHeader(final ByteArrayEncoder sb) throws JUploadIOException {
575         this.logger.warn(this.getClass() + ".onAppendHeader() is not implemented in tests cases");
576         return null;
577     }
578 
579     /**
580      * @see wjhk.jupload2.policies.UploadPolicy#onFileDoubleClicked(wjhk.jupload2.filedata.FileData)
581      */
582     public void onFileDoubleClicked(FileData fileData) {
583         this.logger.warn(this.getClass() + ".onFileDoubleClicked() is not implemented in tests cases");
584     }
585 
586     /**
587      * @see wjhk.jupload2.policies.UploadPolicy#onFileSelected(wjhk.jupload2.filedata.FileData)
588      */
589     public void onFileSelected(FileData fileData) {
590         this.logger.warn(this.getClass() + ".onFileSelected() is not implemented in tests cases");
591     }
592 
593     /**
594      * @see wjhk.jupload2.policies.UploadPolicy#sendDebugInformation(java.lang.String, java.lang.Exception)
595      */
596     public void sendDebugInformation(String reason, Exception exception) {
597         this.logger.warn(this.getClass() + ".sendDebugInformation() is not implemented in tests cases");
598     }
599 
600     /**
601      * @param currentBrowsingDirectoryParam
602      */
603     public void setCurrentBrowsingDirectory(File currentBrowsingDirectoryParam) {
604         this.logger.warn(this.getClass() + ".setCurrentBrowsingDirectory() is not implemented in tests cases");
605     }
606 
607     /**
608      * @see wjhk.jupload2.policies.UploadPolicy#setCurrentBrowsingDirectory(java.lang.String)
609      */
610     public void setCurrentBrowsingDirectory(String currentBrowsingDirectoryParam) {
611         this.logger.warn(this.getClass() + ".setCurrentBrowsingDirectory() is not implemented in tests cases");
612     }
613 
614     /**
615      * @see wjhk.jupload2.policies.UploadPolicy#setCursor(java.awt.Cursor)
616      */
617     public Cursor setCursor(Cursor cursor) {
618         this.logger.warn(this.getClass() + ".setCursor() is not implemented in tests cases");
619         return null;
620     }
621 
622     /**
623      * @see wjhk.jupload2.policies.UploadPolicy#setDebugLevel(int)
624      */
625     public void setDebugLevel(int debugLevel) {
626         this.logger.warn(this.getClass() + ".setDebugLevel() is not implemented in tests cases");
627     }
628 
629     /**
630      * @see wjhk.jupload2.policies.UploadPolicy#setLang(java.lang.String)
631      */
632     public void setLang(String lang) {
633         this.logger.warn(this.getClass() + ".setLang() is not implemented in tests cases");
634     }
635 
636     /**
637      * @see wjhk.jupload2.policies.UploadPolicy#setPostURL(java.lang.String)
638      */
639     public void setPostURL(String postURL) throws JUploadException {
640         this.logger.warn(this.getClass() + ".setPostURL() is not implemented in tests cases");
641     }
642 
643     /**
644      * @see wjhk.jupload2.policies.UploadPolicy#setProperty(java.lang.String, java.lang.String)
645      */
646     public void setProperty(String prop, String value) throws JUploadException {
647         System.setProperty(prop, value);
648     }
649 
650     /**
651      * @see wjhk.jupload2.policies.UploadPolicy#setShowLogWindow(java.lang.String)
652      */
653     public void setShowLogWindow(String showLogWindow) {
654         this.logger.warn(this.getClass() + ".setShowLogWindow() is not implemented in tests cases");
655     }
656 
657     /**
658      * @see wjhk.jupload2.policies.UploadPolicy#setUrlToSendErrorTo(java.lang.String)
659      */
660     public void setUrlToSendErrorTo(String urlToSendErrorTo) throws JUploadException {
661         this.logger.warn(this.getClass() + ".setUrlToSendErrorTo() is not implemented in tests cases");
662     }
663 
664     /**
665      * @see wjhk.jupload2.policies.UploadPolicy#setWaitCursor()
666      */
667     public Cursor setWaitCursor() {
668         this.logger.warn(this.getClass() + ".setWaitCursor() is not implemented in tests cases");
669         return null;
670     }
671 
672     /** @see UploadPolicy#getSendMD5Sum() */
673     public boolean getSendMD5Sum() {
674         this.logger.warn(this.getClass() + ".getSendMD5Sum() is not implemented in tests cases");
675         return false;
676     }
677 
678     /** @see UploadPolicy#setSendMD5Sum(boolean) */
679     public void setSendMD5Sum(boolean sendMD5Sum) {
680         this.logger.warn(this.getClass() + ".setSendMD5Sum() is not implemented in tests cases");
681     }
682 
683     /**
684      * @see wjhk.jupload2.policies.UploadPolicy#setServerProtocol(java.lang.String)
685      */
686     public void setServerProtocol(String serverProtocol) {
687         this.logger.warn(this.getClass() + ".setServerProtocol() is not implemented in tests cases");
688     }
689 
690     /** @see UploadPolicy#getRetryMaxNumberOf() */
691     public int getRetryMaxNumberOf() {
692         this.logger.warn(this.getClass() + ".getRetryMaxNumberOf() is not implemented in tests cases");
693         return 0;
694     }
695 
696     /** @see UploadPolicy#getRetryNbSecondsBetween() */
697     public int getRetryNbSecondsBetween() {
698         this.logger.warn(this.getClass() + ".getRetryNbSecondsBetween() is not implemented in tests cases");
699         return 0;
700     }
701 
702     /**
703      * @param executionStatus
704      */
705     public void updateButtonState(int executionStatus) {
706         // No action here
707     }
708 
709     public void setFileListViewMode(FileListViewMode fileListViewMode) {
710         // TODO Auto-generated method stub
711         
712     }
713 
714 }