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_WILDCARD
Fields inherited from class com.collabnet.ce.soap60.webservices.ClientSoapStub
DEFAULT_CLIENT_TIME_OUT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
endFileUpload
(String sessionId, String fileStorageId) Simulate a call to endFileUploadlong
Simulate a call to getSizevoid
prepareEndFileUpload
(String sessionId, String fileStorageId) Prepare a simulated response to endFileUploadvoid
prepareEndFileUpload
(String sessionId, String fileStorageId, Exception exception) Prepare a simulated response to endFileUploadvoid
prepareGetSize
(String sessionId, String fileStorageId, Object returnValue) Prepare a simulated response to getSizevoid
prepareRead
(String sessionId, String fileStorageId, int offset, int length, Object returnValue) Prepare a simulated response to readvoid
prepareRead2
(String sessionId, String fileStorageId, long offset, int length, Object returnValue) Prepare a simulated response to read2void
prepareStartFileUpload
(String sessionId, Object returnValue) Prepare a simulated response to startFileUploadvoid
prepareWrite
(String sessionId, String fileStorageId, byte[] data) Prepare a simulated response to writevoid
prepareWrite
(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 startFileUploadvoid
Simulate a call to writeMethods inherited from class com.collabnet.ce.soap60.webservices.ClientSoapMockStub
addSimulatedResult, addSimulatedResult, addSimulatedResult, getCallCount, getCallParameters, getUnusedCalls, simulateCall
Methods 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:
startFileUpload
in 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:
write
in 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:
endFileUpload
in 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:
getSize
in 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:
read
in 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:
read2
in 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:
-