Ontimize Document Management 0.035EN

com.ontimize.dms.filetransfer.client
Class FileTransferClient

java.lang.Object
  extended by com.ontimize.dms.filetransfer.client.FileTransferClient
All Implemented Interfaces:
IFileTransferClient, TransferClientTags, IUpdateDetected, TransferListener

public class FileTransferClient
extends java.lang.Object
implements TransferClientTags, IFileTransferClient, IUpdateDetected, TransferListener


Field Summary
protected  java.lang.String baseRepository
           
static java.lang.String CHANGE_DETECTED_WINDOW_CLASS_KEY
           
protected static java.lang.String changeDetectedClass
           
protected  java.util.List cleanList
           
protected  CopyContextManager copyManager
           
static java.lang.String DEFAULT_CHANGE_DETECTED_WINDOW_CLASS
           
protected static LocalCopyCompleteTransferDialog dialog
           
protected  TransferTableModel downloadModel
           
protected  ExportDialog export
           
protected  javax.swing.JFrame frame
           
protected  IChangeDetected last
           
protected  java.util.List listeners
           
protected  IRemoteOperationServer operation
           
protected  java.lang.String operationObjectName
           
protected  java.util.List saveDialogColumns
           
protected  boolean saveDialogDeleteEnabled
           
protected  java.lang.String saveDialogValues
           
protected  SaveModel saveModel
           
protected  java.lang.Integer sessionId
           
protected  boolean showExportDialog
           
protected  java.lang.String transferObjectName
           
protected  IODMSTransform transform
           
protected  java.lang.String transformClazz
           
protected  TransferTableModel uploadModel
           
 
Fields inherited from interface com.ontimize.dms.filetransfer.client.TransferClientTags
DIRECTORY_KEY, LOCK_ON_UPLOAD_KEY, READ_ONLY_DIRECTORY_KEY, REMOTE_OPERATION_OBJECT_NAME_KEY, REMOTE_TRANSFER_OBJECT_NAME_KEY, SAVE_DIALOG_COLUMNS_KEY, SAVE_DIALOG_DELETE_KEY, SAVE_DIALOG_VALUES_KEY, SHOW_EXPORT_DIALOG_KEY
 
Fields inherited from interface com.ontimize.dms.filetransfer.client.IFileTransferClient
ACTION, CONFIG_DIRECTORY, CONFIG_FILE, KEYS, M_FILE_IS_BEING_PROCESSED, M_FILE_IS_BEING_USED_REVISE_TRANSFER, M_SHOW_LOCAL_FILE_DOWNLOAD_AND_SHOW_REMOTE, M_TRYING_TO_UPLOAD_AN_INEXISTENT_FILE, PARENT_FRAME, SELECTED_FILES
 
Constructor Summary
FileTransferClient(java.util.Map params)
           
 
Method Summary
 void addStatusListener(TransferStatusListener listener)
           
 void clean(ContextValues context, EntityResult er)
           
protected  void clean(Document[] documents)
           
protected  void clearSavePopups()
           
 int doAction(int action, Document[] documents, java.util.Map params)
           
 int doAction(int action, Document[] documents, java.util.Map params, boolean background)
           
 int doAdd(ContextValues context, java.io.File[] files)
          Adds the given file list to Document Manager.
 int doAdd(java.util.Map params, java.io.File[] files)
          Calls to IFileTransferClient.doAdd(ContextValues, File[])
protected  int doCatch(LErrorException e)
           
 boolean exists(Document document)
           
static java.util.Hashtable getConfiguration()
           
 java.io.File getFile(Document document)
           
static FileTransferClient getFileTransferClient()
           
static java.util.concurrent.Executor getOperationExecutor()
           
 java.lang.String getOperationObjectName()
           
 SaveDialog getSaveDialog(java.awt.Window parent)
           
 TransferStatus getStatus()
           
 java.lang.String getTransferObjectName()
           
static TransferStatusPanel getTransferStatusPanel()
           
 IODMSTransform getTransform()
           
 java.lang.String getTransformClassName()
           
static void initFileTransferClient(java.util.Hashtable h)
           
static void setConfiguration(java.util.Hashtable configuation)
           
 void showTransferWindow()
           
 void statusChanged(TransferStatus status)
           
 void updateDetected(Document document)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CHANGE_DETECTED_WINDOW_CLASS

public static final java.lang.String DEFAULT_CHANGE_DETECTED_WINDOW_CLASS
See Also:
Constant Field Values

CHANGE_DETECTED_WINDOW_CLASS_KEY

public static final java.lang.String CHANGE_DETECTED_WINDOW_CLASS_KEY
See Also:
Constant Field Values

