|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jdesktop.application.AbstractBean cz.vity.freerapid.model.DownloadFile
public class DownloadFile
Hashcode a Equals nepretizeny na url (muze byt vic souboru s touto url, neni unikatni), pocita se s tim v ProcessManageru pri force download.
Constructor Summary | |
---|---|
DownloadFile()
Constructs a new DownloadFile. |
|
DownloadFile(URL fileUrl,
File saveToDirectory,
String description)
|
Method Summary | |
---|---|
float |
getAllTimeAverageSpeed()
|
float |
getAverageSpeed()
Getter for property 'averageSpeed'. |
long |
getCompleteTaskDuration()
Getter for property 'completeTaskDuration'. |
ConnectionSettings |
getConnectionSettings()
Getter for property 'connectionSettings'. |
String |
getDescription()
Description for this file (password etc.) |
long |
getDownloaded()
Returns value - how many bytes were already downloaded for this file. |
int |
getErrorAttemptsCount()
Getter for property 'errorAttemptsCount'. |
String |
getErrorMessage()
Getter for property 'errorMessage'. |
String |
getFileName()
Real physical file name of the downloaded file File name is initialized from given URL to some value. |
long |
getFileSize()
Method to get whole file size of the give file. |
FileState |
getFileState()
Getter |
String |
getFileType()
Getter for property 'fileType'. |
URL |
getFileUrl()
URL to file that is given by user |
File |
getOutputFile()
Getter for property 'outputFile'. |
String |
getPluginID()
Plugin ID associated with this file |
Map<String,Object> |
getProperties()
Getter for property 'properties'. |
File |
getSaveToDirectory()
Returns target save directory |
String |
getServiceName()
Getter for property 'serviceName'. |
String |
getShareDownloadServiceID()
Deprecated. |
int |
getSleep()
Getter for property 'sleep'. |
long |
getSpeed()
Getter for property 'speed'. |
DownloadState |
getState()
Returns current download state of file. |
DownloadTask |
getTask()
Getter for property 'task'. |
int |
getTimeToQueued()
Getter for property 'timeToQueued'. |
int |
getTimeToQueuedMax()
Getter for property 'timeToQueuedMax'. |
void |
propertyChange(PropertyChangeEvent evt)
|
void |
resetErrorAttempts()
|
void |
resetSpeed()
|
void |
setAllTimeAverageSpeed(float allTimeAverageSpeed)
|
void |
setAverageSpeed(float averageSpeed)
Setter for property 'averageSpeed'. |
void |
setCompleteTaskDuration(long completeTaskDuration)
Setter for property 'completeTaskDuration'. |
void |
setConnectionSettings(ConnectionSettings connectionSettings)
Setter for property 'connectionSettings'. |
void |
setDescription(String description)
Description for this file |
void |
setDownloaded(long downloaded)
Sets how many bytes were already downloaded for this file |
void |
setErrorAttemptsCount(int errorAttemptsCount)
Setter for property 'errorAttemptsCount'. |
void |
setErrorMessage(String errorMessage)
Setter for property 'errorMessage'. |
void |
setFileName(String fileName)
Sets file name |
void |
setFileSize(long fileSize)
Setter to update file size (of complete file) |
void |
setFileState(FileState fileState)
Setter |
void |
setFileType(String fileType)
Setter for property 'fileType'. |
void |
setFileUrl(URL fileUrl)
Setter for property 'fileUrl'. |
void |
setNewURL(URL fileUrl)
Sets new URL for this file for downloading. |
void |
setPluginID(String pluginID)
Sets plugin ID associated with this file If pluginID is an empty string, the plugin ID selected automatically. |
void |
setProperties(Map<String,Object> properties)
Setter for property 'properties'. |
void |
setSaveToDirectory(File saveToDirectory)
Setter for property 'saveToDirectory'. |
void |
setServiceName(String serviceName)
Setter for property 'serviceName'. |
void |
setShareDownloadServiceID(String shareDownloadServiceID)
Deprecated. |
void |
setSleep(int sleep)
Setter for property 'sleep'. |
void |
setSpeed(long speed)
Setter for property 'speed'. |
void |
setState(DownloadState state)
Setter |
void |
setTask(DownloadTask task)
Setter for property 'task'. |
void |
setTimeToQueued(int i)
Setter for property 'timeToQueued'. |
void |
setTimeToQueuedMax(int timeToQueuedMax)
Setter for property 'timeToQueuedMax'. |
String |
toString()
|
Methods inherited from class org.jdesktop.application.AbstractBean |
---|
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DownloadFile()
public DownloadFile(URL fileUrl, File saveToDirectory, String description)
Method Detail |
---|
public void setNewURL(URL fileUrl)
setNewURL
in interface HttpFile
fileUrl
- new URLpublic File getSaveToDirectory()
HttpFile
getSaveToDirectory
in interface HttpFile
public long getFileSize()
getFileSize
in interface HttpFile
public void setFileSize(long fileSize)
setFileSize
in interface HttpFile
fileSize
- new value of file sizepublic DownloadTask getTask()
public void setTask(DownloadTask task)
task
- Value to set for property 'task'.public DownloadState getState()
getState
in interface HttpFile
public void setState(DownloadState state)
setState
in interface HttpFile
state
- new download state during downloadingpublic URL getFileUrl()
getFileUrl
in interface HttpFile
public String getFileName()
getFileName
in interface HttpFile
HttpDownloadClient.makeFinalRequestForFile(org.apache.commons.httpclient.HttpMethod, HttpFile, boolean);
public void setFileName(String fileName)
setFileName
in interface HttpFile
fileName
- file namepublic String toString()
toString
in class Object
public long getDownloaded()
getDownloaded
in interface HttpFile
public void setDownloaded(long downloaded)
setDownloaded
in interface HttpFile
downloaded
- file size in bytespublic void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
public void setSpeed(long speed)
speed
- Value to set for property 'speed'.public long getSpeed()
public void setSleep(int sleep)
sleep
- Value to set for property 'sleep'.public void setAverageSpeed(float averageSpeed)
averageSpeed
- Value to set for property 'averageSpeed'.public void setErrorMessage(String errorMessage)
errorMessage
- Value to set for property 'errorMessage'.public int getSleep()
public float getAverageSpeed()
public String getServiceName()
public void setServiceName(String serviceName)
serviceName
- Value to set for property 'serviceName'.public String getErrorMessage()
public File getOutputFile()
public void setFileUrl(URL fileUrl)
fileUrl
- Value to set for property 'fileUrl'.public void setSaveToDirectory(File saveToDirectory)
saveToDirectory
- Value to set for property 'saveToDirectory'.public String getDescription()
getDescription
in interface HttpFile
public void setDescription(String description)
setDescription
in interface HttpFile
description
- new value descriptionpublic String getFileType()
public void setFileType(String fileType)
fileType
- Value to set for property 'fileType'.@Deprecated public String getShareDownloadServiceID()
public void setTimeToQueued(int i)
i
- Value to set for property 'timeToQueued'.public int getTimeToQueued()
public void setErrorAttemptsCount(int errorAttemptsCount)
errorAttemptsCount
- Value to set for property 'errorAttemptsCount'.public int getErrorAttemptsCount()
public void resetErrorAttempts()
@Deprecated public void setShareDownloadServiceID(String shareDownloadServiceID)
shareDownloadServiceID
- Value to set for property 'shareDownloadServiceID'.public int getTimeToQueuedMax()
public void setTimeToQueuedMax(int timeToQueuedMax)
timeToQueuedMax
- Value to set for property 'timeToQueuedMax'.public void resetSpeed()
public long getCompleteTaskDuration()
public void setCompleteTaskDuration(long completeTaskDuration)
completeTaskDuration
- Value to set for property 'completeTaskDuration'.public ConnectionSettings getConnectionSettings()
public void setConnectionSettings(ConnectionSettings connectionSettings)
connectionSettings
- Value to set for property 'connectionSettings'.public FileState getFileState()
getFileState
in interface HttpFile
public void setFileState(FileState fileState)
setFileState
in interface HttpFile
fileState
- new value of file statepublic Map<String,Object> getProperties()
HttpFile
getProperties
in interface HttpFile
public void setProperties(Map<String,Object> properties)
properties
- Value to set for property 'properties'.public void setPluginID(String pluginID)
setPluginID
in interface HttpFile
pluginID
- plugin IDpublic String getPluginID()
getPluginID
in interface HttpFile
public float getAllTimeAverageSpeed()
public void setAllTimeAverageSpeed(float allTimeAverageSpeed)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |