Class SimpleFileStorageAppSoapMockStub
java.lang.Object
com.collabnet.ce.soap60.webservices.ClientSoapStub
com.collabnet.ce.soap60.webservices.ClientSoapMockStub
com.collabnet.ce.soap60.webservices.filestorage.SimpleFileStorageAppSoapMockStub
- All Implemented Interfaces:
ISimpleFileStorageAppSoap
public class SimpleFileStorageAppSoapMockStub
extends ClientSoapMockStub
implements ISimpleFileStorageAppSoap
-
Field Summary
Fields inherited from class com.collabnet.ce.soap60.webservices.ClientSoapMockStub
DATE_WILDCARD, GUIDKEY_WILDCARD, INTEGER_WILDCARD, LONG_WILDCARD, STRING_WILDCARDFields inherited from class com.collabnet.ce.soap60.webservices.ClientSoapStub
DEFAULT_CLIENT_TIME_OUT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidendFileUpload(String sessionId, String fileStorageId) Simulate a call to endFileUploadlongSimulate a call to getSizevoidprepareEndFileUpload(String sessionId, String fileStorageId) Prepare a simulated response to endFileUploadvoidprepareEndFileUpload(String sessionId, String fileStorageId, Exception exception) Prepare a simulated response to endFileUploadvoidprepareGetSize(String sessionId, String fileStorageId, Object returnValue) Prepare a simulated response to getSizevoidprepareRead(String sessionId, String fileStorageId, int offset, int length, Object returnValue) Prepare a simulated response to readvoidprepareRead2(String sessionId, String fileStorageId, long offset, int length, Object returnValue) Prepare a simulated response to read2voidprepareStartFileUpload(String sessionId, Object returnValue) Prepare a simulated response to startFileUploadvoidprepareWrite(String sessionId, String fileStorageId, byte[] data) Prepare a simulated response to writevoidprepareWrite(String sessionId, String fileStorageId, byte[] data, Exception exception) Prepare a simulated response to writebyte[]Simulate a call to readbyte[]Simulate a call to read2startFileUpload(String sessionId) Simulate a call to startFileUploadvoidSimulate a call to writeMethods inherited from class com.collabnet.ce.soap60.webservices.ClientSoapMockStub
addSimulatedResult, addSimulatedResult, addSimulatedResult, getCallCount, getCallParameters, getUnusedCalls, simulateCallMethods inherited from class com.collabnet.ce.soap60.webservices.ClientSoapStub
getServiceCall, getSoapServer, getTimeout, setTimeout, soapParam
-
Constructor Details
-
SimpleFileStorageAppSoapMockStub
-
-
Method Details
-
prepareStartFileUpload
Prepare a simulated response to startFileUpload -
startFileUpload
Simulate a call to startFileUpload- 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- See Also:
-
prepareWrite
Prepare a simulated response to write -
prepareWrite
Prepare a simulated response to write -
write
Simulate a call to write- 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- See Also:
-
prepareEndFileUpload
Prepare a simulated response to endFileUpload -
prepareEndFileUpload
Prepare a simulated response to endFileUpload -
endFileUpload
Simulate a call to endFileUpload- 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- See Also:
-
prepareGetSize
Prepare a simulated response to getSize -
getSize
Simulate a call to getSize- 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- See Also:
-
prepareRead
public void prepareRead(String sessionId, String fileStorageId, int offset, int length, Object returnValue) Prepare a simulated response to read -
read
public byte[] read(String sessionId, String fileStorageId, int offset, int length) throws RemoteException Simulate a call to read- 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- See Also:
-
prepareRead2
public void prepareRead2(String sessionId, String fileStorageId, long offset, int length, Object returnValue) Prepare a simulated response to read2 -
read2
public byte[] read2(String sessionId, String fileStorageId, long offset, int length) throws RemoteException Simulate a call to read2- 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- See Also:
-