jfileupload.transfer.client.core
Class AbstractTransferController

java.lang.Object
  extended by jfileupload.transfer.client.core.AbstractTransferController
All Implemented Interfaces:
TransferController
Direct Known Subclasses:
FTPTransfer, HTTPTransfer

public abstract class AbstractTransferController
extends java.lang.Object
implements TransferController


Field Summary
static int BUFFERSIZE
           
static java.lang.String GZIPEXTENSION
           
static java.lang.String ZIPEXTENSION
           
 
Fields inherited from interface jfileupload.transfer.client.core.TransferController
COMPLETED_STATUS, MAX_AUTH_ATTEMPTS, PREPROCESSING_FILTER, RUNNING_STATUS, WAITING_STATUS
 
Constructor Summary
AbstractTransferController()
          Top TransferController.
 
Method Summary
 void addChecksumListener(ChecksumListener listener)
           
 void addCompressListener(CompressListener listener)
           
 void addFilterListener(FilterListener listener)
           
 void addProtocolListener(ProtocolListener listener)
           
 void addSplitListener(SplitListener listener)
           
 void addTransferListener(TransferListener listener)
           
 java.net.PasswordAuthentication authenticate(AuthenticationModel model, int attempt)
          Optional prompt for authentication.
abstract  void begin()
          Start (fire and forget) asynchroneous transfer.
abstract  void cancel()
          Cancel transfer.
protected  void checksumCompletedNotification(java.lang.String checksum)
          Notify listeners about checksum completed.
protected  void checksumStartedNotification(java.lang.String type)
          Notify listeners about checksum starting.
 boolean checkZipMaxSize(java.io.File zipfile)
          Check if file size match to zipmaxsize parameter.
protected  void cleanFilter()
          Calls clean() method on default pre-processing filter.
protected  void cleanFilter(java.lang.String id)
          Calls clean() method on filter.
protected  java.io.File compress(java.io.File file)
          Zip input file.
protected  java.io.File compress(java.io.File file, java.lang.String alg)
          Compress input file.
protected  java.io.File compressFolder(java.io.File folder, java.io.File zipfile)
          Compress a folder (recursively) to a given file.
protected  void compressingNotification(int size)
          Notify listeners about current compression.
protected  void compressionFailedNotification(ClientException e)
          Notify listeners about compression failed.
protected  void computeChecksum(java.io.File file, long offset, java.lang.Object checksum)
          Compute checksum (CRC32 or MessageDigest) for a given filename.
abstract  java.lang.Object execute()
          Start synchroneous transfer.
protected  java.lang.Object executeFilter(java.lang.Object input)
          Calls execute() method on default pre-processing filter.
protected  java.lang.Object executeFilter(java.lang.Object input, java.lang.String id)
          Calls execute() method on filter.
protected  java.util.ArrayList getAllowedSourceFiles()
          Returns all files (flat list) allowed to be transfered.
 java.lang.String getAuthentication()
           
 java.lang.String getBlackList()
           
 java.util.List getChecksumListeners()
           
protected  long getChunks(java.io.File file)
           
 long getChunkSize()
           
 java.util.List getCompressListeners()
           
 long getCRC32(java.io.File file, long offset)
          Compute CRC32 for a given filename.
 java.lang.String getEncoding()
           
 java.lang.Object getExt()
           
 TransferFilter getFilter()
          Return default TransferFilter.
 TransferFilter getFilter(java.lang.String id)
          Get TransferFilter for a given identifier.
 java.lang.String getFilterChain()
           
 java.util.List getFilterIDs()
          Return all filter identifiers.
 java.lang.String getFilterImpl()
          Return the default filter implementation.
 java.lang.String getFilterImpl(java.lang.String id)
          Return filter implementation for a given identifier.
 java.util.List getFilterListeners()
           
 java.lang.String getHidden()
           
