jmaster.jumploader.jsface.api
Interface IJSUploader


public interface IJSUploader

IJSUploader


Field Summary
static int STATUS_READY
           
static int STATUS_UPLOADING
           
 
Method Summary
 java.lang.String addFile(java.lang.String path)
          add upload file
 java.lang.String addFile(java.lang.String path, java.lang.String status)
          add upload file with specifdied status
 java.lang.String addFile(java.lang.String path, java.lang.String status, java.lang.String error)
          add upload file with specifdied status and error message
 boolean canStartUpload()
          shows whether startUpload() action is applicable
 boolean canStopUpload()
          shows whether stopUpload() action is applicable
 void destroy()
          destroy
 IUploadFile[] getAllFiles()
          all files snapshot retrieval
 IAttributeSet getAttributeSet()
          attribute set retrieval
 IUploadFile getFile(java.lang.String index)
          upload file retrieval
 IUploadFile getFileByPath(java.lang.String path)
          upload file retrieval by path
 int getFileCount()
          upload file count retrieval
 int getFileCountByStatus(java.lang.String status)
          upload file count retrieval by status
 IUploadFile[] getFilesByStatus(java.lang.String status)
          upload files retrieval by status
 long getFilesLength()
          all files length retrieval
 IImageInfo getImageInfo(IUploadFile file)
          retrieve image info for specified file
 IListSelection getSelection()
          selection retrieval
 int getStatus()
          status retrieval
 ITransferProgress getTransferProgress()
          transfer progress retrieval, valid if uploading
 int indexOfFile(IUploadFile uf)
          index of file retrieval
 java.lang.String invoke(java.lang.Object target, java.lang.String methodName, java.lang.String args)
          invoke method against specified target.
 boolean isDownloading()
          shows whether has downloading files
 boolean isFileAdditionEnabled()
          shows whether file addition is enabled
 boolean isFileRemovalEnabled()
          shows whether file removal is enabled
 boolean isReady()
          ready status check
 boolean isUploadEnabled()
          upload enabled retrieval
 boolean isUploading()
          uploading status check
 void processDocument(IUploadFile file)
          process that document again
 IUploadFile processDocument(java.lang.String key, java.lang.String downloadLocation, java.lang.String uploadLocation, java.lang.String filename)
           
 IUploadFile processDocument(java.lang.String key, java.lang.String downloadLocation, java.lang.String uploadLocation, java.lang.String filename, java.lang.String options)
          process document - first download to the temporary file, open editor, then upload back.
 java.lang.String removeFile(IUploadFile uploadFile)
          remove upload file
 java.lang.String removeFileAt(java.lang.String index)
          remove upload file at specified index
 java.lang.String retryFileUpload(IUploadFile file)
          retry uplod of specified upload file
 java.lang.String retryFileUploadAt(java.lang.String index)
          retry uplod of upload file specified by index
 void setFileAdditionEnabled(boolean enabled)
          set file addition is enabled
 void setFileRemovalEnabled(boolean enabled)
          set file removal is enabled
 void setUploadEnabled(boolean enabled)
          upload enabled set
 java.lang.String startUpload()
          start upload
 java.lang.String stopFileUpload(IUploadFile file)
          stop uploading specified file
 java.lang.String stopFileUploadAt(java.lang.String index)
          stop uploading file specified by index
 java.lang.String stopUpload()
          stop upload
 

Field Detail

STATUS_READY

static final int STATUS_READY
See Also:
Constant Field Values

STATUS_UPLOADING

static final int STATUS_UPLOADING
See Also:
Constant Field Values
Method Detail

destroy

void destroy()
destroy


isFileAdditionEnabled

boolean isFileAdditionEnabled()
shows whether file addition is enabled


setFileAdditionEnabled

void setFileAdditionEnabled(boolean enabled)
set file addition is enabled


isFileRemovalEnabled

boolean isFileRemovalEnabled()
shows whether file removal is enabled


setFileRemovalEnabled

void setFileRemovalEnabled(boolean enabled)
set file removal is enabled


getFileCount

int getFileCount()
upload file count retrieval


getFile

IUploadFile getFile(java.lang.String index)
upload file retrieval


getAllFiles

IUploadFile[] getAllFiles()
all files snapshot retrieval


getFileByPath

IUploadFile getFileByPath(java.lang.String path)
upload file retrieval by path

