com.collabnet.ce.soap60.webservices.filestorage

## 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 com.collabnet.ce.soap60.webservices.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 and Description
    `SimpleFileStorageAppSoapMockStub(String soapServerUrl)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `endFileUpload(String sessionId, String fileStorageId)` Simulate a call to endFileUpload
    `long` | `getSize(String sessionId, String fileStorageId)` Simulate a call to getSize
    `void` | `prepareEndFileUpload(String sessionId, String fileStorageId)` Prepare a simulated response to endFileUpload
    `void` | `prepareEndFileUpload(String sessionId, String fileStorageId, Exception exception)` Prepare a simulated response to endFileUpload
    `void` | `prepareGetSize(String sessionId, String fileStorageId, Object returnValue)` Prepare a simulated response to getSize
    `void` | `prepareRead(String sessionId, String fileStorageId, int offset, int length, Object returnValue)` Prepare a simulated response to read
    `void` | `prepareRead2(String sessionId, String fileStorageId, long offset, int length, Object returnValue)` Prepare a simulated response to read2
    `void` | `prepareStartFileUpload(String sessionId, Object returnValue)` Prepare a simulated response to startFileUpload
    `void` | `prepareWrite(String sessionId, String fileStorageId, byte[] data)` Prepare a simulated response to write
    `void` | `prepareWrite(String sessionId, String fileStorageId, byte[] data, Exception exception)` Prepare a simulated response to write
    `byte[]` | `read(String sessionId, String fileStorageId, int offset, int length)` Simulate a call to read
    `byte[]` | `read2(String sessionId, String fileStorageId, long offset, int length)` Simulate a call to read2
    `String` | `startFileUpload(String sessionId)` Simulate a call to startFileUpload
    `void` | `write(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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SimpleFileStorageAppSoapMockStub

          public SimpleFileStorageAppSoapMockStub(String soapServerUrl)

  - ### Method Detail

    - #### prepareStartFileUpload

          public void prepareStartFileUpload(String sessionId,
                                             Object returnValue)

      Prepare a simulated response to startFileUpload
      See Also:
        `SimpleFileStorageAppSoap.startFileUpload(java.lang.String)`

    - #### startFileUpload

          public String startFileUpload(String sessionId)
                                 throws RemoteException

      Simulate a call to startFileUpload
      Specified by:
        `startFileUpload` in interface `ISimpleFileStorageAppSoap`
      Parameters:
        `sessionId` - User session id.
      Returns:
        File storage id.
      Throws:
        `com.collabnet.ce.soap60.fault.InvalidSessionFault` - when the specified session id is invalid.
        `com.collabnet.ce.soap60.fault.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
      See Also:
        `SimpleFileStorageAppSoap.write(java.lang.String, java.lang.String, byte[])`

    - #### prepareWrite

          public void prepareWrite(String sessionId,
                                   String fileStorageId,
                                   byte[] data,
                                   Exception exception)

      Prepare a simulated response to write
      See Also:
        `SimpleFileStorageAppSoap.write(java.lang.String, java.lang.String, byte[])`

    - #### write

          public void write(String sessionId,
                            String fileStorageId,
                            byte[] data)
                     throws RemoteException

      Simulate a call to write
      Specified by:
        `write` in interface `ISimpleFileStorageAppSoap`
      Parameters:
        `sessionId` - User session id.
        `fileStorageId` - Id of temporary file storage for the file being uploaded.
        `data` - Data to be uploaded.
      Throws:
        `com.collabnet.ce.soap60.fault.InvalidSessionFault` - when the specified session id is invalid.
        `com.collabnet.ce.soap60.fault.SystemFault` - when an unexpected system level error is encountered.
        `com.collabnet.ce.soap60.fault.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
      See Also:
        `SimpleFileStorageAppSoap.endFileUpload(java.lang.String, java.lang.String)`

    - #### prepareEndFileUpload

          public void prepareEndFileUpload(String sessionId,
                                           String fileStorageId,
                                           Exception exception)

      Prepare a simulated response to endFileUpload
      See Also:
        `SimpleFileStorageAppSoap.endFileUpload(java.lang.String, java.lang.String)`

    - #### endFileUpload

          public void endFileUpload(String sessionId,
                                    String fileStorageId)
                             throws RemoteException

      Simulate a call to endFileUpload
      Specified by:
        `endFileUpload` in interface `ISimpleFileStorageAppSoap`
      Parameters:
        `sessionId` - User session id.
        `fileStorageId` - Id of temporary file storage for the file to finish uploading.
      Throws:
        `com.collabnet.ce.soap60.fault.InvalidSessionFault` - when the specified session id is invalid.
        `com.collabnet.ce.soap60.fault.SystemFault` - when an unexpected system level error is encountered.
        `com.collabnet.ce.soap60.fault.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
      See Also:
        `SimpleFileStorageAppSoap.getSize(java.lang.String, java.lang.String)`

    - #### getSize

          public long getSize(String sessionId,
                              String fileStorageId)
                       throws RemoteException

      Simulate a call to getSize
      Specified by:
        `getSize` in interface `ISimpleFileStorageAppSoap`
      Parameters:
        `sessionId` - User session id.
        `fileStorageId` - Id of temporary file storage.
      Returns:
        File size in number of bytes.
      Throws:
        `com.collabnet.ce.soap60.fault.InvalidSessionFault` - when the specified session id is invalid.
        `com.collabnet.ce.soap60.fault.SystemFault` - when an unexpected system level error is encountered.
        `com.collabnet.ce.soap60.fault.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
      See Also:
        `SimpleFileStorageAppSoap.read(java.lang.String, java.lang.String, int, int)`

    - #### read

          public byte[] read(String sessionId,
                             String fileStorageId,
                             int offset,
                             int length)
                      throws RemoteException

      Simulate a call to read
      Specified by:
        `read` in interface `ISimpleFileStorageAppSoap`
      Parameters:
        `sessionId` - User session id.
        `fileStorageId` - Id of temporary file storage returned by DocmentApp.getDocumentFileId or FrsApp.getFrsFileId
        `offset` - 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:
        `com.collabnet.ce.soap60.fault.InvalidSessionFault` - when the specified session id is invalid.
        `com.collabnet.ce.soap60.fault.SystemFault` - when an unexpected system level error is encountered.
        `com.collabnet.ce.soap60.fault.PermissionDeniedFault` - when the user doesn't have permission to view the file
        `com.collabnet.ce.soap60.fault.IllegalArgumentFault` - 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
      See Also:
        `SimpleFileStorageAppSoap.read2(java.lang.String, java.lang.String, long, int)`

    - #### read2

          public byte[] read2(String sessionId,
                              String fileStorageId,
                              long offset,
                              int length)
                       throws RemoteException

      Simulate a call to read2
      Specified by:
        `read2` in interface `ISimpleFileStorageAppSoap`
      Parameters:
        `sessionId` - User session id.
        `fileStorageId` - Id of temporary file storage returned by DocmentApp.getDocumentFileId or FrsApp.getFrsFileId
        `offset` - 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:
        `com.collabnet.ce.soap60.fault.InvalidSessionFault` - when the specified session id is invalid.
        `com.collabnet.ce.soap60.fault.SystemFault` - when an unexpected system level error is encountered.
        `com.collabnet.ce.soap60.fault.PermissionDeniedFault` - when the user doesn't have permission to view the file
        `com.collabnet.ce.soap60.fault.IllegalArgumentFault` - when the specified fileStorageId is invalid.
        `RemoteException`
      See Also:
        `SimpleFileStorageAppSoap.read2(java.lang.String, java.lang.String, long, int)`

Copyright © 2020 CollabNet. All rights reserved.