protected  long getLastChunkSize(java.io.File file)
           
 long getLong(java.lang.String str)
          Parse String to long.
 long getMaxDepth()
           
 long getMaxFiles()
           
 long getMaxSize()
           
 byte[] getMD5(java.io.File file, long offset)
          Compute MD5 for a given filename.
 long getMinSize()
           
 java.lang.String getOverwrite()
           
 java.util.HashMap getParameters(java.lang.String section)
           
 java.lang.String getParamFile()
           
 java.lang.String getPassword()
           
 java.lang.String getPolicy()
           
 TransferFilter getPreProcessingFilter()
          Return PreProcessing TransferFilter.
 java.lang.String getPreProcessingFilterImpl()
          Return the pre-processing filter implementation.
 java.util.List getProtocolListeners()
           
 Conf getRawConf()
           
 java.lang.String getResume()
           
 long getResumeOffset()
           
 int getRetry()
           
 int getRetryDelay()
           
 java.lang.String getRootDir()
           
 java.net.URL getServerUrl()
           
 java.util.List getSource()
           
 java.util.List getSplitListeners()
           
 int getStatus()
           
 java.util.List getTarget()
           
 java.lang.String getTemplate()
           
 long getTimeOut()
          Returns underlying socket timeout.
 java.lang.String getTmpDir()
           
 java.lang.String getTmpFolder()
          Returns tmpfolder.
 TransferFileFilter getTransferFileFilter()
          Return transfer FileFilter instance.
 java.util.List getTransferListeners()
           
 java.lang.String getUsername()
           
 java.lang.String getWhiteList()
           
 java.lang.String getZipFolder()
           
 java.lang.String getZipIgnoreList()
           
 long getZipMaxSize()
           
 java.lang.String getZipOnFly()
           
 java.lang.String hexDump(byte[] in)
          Dump byte array to hexadecimal string.
 void init()
          Initialize TransferController.
 boolean isAllowed(java.io.File current)
          Check if file is allowed for transfer.
 boolean isThreaded()
           
protected  void recurse(java.io.File dir, java.util.ArrayList target, long level, long depth)
          Recurse directory to find all files given a depth.
protected  void recursiveCompress(java.util.zip.ZipOutputStream zos, java.io.File folder, java.io.File rootFolder, byte[] buffer, long level, long depth)
          Compress folder recursively.
 void removeChecksumListener(ChecksumListener listener)
           
 void removeCompressListener(CompressListener listener)
           
 void removeFilterListener(FilterListener listener)
           
 void removeProtocolListener(ProtocolListener listener)
           
 void removeSplitListener(SplitListener listener)
           
 void removeTransferListener(TransferListener listener)
           
 java.lang.String rename(java.lang.String filename, java.lang.String tmpl, int attempt)
          Apply rename policy.
 void setAuthentication(java.lang.String authmode)
           
 void setBlackList(java.lang.String string)
           
 void setChunkSize(long l)
           
 void setEncoding(java.lang.String string)
           
 void setExt(java.lang.Object ext)
           
 void setFilter(TransferFilter filter)
          Set default TransferFilter.
 void setFilter(TransferFilter filter, java.lang.String id)
          Set TransferFilter for a given identifier.
 void setFilterChain(java.lang.String chain)
           
 void setFilterIDs(java.util.List ids)
          Set all filter identifiers.
 void setFilterImpl(java.lang.String filterimpl)
          Set the default filter implementation
 void setFilterImpl(java.lang.String filterimpl, java.lang.String id)
          Set Filter implementation for a given identifier
 void setHidden(java.lang.String hidden)
           
 void setMaxDepth(long depth)
           
 void setMaxFiles(long amount)
           
 void setMaxSize(long size)
           
 void setMinSize(long size)
           
 void setOverwrite(java.lang.String string)
           
 void setParameters(java.util.HashMap map)
           
 void setParamFile(java.lang.String string)
           
 void setPassword(java.lang.String password)
           
 void setPolicy(java.lang.String pol)
           
 void setPreProcessingFilter(TransferFilter filter)
          Set PreProcessing TransferFilter.
 void setPreProcessingFilterImpl(java.lang.String filterimpl)
          Set the pre-processing filter implementation
 void setRawConf(Conf rawconf)
           
 void setResume(java.lang.String string)
           