Returns:
null if not found

getFileCountByStatus

int getFileCountByStatus(java.lang.String status)
upload file count retrieval by status

Parameters:
status - see IUploadFile constants

getFilesByStatus

IUploadFile[] getFilesByStatus(java.lang.String status)
upload files retrieval by status

Returns:
array of IUploadFile or null, if no such files

indexOfFile

int indexOfFile(IUploadFile uf)
index of file retrieval


getFilesLength

long getFilesLength()
all files length retrieval


addFile

java.lang.String addFile(java.lang.String path)
add upload file

Returns:
error message or null if ok

addFile

java.lang.String addFile(java.lang.String path,
                         java.lang.String status)
add upload file with specifdied status

Returns:
error message or null if ok

addFile

java.lang.String addFile(java.lang.String path,
                         java.lang.String status,
                         java.lang.String error)
add upload file with specifdied status and error message

Returns:
error message or null if ok

removeFile

java.lang.String removeFile(IUploadFile uploadFile)
remove upload file

Returns:
error message or null if ok

removeFileAt

java.lang.String removeFileAt(java.lang.String index)
remove upload file at specified index

Returns:
error message or null if ok

getStatus

int getStatus()
status retrieval


isReady

boolean isReady()
ready status check


isUploading

boolean isUploading()
uploading status check


startUpload

java.lang.String startUpload()
start upload

Returns:
error message or null if ok

stopUpload

java.lang.String stopUpload()
stop upload

Returns:
error message or null if ok

canStartUpload

boolean canStartUpload()
shows whether startUpload() action is applicable


canStopUpload

boolean canStopUpload()
shows whether stopUpload() action is applicable


stopFileUpload

java.lang.String stopFileUpload(IUploadFile file)
stop uploading specified file

Returns:
error message or null if ok

stopFileUploadAt

java.lang.String stopFileUploadAt(java.lang.String index)
stop uploading file specified by index

Returns:
error message or null if ok

retryFileUpload

java.lang.String retryFileUpload(IUploadFile file)
retry uplod of specified upload file

Returns:
error message or null if ok

retryFileUploadAt

java.lang.String retryFileUploadAt(java.lang.String index)
retry uplod of upload file specified by index

Returns:
error message or null if ok

getTransferProgress

ITransferProgress getTransferProgress()
transfer progress retrieval, valid if uploading


getAttributeSet

IAttributeSet getAttributeSet()
attribute set retrieval


getSelection

IListSelection getSelection()
selection retrieval


setUploadEnabled

void setUploadEnabled(boolean enabled)
upload enabled set


isUploadEnabled

boolean isUploadEnabled()
upload enabled retrieval


getImageInfo

IImageInfo getImageInfo(IUploadFile file)
                        throws jmaster.jumploader.model.api.exception.UploaderException
retrieve image info for specified file

Throws:
jmaster.jumploader.model.api.exception.UploaderException

invoke

java.lang.String invoke(java.lang.Object target,
                        java.lang.String methodName,
                        java.lang.String args)
invoke method against specified target. this method specially introduced as workaround for poor implementation of liveconnect on safari. particular problems are: - can't pass and retrieve particular types of arguments (i.e. long, arrays, ...) - null object passed as "null" string

Parameters:
target - a target to invoke method of
methodName - a method name
args - method arguments, if method has no arguments "noargs" string should be passed, multiple arguments should be separated by semicolon (;), null argument value should be specified by "null" string
Returns:
invocation result converted to string

processDocument

IUploadFile processDocument(java.lang.String key,
                            java.lang.String downloadLocation,
                            java.lang.String uploadLocation,
                            java.lang.String filename,
                            java.lang.String options)
                            throws jmaster.jumploader.model.api.exception.UploaderException
process document - first download to the temporary file, open editor, then upload back.

Throws:
jmaster.jumploader.model.api.exception.UploaderException

processDocument

IUploadFile processDocument(java.lang.String key,
                            java.lang.String downloadLocation,
                            java.lang.String uploadLocation,
                            java.lang.String filename)
                            throws jmaster.jumploader.model.api.exception.UploaderException
Throws:
jmaster.jumploader.model.api.exception.UploaderException

isDownloading

boolean isDownloading()
shows whether has downloading files


processDocument

void processDocument(IUploadFile file)
process that document again