com.ontimize.dms.warehouse.local
Class WarehouseClient
java.lang.Object
com.ontimize.dms.warehouse.local.WarehouseClient
- All Implemented Interfaces:
- IWharehouse, CopyServiceStatusListener, IWarehouseClient, TransferListener
public class WarehouseClient
- extends java.lang.Object
- implements IWarehouseClient, CopyServiceStatusListener, TransferListener
|
Method Summary |
void |
addTransferListener(TransferListener listener)
|
void |
addWharehouseActionListener(IWharehouseAction iwha)
|
void |
clearWharehouseActionListener()
|
int |
createAttachment(int action,
Document document)
|
int |
doAction(int action,
Document[] documents,
java.util.Map params)
|
void |
finishUpload(Document document,
int action,
boolean ok,
long localTime,
long serverTime,
java.io.File versionFile)
|
protected void |
fireWharehoseActionListener(int actionResult,
Document doc)
|
protected java.lang.String |
getBasePath()
|
java.io.File |
getDocumentFile(Document document)
|
TransferThread |
getDownloadThread()
|
protected java.lang.String |
getReadPath()
|
TransferStatus |
getStatus()
|
protected java.lang.String |
getTempPath()
|
TransferThread |
getUploadThread()
|
boolean |
hasLockOnUpload()
|
int |
open(int action,
Document document)
|
boolean |
processChange(CopyStatus status)
Allows to process the copy status change events. |
void |
removeWharehouseActionListener(IWharehouseAction iwha)
|
void |
resumeCancelledUploads()
|
void |
setCopyService(ICopyService cs)
|
void |
statusChanged(CopyStatus status)
|
void |
statusChanged(TransferStatus status)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
basePath
protected java.lang.String basePath
tempPath
protected java.lang.String tempPath
readPath
protected java.lang.String readPath
lockOnUpload
protected boolean lockOnUpload
transferListener
protected java.util.List transferListener
TAG_READ_CHOOSER_TITLE
protected static final java.lang.String TAG_READ_CHOOSER_TITLE
- See Also:
- Constant Field Values
TAG_READ_CHOOSER_MSG
protected static final java.lang.String TAG_READ_CHOOSER_MSG
- See Also:
- Constant Field Values
TAG_READ_SOURCE_NULL_TITLE
protected static final java.lang.String TAG_READ_SOURCE_NULL_TITLE
- See Also:
- Constant Field Values
TAG_READ_SOURCE_NULL_MSG
protected static final java.lang.String TAG_READ_SOURCE_NULL_MSG
- See Also:
- Constant Field Values
TAG_READ_SOURCE_COPY_TITLE
protected static final java.lang.String TAG_READ_SOURCE_COPY_TITLE
- See Also:
- Constant Field Values
TAG_READ_SOURCE_COPY_MSG
protected static final java.lang.String TAG_READ_SOURCE_COPY_MSG
- See Also:
- Constant Field Values
TAG_READ_TARGET_EXISTS_TITLE
protected static final java.lang.String TAG_READ_TARGET_EXISTS_TITLE
- See Also:
- Constant Field Values
TAG_READ_TARGET_EXISTS_MSG
protected static final java.lang.String TAG_READ_TARGET_EXISTS_MSG
- See Also:
- Constant Field Values
TAG_READ_TARGET_DELETED_FAIL
protected static final java.lang.String TAG_READ_TARGET_DELETED_FAIL
- See Also:
- Constant Field Values
TAG_EXPORT_DONE_TITLE
protected static final java.lang.String TAG_EXPORT_DONE_TITLE
- See Also:
- Constant Field Values
TAG_EXPORT_DONE_MSG
protected static final java.lang.String TAG_EXPORT_DONE_MSG
- See Also:
- Constant Field Values
WarehouseClient
public WarehouseClient(java.util.Map params)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
getDownloadThread
public TransferThread getDownloadThread()
- Specified by:
getDownloadThread in interface IWarehouseClient
getUploadThread
public TransferThread getUploadThread()
- Specified by:
getUploadThread in interface IWarehouseClient
getBasePath
protected java.lang.String getBasePath()
getTempPath
protected java.lang.String getTempPath()
getReadPath
protected java.lang.String getReadPath()
hasLockOnUpload
public boolean hasLockOnUpload()
- Specified by:
hasLockOnUpload in interface IWarehouseClient
doAction
public int doAction(int action,
Document[] documents,
java.util.Map params)
- Specified by:
doAction in interface IWarehouseClient
getDocumentFile
public java.io.File getDocumentFile(Document document)
createAttachment
public int createAttachment(int action,
Document document)
- Specified by:
createAttachment in interface IWarehouseClient
open
public int open(int action,
Document document)
- Specified by:
open in interface IWarehouseClient
processChange
public boolean processChange(CopyStatus status)
- Description copied from interface:
CopyServiceStatusListener
Allows to process the copy status change events.
- Specified by:
processChange in interface CopyServiceStatusListener
- Parameters:
status - Current change copy status event.
- Returns:
- True if
CopyServiceStatusListener.statusChanged(CopyStatus) can process the event.
statusChanged
public void statusChanged(CopyStatus status)
- Specified by:
statusChanged in interface CopyServiceStatusListener
resumeCancelledUploads
public void resumeCancelledUploads()
- Specified by:
resumeCancelledUploads in interface IWarehouseClient
finishUpload
public void finishUpload(Document document,
int action,
boolean ok,
long localTime,
long serverTime,
java.io.File versionFile)
addWharehouseActionListener
public void addWharehouseActionListener(IWharehouseAction iwha)
- Specified by:
addWharehouseActionListener in interface IWarehouseClient
clearWharehouseActionListener
public void clearWharehouseActionListener()
- Specified by:
clearWharehouseActionListener in interface IWarehouseClient
removeWharehouseActionListener
public void removeWharehouseActionListener(IWharehouseAction iwha)
- Specified by:
removeWharehouseActionListener in interface IWarehouseClient
fireWharehoseActionListener
protected void fireWharehoseActionListener(int actionResult,
Document doc)
setCopyService
public void setCopyService(ICopyService cs)
addTransferListener
public void addTransferListener(TransferListener listener)
getStatus
public TransferStatus getStatus()
- Specified by:
getStatus in interface IWarehouseClient
statusChanged
public void statusChanged(TransferStatus status)
- Specified by:
statusChanged in interface TransferListener