protected  void setResumeOffset(long offset)
           
 void setRetry(int c)
           
 void setRetryDelay(int delay)
           
 void setRootDir(java.lang.String rootdir)
           
 void setServerUrl(java.net.URL url)
           
 void setSource(java.util.List src)
           
 void setStatus(int status)
           
 void setTarget(java.util.List tar)
           
 void setTemplate(java.lang.String string)
           
 void setThreaded(boolean threaded)
           
 void setTimeOut(long timeout)
          Set socket timeout in milliseconds.
 void setTmpDir(java.lang.String string)
           
 void setUsername(java.lang.String username)
           
 void setWhiteList(java.lang.String string)
           
 void setZipFolder(java.lang.String string)
           
 void setZipIgnoreList(java.lang.String string)
           
 void setZipMaxSize(long size)
           
 void setZipOnFly(java.lang.String zip)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUFFERSIZE

public static int BUFFERSIZE

ZIPEXTENSION

public static java.lang.String ZIPEXTENSION

GZIPEXTENSION

public static java.lang.String GZIPEXTENSION
Constructor Detail

AbstractTransferController

public AbstractTransferController()
Top TransferController. It provides basic implementation for all sub-classes.

Method Detail

init

public void init()
          throws ClientException
Initialize TransferController. It instantiates custom TransferFilter (if any) and calls init().

Specified by:
init in interface TransferController
Throws:
ClientException

execute

public abstract java.lang.Object execute()
                                  throws ClientException
Description copied from interface: TransferController
Start synchroneous transfer.

Specified by:
execute in interface TransferController
Throws:
ClientException

begin

public abstract void begin()
Description copied from interface: TransferController
Start (fire and forget) asynchroneous transfer.

Specified by:
begin in interface TransferController

cancel

public abstract void cancel()
Description copied from interface: TransferController
Cancel transfer.

Specified by:
cancel in interface TransferController

getAllowedSourceFiles

protected java.util.ArrayList getAllowedSourceFiles()
                                             throws ClientException
Returns all files (flat list) allowed to be transfered. It checks file constraints (maxfiles, maxsize, minsize, whitelist, depth, hidden).

Returns:
File array
Throws:
ClientException

isAllowed

public boolean isAllowed(java.io.File current)
                  throws ClientException
Check if file is allowed for transfer.
policy checking
size checking
whitelist checking
hidden checking

Parameters:
current -
Returns:
Throws:
ClientException

checkZipMaxSize

public boolean checkZipMaxSize(java.io.File zipfile)
                        throws ClientException
Check if file size match to zipmaxsize parameter.

Parameters:
zipfile -
Returns:
Throws:
ClientException

recurse

protected void recurse(java.io.File dir,
                       java.util.ArrayList target,
                       long level,
                       long depth)
Recurse directory to find all files given a depth.

Parameters:
dir -
target -
level - current depth
depth - max depth allowed

getChunks

protected long getChunks(java.io.File file)

getLastChunkSize

protected long getLastChunkSize(java.io.File file)

executeFilter

protected java.lang.Object executeFilter(java.lang.Object input)
                                  throws ClientException
Calls execute() method on default pre-processing filter.

Parameters:
input -
Returns:
Throws:
ClientException

executeFilter

protected java.lang.Object executeFilter(java.lang.Object input,
                                         java.lang.String id)
                                  throws ClientException
Calls execute() method on filter.

Parameters:
input -
id -
Returns:
Throws:
ClientException

cleanFilter

protected void cleanFilter(java.lang.String id)
Calls clean() method on filter.

Parameters:
id -

cleanFilter

protected void cleanFilter()
Calls clean() method on default pre-processing filter.


compress

protected java.io.File compress(java.io.File file)
Zip input file.

Parameters:
file -
Returns:
Compressed file.

compress

protected java.io.File compress(java.io.File file,
                                java.lang.String alg)
Compress input file.

Parameters:
file -
alg - zip or gzip
Returns:

compressFolder

