|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IRemoteFile
This interface represents a remote file object on the File Repository Server.
This interface defines two categories of operations:
For the proper use of this interface, use the inherited methods IFile.commit() and IFile.abort() to do the following:
Invoke the IFile.commit() method for the operation to take place. Not using this method might
still run the operation, but will commit the operation to the File Repository Server. This could cause issues in high load environments.
Use the IFile.abort() method to abort the transaction. Not using this method will store the unfinished operations
in the File Repository Server, which could cause issues in high load environments.
Note: the operations defined are "two-phase", in other words, nothing will happen until the operation is successfully committed.
| Method Summary | |
|---|---|
boolean |
append(byte[] stream)
Appends the remote file using the supplied byte stream. |
boolean |
append(java.lang.String localFile)
Appends the remote file using the local file. |
boolean |
download(byte[] stream)
Downloads the remote file to the specified byte stream. |
boolean |
download(java.io.OutputStream stream)
Download the remote file to the specified output stream. |
boolean |
download(java.lang.String localFile)
Downloads the remote file to the specified local file. |
java.lang.String |
getFilePath()
Returns the remote file's path on the File Repository Server. |
java.io.InputStream |
getInputStream()
Return the InputStream for this remote file object. |
java.lang.String |
getLocalFilePath()
Returns the path of the local copy of the file. |
java.lang.String |
getRootPath()
Returns the root of the remote file's path. |
IStreamingDownloadFile |
getStreamingDownloadFile(int chunkSize)
Returns the interface for downloading a streaming file. |
IStreamingFile |
getStreamingFile()
Deprecated. Please use IRemoteFile.getStreamingDownloadFile(int) instead. |
IStreamingUploadFile |
getStreamingUploadFile()
Returns the interface for uploading a streaming file. |
IStreamingUploadFile |
getStreamingUploadFile(long size)
Returns the interface for uploading a streaming file. |
java.lang.String |
getURL()
Returns the URL of the remote file object. |
boolean |
overwrite(byte[] stream)
Overwrites the remote file using the supplied byte stream. |
boolean |
overwrite(java.lang.String localFile)
Overwrites the remote file using the local file. |
boolean |
overwrite(java.lang.String localFile,
boolean deleteLocalFile)
Overwrites the remote file using the local file. |
void |
setFallback(boolean fallback)
Enables or disables fallback when file is retrieved from the FRS. |
| Methods inherited from interface com.crystaldecisions.sdk.occa.infostore.IFile |
|---|
abort, commit, getActualName, getDestRelativePath, getName, getSize |
| Method Detail |
|---|
java.lang.String getURL()
Returns the URL of the remote file object.
String containing the URL of the file object.
java.lang.String getFilePath()
throws SDKException
Returns the remote file's path on the File Repository Server.
SDKException - This is thrown if the process is unsuccessful.
java.lang.String getRootPath()
throws SDKException
Returns the root of the remote file's path.
SDKException - This is thrown if the process is unsuccessful.
java.lang.String getLocalFilePath()
throws SDKException
Returns the path of the local copy of the file.
SDKException - This is thrown if the process is unsuccessful.
boolean download(java.lang.String localFile)
throws SDKException
Downloads the remote file to the specified local file.
Note: This method will throw an exception if the user does not have
the appropriate rights for the InfoObject associated with the file that is being downloaded.
If you need download right away, please call getStreamingDownloadFile instead. eg. in a webfarm case
This will acquire a lock from FileServer, so make sure IFiles commit or abort is called to release the lock.
localFile - The local file's path.
true if there is no pending transaction and
false if there is already a pending transaction.
SDKException - This is thrown if the download process is unsuccessful.
boolean download(byte[] stream)
throws SDKException
Downloads the remote file to the specified byte stream.
Note: This method will throw an exception if the user does not have the appropriate rights for the InfoObject associated with the file that is being downloaded. If you need download right away, please call getStreamingDownloadFile instead. eg. in a webfarm case
stream - The byte stream that the remote fill will be downloaded to.
true if there is no pending transaction and
false if there is already a pending transaction.
SDKException - This is thrown if the download process is unsuccessful.
boolean download(java.io.OutputStream stream)
throws SDKException
stream - The OutputStream to be downloaded to
SDKException
boolean overwrite(java.lang.String localFile)
throws SDKException
Overwrites the remote file using the local file.
This will acquire a lock from FileServer, so make sure IFiles commit or abort is called to release the lock.
localFile - The local file that will replace the remote file.
true if there is no pending transaction and
false if there is already a pending transaction.
SDKException - This is thrown if the overwrite procedure is unsuccessful.
boolean overwrite(java.lang.String localFile,
boolean deleteLocalFile)
throws SDKException
Overwrites the remote file using the local file.
This will acquire a lock from FileServer, so make sure IFiles commit or abort is called to release the lock.
localFile - The local file that will replace the remote file.deleteLocalFile - If true, the local file will be deleted after committed
true if there is no pending transaction and
false if there is already a pending transaction.
SDKException - This is thrown if the overwrite procedure is unsuccessful.
boolean overwrite(byte[] stream)
throws SDKException
Overwrites the remote file using the supplied byte stream.
This will acquire a lock from FileServer, so make sure IFiles commit or abort is called to release the lock.
stream - The byte stream that will be used to replace the remote file.
true if there is no pending transaction and
false if there is already a pending transaction.
SDKException - This is thrown if the overwrite procedure is unsuccessful.
IStreamingFile getStreamingFile()
throws SDKException
IRemoteFile.getStreamingDownloadFile(int) instead.
Returns the interface for downloading a streaming file.
IStreamingFile interface.
SDKException - This is thrown if the process is unsuccessful.
IStreamingDownloadFile getStreamingDownloadFile(int chunkSize)
throws SDKException
Returns the interface for downloading a streaming file.
chunkSize - The size of the chunk the streaming download will use(in bytes). 0 indicates use the server default one. This value can't be greater than 64K.
IStreamingFile interface.
SDKException - This is thrown if the process is unsuccessful.
IStreamingUploadFile getStreamingUploadFile()
throws SDKException
Returns the interface for uploading a streaming file.
IStreamingUploadFile interface.
SDKException - This is thrown if the process is unsuccessful.
IStreamingUploadFile getStreamingUploadFile(long size)
throws SDKException
Returns the interface for uploading a streaming file.
size - The size of the file that will be uploaded. This will be used to check disk availability on frs
If you don't know the size of the file, put in 0
IStreamingUploadFile interface.
SDKException - This is thrown if the process is unsuccessful.
java.io.InputStream getInputStream()
throws SDKException
SDKException
boolean append(java.lang.String localFile)
throws SDKException
Appends the remote file using the local file.
This will acquire a lock from FileServer, so make sure IFiles commit or abort is called to release the lock.
localFile - The local file that will replace the remote file.
true if there is no pending transaction and
false if there is already a pending transaction.
SDKException - This is thrown if the overwrite procedure is unsuccessful.
boolean append(byte[] stream)
throws SDKException
Appends the remote file using the supplied byte stream.
This will acquire a lock from FileServer, so make sure IFiles commit or abort is called to release the lock.
stream - The byte stream that will be used to replace the remote file.
true if there is no pending transaction and
false if there is already a pending transaction.
SDKException - This is thrown if the overwrite procedure is unsuccessful.void setFallback(boolean fallback)
fileFallback - true to enable fallback, false to disable.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||