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 Constructor Description SimpleFileStorageAppSoapMockStub(String soapServerUrl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendFileUpload(String sessionId, String fileStorageId)Simulate a call to endFileUploadlonggetSize(String sessionId, String fileStorageId)Simulate 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[]read(String sessionId, String fileStorageId, int offset, int length)Simulate a call to readbyte[]read2(String sessionId, String fileStorageId, long offset, int length)Simulate a call to read2StringstartFileUpload(String sessionId)Simulate a call to startFileUploadvoidwrite(String sessionId, String fileStorageId, byte[] data)Simulate a call to write-
Methods 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 Detail
-
SimpleFileStorageAppSoapMockStub
public SimpleFileStorageAppSoapMockStub(String soapServerUrl)
-
-
Method Detail
-
prepareStartFileUpload
public void prepareStartFileUpload(String sessionId, Object returnValue)
Prepare a simulated response to startFileUpload
-
startFileUpload
public String startFileUpload(String sessionId) throws RemoteException
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:
SimpleFileStorageAppSoap.startFileUpload(java.lang.String)
-
prepareWrite
public void prepareWrite(String sessionId, String fileStorageId, byte[] data)
Prepare a simulated response to write
-
prepareWrite
public void prepareWrite(String sessionId, String fileStorageId, byte[] data, Exception exception)
Prepare a simulated response to write
-
write
public void write(String sessionId, String fileStorageId, byte[] data) throws RemoteException
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:
SimpleFileStorageAppSoap.write(java.lang.String, java.lang.String, byte[])
-
prepareEndFileUpload
public void prepareEndFileUpload(String sessionId, String fileStorageId)
Prepare a simulated response to endFileUpload
-
prepareEndFileUpload
public void prepareEndFileUpload(String sessionId, String fileStorageId, Exception exception)
Prepare a simulated response to endFileUpload
-
endFileUpload
public void endFileUpload(String sessionId, String fileStorageId) throws RemoteException
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:
SimpleFileStorageAppSoap.endFileUpload(java.lang.String, java.lang.String)
-
prepareGetSize
public void prepareGetSize(String sessionId, String fileStorageId, Object returnValue)
Prepare a simulated response to getSize
-
getSize
public long getSize(String sessionId, String fileStorageId) throws RemoteException
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:
SimpleFileStorageAppSoap.getSize(java.lang.String, java.lang.String)
-
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:
SimpleFileStorageAppSoap.read(java.lang.String, java.lang.String, int, int)
-
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:
SimpleFileStorageAppSoap.read2(java.lang.String, java.lang.String, long, int)
-
-