protected java.io.File compressFolder(java.io.File folder,
                                      java.io.File zipfile)
Compress a folder (recursively) to a given file. Empty folders are included. Known limitation : Non-ASCII characters such as ÄÜäöüùéàè... are ZIP tools dependant. See : http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4244499 SUN ZIP implementation stores non-ASCII characters as UTF-8. JAVA_HOME/bin/jar.exe tool is able to unzip them. WinZip can't.

Parameters:
folder - File
zipfile - File
Returns:
File

recursiveCompress

protected void recursiveCompress(java.util.zip.ZipOutputStream zos,
                                 java.io.File folder,
                                 java.io.File rootFolder,
                                 byte[] buffer,
                                 long level,
                                 long depth)
                          throws java.io.IOException
Compress folder recursively. Empty folders are included.

Parameters:
zos - ZipOutputStream
folder - File
rootFolder - File
buffer - byte[]
level -
depth -
Throws:
java.io.IOException

compressingNotification

protected void compressingNotification(int size)
Notify listeners about current compression.

Parameters:
size -

compressionFailedNotification

protected void compressionFailedNotification(ClientException e)
Notify listeners about compression failed.

Parameters:
e -

checksumStartedNotification

protected void checksumStartedNotification(java.lang.String type)
Notify listeners about checksum starting.

Parameters:
size -

checksumCompletedNotification

protected void checksumCompletedNotification(java.lang.String checksum)
Notify listeners about checksum completed.

Parameters:
size -

rename

public java.lang.String rename(java.lang.String filename,
                               java.lang.String tmpl,
                               int attempt)
Apply rename policy. Attempt > 0 means that overwrite template is applied. Attempt <=0 means that rename template is applied.

Parameters:
filename -
tmpl - optional template
attempt -
Returns:

getCRC32

public long getCRC32(java.io.File file,
                     long offset)
Compute CRC32 for a given filename.

Parameters:
file -
offset - data range [0-offset] to compute CRC32, -1 for all data.
Returns:
-1 if cannot compute CRC32.

getMD5

public byte[] getMD5(java.io.File file,
                     long offset)
Compute MD5 for a given filename.

Parameters:
file -
offset - data range [0-offset] to compute MD5, -1 for all data.
Returns:
null if cannot compute MD5.

hexDump

public java.lang.String hexDump(byte[] in)
Dump byte array to hexadecimal string.

Parameters:
in -
Returns:
null if cannot compute

computeChecksum

protected void computeChecksum(java.io.File file,
                               long offset,
                               java.lang.Object checksum)
Compute checksum (CRC32 or MessageDigest) for a given filename.

Parameters:
file -
offset - offset data range [0-offset] to compute checksum, -1 for all data.
checksum - CRC32 or MessageDigest instance

getTmpFolder

public java.lang.String getTmpFolder()
Returns tmpfolder. It creates it if needed.

Returns:

authenticate

public java.net.PasswordAuthentication authenticate(AuthenticationModel model,
                                                    int attempt)
Optional prompt for authentication.

Parameters:
model -
attempt -
Returns:

addTransferListener

public void addTransferListener(TransferListener listener)
Specified by:
addTransferListener in interface TransferController

removeTransferListener

public void removeTransferListener(TransferListener listener)
Specified by:
removeTransferListener in interface TransferController

getTransferListeners

public java.util.List getTransferListeners()
Specified by:
getTransferListeners in interface TransferController

addSplitListener

public void addSplitListener(SplitListener listener)
Specified by:
addSplitListener in interface TransferController

removeSplitListener

public void removeSplitListener(SplitListener listener)
Specified by:
removeSplitListener in interface TransferController

getSplitListeners

public java.util.List getSplitListeners()
Specified by:
getSplitListeners in interface TransferController

addCompressListener

public void addCompressListener(CompressListener listener)
Specified by:
addCompressListener in interface TransferController

removeCompressListener

public void removeCompressListener(CompressListener listener)
Specified by:
removeCompressListener in interface TransferController

getCompressListeners

