Class SimpleFileStorageAppSoapStub
- java.lang.Object
-
- com.collabnet.ce.soap60.webservices.ClientSoapStub
-
- com.collabnet.ce.soap60.webservices.filestorage.SimpleFileStorageAppSoapStub
-
- All Implemented Interfaces:
ISimpleFileStorageAppSoap
public class SimpleFileStorageAppSoapStub extends ClientSoapStub implements ISimpleFileStorageAppSoap
-
-
Field Summary
-
Fields inherited from class com.collabnet.ce.soap60.webservices.ClientSoapStub
DEFAULT_CLIENT_TIME_OUT
-
-
Constructor Summary
Constructors Constructor Description SimpleFileStorageAppSoapStub(String soapServerUrl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendFileUpload(String sessionId, String fileStorageId)Closes and saves uploaded file.longgetSize(String sessionId, String fileStorageId)Returns size of the specified temporary storage file in bytes.byte[]read(String sessionId, String fileStorageId, int offset, int length)Reads from file a specified a number of bytes from the offset specified.byte[]read2(String sessionId, String fileStorageId, long offset, int length)Reads from file a specified a number of bytes from the offset specified.StringstartFileUpload(String sessionId)Opens a new file descriptor for uploading and returns the temporary storage id.voidwrite(String sessionId, String fileStorageId, byte[] data)Appends data to the file being uploaded.-
Methods inherited from class com.collabnet.ce.soap60.webservices.ClientSoapStub
getServiceCall, getSoapServer, getTimeout, setTimeout, soapParam
-
-
-
-
Constructor Detail
-
SimpleFileStorageAppSoapStub
public SimpleFileStorageAppSoapStub(String soapServerUrl)
-
-
Method Detail
-
startFileUpload
public String startFileUpload(String sessionId) throws RemoteException
Description copied from interface:ISimpleFileStorageAppSoapOpens a new file descriptor for uploading and returns the temporary storage id.- Specified by:
startFileUploadin interfaceISimpleFileStorageAppSoap- Parameters:
sessionId- User session id.- Returns:
- File storage id.
- Throws:
InvalidSessionFault- when the specified session id is invalid.SystemFault- when an unexpected system level error is encountered.RemoteException
-
write
public void write(String sessionId, String fileStorageId, byte[] data) throws RemoteException
Description copied from interface:ISimpleFileStorageAppSoapAppends data to the file being uploaded.- Specified by:
writein interfaceISimpleFileStorageAppSoap- Parameters:
sessionId- User session id.fileStorageId- Id of temporary file storage for the file being uploaded.data- Data to be uploaded.- Throws:
InvalidSessionFault- when the specified session id is invalid.SystemFault- when an unexpected system level error is encountered.IllegalArgumentFault- when the specified fileStorageId is invalid.RemoteException
-
endFileUpload
public void endFileUpload(String sessionId, String fileStorageId) throws RemoteException
Description copied from interface:ISimpleFileStorageAppSoapCloses and saves uploaded file.- Specified by:
endFileUploadin interfaceISimpleFileStorageAppSoap- Parameters:
sessionId- User session id.fileStorageId- Id of temporary file storage for the file to finish uploading.- Throws:
InvalidSessionFault- when the specified session id is invalid.SystemFault- when an unexpected system level error is encountered.IllegalArgumentFault- when the specified fileStorageId is invalid.RemoteException
-
getSize
public long getSize(String sessionId, String fileStorageId) throws RemoteException
Description copied from interface:ISimpleFileStorageAppSoapReturns size of the specified temporary storage file in bytes.- Specified by:
getSizein interfaceISimpleFileStorageAppSoap- Parameters:
sessionId- User session id.fileStorageId- Id of temporary file storage.- Returns:
- File size in number of bytes.
- Throws:
InvalidSessionFault- when the specified session id is invalid.SystemFault- when an unexpected system level error is encountered.IllegalArgumentFault- when the specified fileStorageId is invalid.RemoteException
-
read
public byte[] read(String sessionId, String fileStorageId, int offset, int length) throws RemoteException
Description copied from interface:ISimpleFileStorageAppSoapReads from file a specified a number of bytes from the offset specified.- Specified by:
readin interfaceISimpleFileStorageAppSoap- Parameters:
sessionId- User session id.fileStorageId- Id of temporary file storageoffset- Offset within file from where to read.length- Number of bytes to read.- Returns:
- Data read from the file as a byte array. Returns null on file end.
- Throws:
InvalidSessionFault- when the specified session id is invalid.SystemFault- when an unexpected system level error is encountered.PermissionDeniedFault- when the user doesn't have permission to view the fileIllegalArgumentFault- when the specified fileStorageId is invalid.RemoteException
-
read2
public byte[] read2(String sessionId, String fileStorageId, long offset, int length) throws RemoteException
Description copied from interface:ISimpleFileStorageAppSoapReads from file a specified a number of bytes from the offset specified.- Specified by:
read2in interfaceISimpleFileStorageAppSoap- Parameters:
sessionId- User session id.fileStorageId- Id of temporary file storageoffset- Offset within file from where to read (long).length- Number of bytes to read.- Returns:
- Data read from the file as a byte array. Returns null on file end.
- Throws:
InvalidSessionFault- when the specified session id is invalid.SystemFault- when an unexpected system level error is encountered.PermissionDeniedFault- when the user doesn't have permission to view the fileIllegalArgumentFault- when the specified fileStorageId is invalid.RemoteException
-
-