public class UploadPolicyTestHelper extends Object
UploadPolicy
is used to run test cases, and manage what happens in them.Modifier and Type | Field and Description |
---|---|
String |
lastMsgReceived |
protected org.apache.log4j.Logger |
logger
Logger for this class
|
long |
maxFileSize |
JUploadContext |
uploadContext |
Constructor and Description |
---|
UploadPolicyTestHelper(JUploadPanel juploadPanel)
Creates a JUploadContextTextCase, which will read the default test properties file.
|
protected final org.apache.log4j.Logger logger
public JUploadContext uploadContext
public long maxFileSize
public String lastMsgReceived
public UploadPolicyTestHelper(JUploadPanel juploadPanel)
juploadPanel
- public void start()
UploadPolicy#start()
public void addComponentsToJUploadPanel(JUploadPanel jUploadPanel)
UploadPolicy
public void addHeader(String header)
UploadPolicy
public void afterFileDropped(DropTargetDropEvent dropEvent)
UploadPolicy
public void afterUpload(Exception e, String serverOutput) throws JUploadException
JUploadException
UploadPolicy
public void alert(String key)
UploadPolicy
public void alertStr(String str)
UploadPolicy
public boolean beforeUpload()
UploadPolicy
public boolean checkUploadSuccess(int status, String msg, String body) throws JUploadException
JUploadException
UploadPolicy
public int confirmDialogStr(String str, int optionTypes)
UploadPolicy
public JUploadFileChooser createFileChooser()
UploadPolicy
public FileData createFileData(File file) throws JUploadExceptionStopAddingFiles
JUploadExceptionStopAddingFiles
UploadPolicy
public JPanel createProgressPanel(JProgressBar preparationProgressBar, JProgressBar uploadProgressBar, JButton uploadButton, JButton stopButton, JUploadPanel mainPanel)
UploadPolicy
public JPanel createStatusBar(JLabel statusContent, JUploadPanel mainPanel)
UploadPolicy
public JPanel createTopPanel(JButton browse, JButton remove, JButton removeAll, JUploadPanel mainPanel)
UploadPolicy
public void displayDebug(String debug, int minDebugLevel)
UploadPolicy
public void displayErr(Exception e)
UploadPolicy
public int displayErr(String err, Exception e, int optionType)
UploadPolicy
public void displayErr(String err)
UploadPolicy
public void displayErr(String err, Exception e)
UploadPolicy
public void displayInfo(String info)
UploadPolicy
public void displayParameterStatus()
UploadPolicy
public void displayWarn(String warn)
UploadPolicy
public boolean fileFilterAccept(File file)
UploadPolicy
public String fileFilterGetDescription()
UploadPolicy
public Icon fileViewGetIcon(File file)
UploadPolicy
public String getAfterUploadTarget()
UploadPolicy
public String getAfterUploadURL()
UploadPolicy
public boolean getAllowHttpPersistent()
UploadPolicy
public String getAllowedFileExtensions()
UploadPolicy
public JUploadContext getContext()
UploadPolicy
public File getCurrentBrowsingDirectory()
UploadPolicy
public String getDateFormat()
UploadPolicy
public int getDebugLevel()
UploadPolicy
public String getFileFilterName()
UploadPolicy#getFileFilterName()
public int getFileChooserIconFromFileContent()
UploadPolicy
public int getFileChooserIconSize()
UploadPolicy
public FileListViewMode getFileListViewMode()
UploadPolicy#getFileListViewMode()
public String getFilenameEncoding()
UploadPolicy
public String getFormdata()
UploadPolicy
public boolean getFtpCreateDirectoryStructure()
UploadPolicy
public boolean getFtpTransfertBinary()
UploadPolicy
public boolean getFtpTransfertPassive()
UploadPolicy
public String getHttpUploadParameterName()
UploadPolicy
public String getHttpUploadParameterType()
UploadPolicy
public JUploadException getLastException()
UploadPolicy
public String getLastResponseBody()
UploadPolicy
public String getLastResponseMessage()
UploadPolicy
public Locale getLocale()
public String getLocalizedString(String key, Object... args)
UploadPolicy
public long getMaxChunkSize()
UploadPolicy
public long getMaxFileSize()
UploadPolicy
public int getNbFilesPerRequest()
UploadPolicy
public String getPostURL()
UploadPolicy
public boolean getReadCookieFromNavigator()
UploadPolicy
public boolean getReadUserAgentFromNavigator()
UploadPolicy
public String getServerProtocol()
UploadPolicy
public String getShowLogWindow()
UploadPolicy
public String getSpecificHeaders()
UploadPolicy
public int getSslVerifyCert()
UploadPolicy
public String getStringUploadError()
UploadPolicy
public String getStringUploadSuccess()
UploadPolicy
public String getStringUploadWarning()
UploadPolicy
public String getUploadFilename(FileData fileData, int index) throws JUploadException
JUploadException
UploadPolicy
public String getUploadName(FileData fileData, int index) throws JUploadException
JUploadException
UploadPolicy
public String getUrlToSendErrorTo()
UploadPolicy
public ByteArrayEncoder onAppendHeader(ByteArrayEncoder sb) throws JUploadIOException
JUploadIOException
UploadPolicy
public void onFileDoubleClicked(FileData fileData)
UploadPolicy
public void onFileSelected(FileData fileData)
UploadPolicy
public void sendDebugInformation(String reason, Exception exception)
UploadPolicy
public void setCurrentBrowsingDirectory(File currentBrowsingDirectoryParam)
currentBrowsingDirectoryParam
- public void setCurrentBrowsingDirectory(String currentBrowsingDirectoryParam)
UploadPolicy
public Cursor setCursor(Cursor cursor)
UploadPolicy
public void setDebugLevel(int debugLevel)
UploadPolicy
public void setLang(String lang)
UploadPolicy
public void setPostURL(String postURL) throws JUploadException
JUploadException
UploadPolicy
public void setProperty(String prop, String value) throws JUploadException
JUploadException
UploadPolicy
public void setShowLogWindow(String showLogWindow)
UploadPolicy
public void setUrlToSendErrorTo(String urlToSendErrorTo) throws JUploadException
JUploadException
UploadPolicy
public Cursor setWaitCursor()
UploadPolicy
public boolean getSendMD5Sum()
UploadPolicy#getSendMD5Sum()
public void setSendMD5Sum(boolean sendMD5Sum)
UploadPolicy#setSendMD5Sum(boolean)
public void setServerProtocol(String serverProtocol)
UploadPolicy
public int getRetryMaxNumberOf()
UploadPolicy#getRetryMaxNumberOf()
public int getRetryNbSecondsBetween()
UploadPolicy#getRetryNbSecondsBetween()
public void updateButtonState(int executionStatus)
executionStatus
- public void setFileListViewMode(FileListViewMode fileListViewMode)
Copyright © 2015. All rights reserved.