public java.util.List getCompressListeners()
Specified by:
getCompressListeners in interface TransferController

addFilterListener

public void addFilterListener(FilterListener listener)
Specified by:
addFilterListener in interface TransferController

removeFilterListener

public void removeFilterListener(FilterListener listener)
Specified by:
removeFilterListener in interface TransferController

getFilterListeners

public java.util.List getFilterListeners()
Specified by:
getFilterListeners in interface TransferController

addProtocolListener

public void addProtocolListener(ProtocolListener listener)
Specified by:
addProtocolListener in interface TransferController

removeProtocolListener

public void removeProtocolListener(ProtocolListener listener)
Specified by:
removeProtocolListener in interface TransferController

getProtocolListeners

public java.util.List getProtocolListeners()
Specified by:
getProtocolListeners in interface TransferController

addChecksumListener

public void addChecksumListener(ChecksumListener listener)
Specified by:
addChecksumListener in interface TransferController

removeChecksumListener

public void removeChecksumListener(ChecksumListener listener)
Specified by:
removeChecksumListener in interface TransferController

getChecksumListeners

public java.util.List getChecksumListeners()
Specified by:
getChecksumListeners in interface TransferController

getSource

public java.util.List getSource()
Specified by:
getSource in interface TransferController

getTmpDir

public java.lang.String getTmpDir()
Specified by:
getTmpDir in interface TransferController

getTarget

public java.util.List getTarget()
Specified by:
getTarget in interface TransferController

setSource

public void setSource(java.util.List src)
Specified by:
setSource in interface TransferController

setMaxSize

public void setMaxSize(long size)
Specified by:
setMaxSize in interface TransferController

getMaxSize

public long getMaxSize()
Specified by:
getMaxSize in interface TransferController

setMinSize

public void setMinSize(long size)
Specified by:
setMinSize in interface TransferController

getMinSize

public long getMinSize()
Specified by:
getMinSize in interface TransferController

setMaxFiles

public void setMaxFiles(long amount)
Specified by:
setMaxFiles in interface TransferController

getMaxFiles

public long getMaxFiles()
Specified by:
getMaxFiles in interface TransferController

setZipMaxSize

public void setZipMaxSize(long size)
Specified by:
setZipMaxSize in interface TransferController

getZipMaxSize

public long getZipMaxSize()
Specified by:
getZipMaxSize in interface TransferController

setPolicy

public void setPolicy(java.lang.String pol)
Specified by:
setPolicy in interface TransferController

getPolicy

public java.lang.String getPolicy()
Specified by:
getPolicy in interface TransferController

setHidden

public void setHidden(java.lang.String hidden)
Specified by:
setHidden in interface TransferController

getHidden

public java.lang.String getHidden()
Specified by:
getHidden in interface TransferController

setZipOnFly

public void setZipOnFly(java.lang.String zip)
Specified by:
setZipOnFly in interface TransferController

getZipOnFly

public java.lang.String getZipOnFly()
Specified by:
getZipOnFly in interface TransferController

setMaxDepth

public void setMaxDepth(long depth)
Specified by:
setMaxDepth in interface TransferController

getMaxDepth

public long getMaxDepth()
Specified by:
getMaxDepth in interface TransferController

setTimeOut

public void setTimeOut(long timeout)
Description copied from interface: TransferController
Set socket timeout in milliseconds.

Specified by:
setTimeOut in interface TransferController

getTimeOut

public long getTimeOut()
Description copied from interface: TransferController
Returns underlying socket timeout.

Specified by:
getTimeOut in interface TransferController
Returns:
timeout in milliseconds.

getRetry

public int getRetry()
Specified by:
getRetry in interface TransferController

setRetry

public void setRetry(int c)
Specified by:
setRetry in interface TransferController

getRetryDelay

public int getRetryDelay()
Specified by:
getRetryDelay in interface TransferController

setRetryDelay

public void setRetryDelay(int delay)
Specified by:
setRetryDelay in interface TransferController

setWhiteList

public void setWhiteList(java.lang.String string)
Specified by:
setWhiteList in interface TransferController

