cz.vity.freerapid.plugins.webclient.interfaces
Interface ShareDownloadService

All Known Implementing Classes:
AbstractFileShareService

public interface ShareDownloadService

Interface that represents downloading plugin for service/hoster on the web

Author:
Vity

Method Summary
 Icon getFaviconImage()
          Returns small icon (16x16) that represents service on the web
 String getId()
          Unique ID of the plugin
 int getMaxDownloadsFromOneIP()
          Return max concurrently downloadable files through 1 IP on the representing service/hoster
 String getName()
          Getter - human readable
 PluginContext getPluginContext()
          Returns instance of plugin context to allow access UI or Locale storage
 void run(HttpFileDownloadTask downloadTask)
          Main executable method for downloading file
 void runCheck(HttpFileDownloadTask downloadTask)
          Checks for file existence before downloading Shouldn't be called if the supportsRunCheck method returns false
 void setPluginContext(PluginContext pluginContext)
          Sets the new plugin context for this plugin
 void showOptions()
          Method called from user preferences to show configurable dialog to user
 boolean supportsRunCheck()
          Checks whether implementation/service supports a check for file existence before downloading
 

Method Detail

getName

String getName()
Getter - human readable

Returns:
non null string - service name

getId

String getId()
Unique ID of the plugin

Returns:
unique ID plugin

getMaxDownloadsFromOneIP

int getMaxDownloadsFromOneIP()
Return max concurrently downloadable files through 1 IP on the representing service/hoster

Returns:
integer value max files per 1 IP

supportsRunCheck

boolean supportsRunCheck()
Checks whether implementation/service supports a check for file existence before downloading

Returns:
true if the implementation supports existence check, false otherwise

getFaviconImage

Icon getFaviconImage()
Returns small icon (16x16) that represents service on the web

Returns:
small icon, null if there is no associated icon

run

void run(HttpFileDownloadTask downloadTask)
         throws Exception
Main executable method for downloading file

Parameters:
downloadTask - file that is being downloaded
Throws:
Exception - exception during downloading

runCheck

void runCheck(HttpFileDownloadTask downloadTask)
              throws Exception
Checks for file existence before downloading Shouldn't be called if the supportsRunCheck method returns false

Parameters:
downloadTask - file that is being checked
Throws:
Exception
IllegalStateException - if service does not supports checking file

showOptions

void showOptions()
                 throws Exception
Method called from user preferences to show configurable dialog to user

Throws:
Exception

getPluginContext

PluginContext getPluginContext()
Returns instance of plugin context to allow access UI or Locale storage

Returns:
instance of plugin context

setPluginContext

void setPluginContext(PluginContext pluginContext)
Sets the new plugin context for this plugin

Parameters:
pluginContext - instance of plugin context