changeDetectedClass

protected static java.lang.String changeDetectedClass

listeners

protected java.util.List listeners

last

protected IChangeDetected last

saveModel

protected SaveModel saveModel

export

protected ExportDialog export

frame

protected javax.swing.JFrame frame

baseRepository

protected java.lang.String baseRepository

showExportDialog

protected boolean showExportDialog

saveDialogColumns

protected java.util.List saveDialogColumns

saveDialogDeleteEnabled

protected boolean saveDialogDeleteEnabled

saveDialogValues

protected java.lang.String saveDialogValues

cleanList

protected java.util.List cleanList

sessionId

protected java.lang.Integer sessionId

operation

protected IRemoteOperationServer operation

transferObjectName

protected java.lang.String transferObjectName

operationObjectName

protected java.lang.String operationObjectName

transformClazz

protected java.lang.String transformClazz

transform

protected IODMSTransform transform

downloadModel

protected TransferTableModel downloadModel

uploadModel

protected TransferTableModel uploadModel

copyManager

protected CopyContextManager copyManager

dialog

protected static LocalCopyCompleteTransferDialog dialog
Constructor Detail

FileTransferClient

public FileTransferClient(java.util.Map params)
                   throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException
Method Detail

getFileTransferClient

public static FileTransferClient getFileTransferClient()

getOperationExecutor

public static java.util.concurrent.Executor getOperationExecutor()

getTransferStatusPanel

public static TransferStatusPanel getTransferStatusPanel()

setConfiguration

public static void setConfiguration(java.util.Hashtable configuation)

getConfiguration

public static java.util.Hashtable getConfiguration()

initFileTransferClient

public static void initFileTransferClient(java.util.Hashtable h)
                                   throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

clearSavePopups

protected void clearSavePopups()

getStatus

public TransferStatus getStatus()
Specified by:
getStatus in interface IFileTransferClient

getTransferObjectName

public java.lang.String getTransferObjectName()
Specified by:
getTransferObjectName in interface IFileTransferClient

getOperationObjectName

public java.lang.String getOperationObjectName()
Specified by:
getOperationObjectName in interface IFileTransferClient

getTransform

public IODMSTransform getTransform()

getTransformClassName

public java.lang.String getTransformClassName()
Specified by:
getTransformClassName in interface IFileTransferClient

getSaveDialog

public SaveDialog getSaveDialog(java.awt.Window parent)
Specified by:
getSaveDialog in interface IFileTransferClient

doCatch

protected int doCatch(LErrorException e)

doAdd

public int doAdd(java.util.Map params,
                 java.io.File[] files)
          throws ContextException,
                 java.lang.Exception
Description copied from interface: IFileTransferClient

Calls to IFileTransferClient.doAdd(ContextValues, File[])

Specified by:
doAdd in interface IFileTransferClient
Throws:
ContextException
java.lang.Exception

doAdd

public int doAdd(ContextValues context,
                 java.io.File[] files)
          throws ContextException,
                 java.lang.Exception
Description copied from interface: IFileTransferClient

Adds the given file list to Document Manager.

The files are copied to local cache and then uploaded to remote repository.

Also allows to insert if there are files with the same name if the target path. Possible options:

  • New version.
  • Overwrite
  • Generate a new name.

    Specified by:
    doAdd in interface IFileTransferClient
    Parameters:
    context - Current context.
    files - List of files to insert.
    Returns:
    Codes.OK if files are inserted successfully.
    Throws:
    ContextException - if context is null.
    java.lang.Exception - if a undefined error ocurrs.

  • doAction

    public int doAction(int action,
                        Document[] documents,
                        java.util.Map params)
    Specified by:
    doAction in interface IFileTransferClient

    doAction

    public int doAction(int action,
                        Document[] documents,
                        java.util.Map params,
                        boolean background)

    getFile

    public java.io.File getFile(Document document)
    Specified by:
    getFile in interface IFileTransferClient

    exists

    public boolean exists(Document document)
    Specified by:
    exists in interface IFileTransferClient

    showTransferWindow

    public void showTransferWindow()

    updateDetected

    public void updateDetected(Document document)
    Specified by:
    updateDetected in interface IUpdateDetected

    addStatusListener

    public void addStatusListener(TransferStatusListener listener)

    statusChanged

    public void statusChanged(TransferStatus status)
    Specified by:
    statusChanged in interface TransferListener

    clean

    public void clean(ContextValues context,
                      EntityResult er)
    Specified by:
    clean in interface IFileTransferClient

    clean

    protected void clean(Document[] documents)

    Ontimize Document Management