getWhiteList

public java.lang.String getWhiteList()
Specified by:
getWhiteList in interface TransferController

setBlackList

public void setBlackList(java.lang.String string)
Specified by:
setBlackList in interface TransferController

getBlackList

public java.lang.String getBlackList()
Specified by:
getBlackList in interface TransferController

setZipIgnoreList

public void setZipIgnoreList(java.lang.String string)
Specified by:
setZipIgnoreList in interface TransferController

getZipIgnoreList

public java.lang.String getZipIgnoreList()
Specified by:
getZipIgnoreList in interface TransferController

setZipFolder

public void setZipFolder(java.lang.String string)
Specified by:
setZipFolder in interface TransferController

getZipFolder

public java.lang.String getZipFolder()
Specified by:
getZipFolder in interface TransferController

setTemplate

public void setTemplate(java.lang.String string)
Specified by:
setTemplate in interface TransferController

getTemplate

public java.lang.String getTemplate()
Specified by:
getTemplate in interface TransferController

setOverwrite

public void setOverwrite(java.lang.String string)
Specified by:
setOverwrite in interface TransferController

getOverwrite

public java.lang.String getOverwrite()
Specified by:
getOverwrite in interface TransferController

setResume

public void setResume(java.lang.String string)
Specified by:
setResume in interface TransferController

getResume

public java.lang.String getResume()
Specified by:
getResume in interface TransferController

getResumeOffset

public long getResumeOffset()
Specified by:
getResumeOffset in interface TransferController

setResumeOffset

protected void setResumeOffset(long offset)

setAuthentication

public void setAuthentication(java.lang.String authmode)
Specified by:
setAuthentication in interface TransferController

getAuthentication

public java.lang.String getAuthentication()
Specified by:
getAuthentication in interface TransferController

setTmpDir

public void setTmpDir(java.lang.String string)
Specified by:
setTmpDir in interface TransferController

setTarget

public void setTarget(java.util.List tar)
Specified by:
setTarget in interface TransferController

getParameters

public java.util.HashMap getParameters(java.lang.String section)
Specified by:
getParameters in interface TransferController

setParameters

public void setParameters(java.util.HashMap map)
Specified by:
setParameters in interface TransferController

getEncoding

public java.lang.String getEncoding()
Specified by:
getEncoding in interface TransferController

getParamFile

public java.lang.String getParamFile()
Specified by:
getParamFile in interface TransferController

setEncoding

public void setEncoding(java.lang.String string)
Specified by:
setEncoding in interface TransferController

setParamFile

public void setParamFile(java.lang.String string)
Specified by:
setParamFile in interface TransferController

getChunkSize

public long getChunkSize()
Specified by:
getChunkSize in interface TransferController

setChunkSize

public void setChunkSize(long l)
Specified by:
setChunkSize in interface TransferController

getRootDir

public java.lang.String getRootDir()
Returns:
Returns the rootdir.

setRootDir

public void setRootDir(java.lang.String rootdir)
Parameters:
rootdir - The rootdir to set.

getPassword

public java.lang.String getPassword()
Specified by:
getPassword in interface TransferController
Returns:
Returns the password.

setPassword

public void setPassword(java.lang.String password)
Specified by:
setPassword in interface TransferController
Parameters:
password - The password to set.

getUsername

public java.lang.String getUsername()
Specified by:
getUsername in interface TransferController
Returns:
Returns the username.

setUsername

public void setUsername(java.lang.String username)
Specified by:
setUsername in interface TransferController
Parameters:
username - The username to set.

getServerUrl

public java.net.URL getServerUrl()
Specified by:
getServerUrl in interface TransferController
Returns:
Returns the server url.

setServerUrl

public void setServerUrl(java.net.URL url)
Specified by:
setServerUrl in interface TransferController
Parameters:
url - The server url to set.

getPreProcessingFilterImpl

public java.lang.String getPreProcessingFilterImpl()
Description copied from interface: TransferController
Return the pre-processing filter implementation.

Specified by:
getPreProcessingFilterImpl in interface TransferController
Returns:

setPreProcessingFilterImpl

public void setPreProcessingFilterImpl(java.lang.String filterimpl)
Description copied from interface: TransferController
Set the pre-processing filter implementation

Specified by:
setPreProcessingFilterImpl in interface TransferController

getPreProcessingFilter

public TransferFilter getPreProcessingFilter()
Description copied from interface: TransferController
Return PreProcessing TransferFilter.

Specified by:
getPreProcessingFilter in interface TransferController
Returns:

setPreProcessingFilter

public void setPreProcessingFilter(TransferFilter filter)
Description copied from interface: TransferController
Set PreProcessing TransferFilter.

Specified by:
setPreProcessingFilter in interface TransferController

getFilter

public TransferFilter getFilter()
Description copied from interface: TransferController
Return default TransferFilter.

Specified by:
getFilter in interface TransferController
Returns:

getFilter

public TransferFilter getFilter(java.lang.String id)
Description copied from interface: TransferController
Get TransferFilter for a given identifier.

Specified by:
getFilter in interface TransferController
Returns:

setFilter

public void setFilter(TransferFilter filter)
Description copied from interface: TransferController
Set default TransferFilter.

Specified by:
setFilter in interface TransferController

setFilter

public void setFilter(TransferFilter filter,
                      java.lang.String id)
Description copied from interface: TransferController
Set TransferFilter for a given identifier.

Specified by:
setFilter in interface TransferController

getFilterImpl

public java.lang.String getFilterImpl()
Description copied from interface: TransferController
Return the default filter implementation.

Specified by:
getFilterImpl in interface TransferController
Returns:

getFilterImpl

public java.lang.String getFilterImpl(java.lang.String id)
Description copied from interface: TransferController
Return filter implementation for a given identifier.

Specified by:
getFilterImpl in interface TransferController
Returns:

setFilterImpl

public void setFilterImpl(java.lang.String filterimpl)
Description copied from interface: TransferController
Set the default filter implementation

Specified by:
setFilterImpl in interface TransferController

setFilterImpl

public void setFilterImpl(java.lang.String filterimpl,
                          java.lang.String id)
Description copied from interface: TransferController
Set Filter implementation for a given identifier

Specified by:
setFilterImpl in interface TransferController

getFilterIDs

public java.util.List getFilterIDs()
Description copied from interface: TransferController
Return all filter identifiers.

Specified by:
getFilterIDs in interface TransferController
Returns:

setFilterIDs

public void setFilterIDs(java.util.List ids)
Description copied from interface: TransferController
Set all filter identifiers.

Specified by:
setFilterIDs in interface TransferController

getFilterChain

public java.lang.String getFilterChain()
Specified by:
getFilterChain in interface TransferController

setFilterChain

public void setFilterChain(java.lang.String chain)
Specified by:
setFilterChain in interface TransferController

getRawConf

public Conf getRawConf()
Specified by:
getRawConf in interface TransferController
Returns:
Returns the rawconf.

setRawConf

public void setRawConf(Conf rawconf)
Specified by:
setRawConf in interface TransferController
Parameters:
rawconf - The rawconf to set.

getTransferFileFilter

public TransferFileFilter getTransferFileFilter()
Return transfer FileFilter instance.

Returns:

getExt

public java.lang.Object getExt()
Specified by:
getExt in interface TransferController
Returns:
Returns the ext.

setExt

public void setExt(java.lang.Object ext)
Specified by:
setExt in interface TransferController
Parameters:
ext - The ext to set.

isThreaded

public boolean isThreaded()
Specified by:
isThreaded in interface TransferController

setThreaded

public void setThreaded(boolean threaded)
Specified by:
setThreaded in interface TransferController

getStatus

public int getStatus()
Specified by:
getStatus in interface TransferController

setStatus

public void setStatus(int status)
Specified by:
setStatus in interface TransferController

getLong

public long getLong(java.lang.String str)
Parse String to long.

Parameters:
str -
Returns:
-1 if cannot parse.