com.collabnet.ce.soap60.webservices.filestorage

## Class FileStorageAppSoapMockStub

- java.lang.Object
- - com.collabnet.ce.soap60.webservices.ClientSoapStub
  - - com.collabnet.ce.soap60.webservices.ClientSoapMockStub
    - - com.collabnet.ce.soap60.webservices.filestorage.FileStorageAppSoapMockStub

- All Implemented Interfaces:
    IFileStorageAppSoap

      public class FileStorageAppSoapMockStub
      extends com.collabnet.ce.soap60.webservices.ClientSoapMockStub
      implements IFileStorageAppSoap

- - ### 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
    `FileStorageAppSoapMockStub(String soapServerUrl)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DataHandler` | `downloadFile(String sessionId, String fileStorageId)` Simulate a call to downloadFile
    `DataHandler` | `downloadFileDirect(String sessionId, String containerId, String rawFileId)` Simulate a call to downloadFileDirect
    `void` | `prepareDownloadFile(String sessionId, String fileStorageId, Object returnValue)` Prepare a simulated response to downloadFile
    `void` | `prepareDownloadFileDirect(String sessionId, String containerId, String rawFileId, Object returnValue)` Prepare a simulated response to downloadFileDirect
    `void` | `prepareUploadFile(String sessionId, DataHandler file, Object returnValue)` Prepare a simulated response to uploadFile
    `String` | `uploadFile(String sessionId, DataHandler file)` Simulate a call to uploadFile

    - ### 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

    - #### FileStorageAppSoapMockStub

          public FileStorageAppSoapMockStub(String soapServerUrl)

  - ### Method Detail

    - #### prepareUploadFile

          public void prepareUploadFile(String sessionId,
                                        DataHandler file,
                                        Object returnValue)

      Prepare a simulated response to uploadFile
      See Also:
        `FileStorageAppSoap.uploadFile(java.lang.String, javax.activation.DataHandler)`

    - #### uploadFile

          public String uploadFile(String sessionId,
                                   DataHandler file)
                            throws RemoteException

      Simulate a call to uploadFile
      Specified by:
        `uploadFile` in interface `IFileStorageAppSoap`
      Parameters:
        `sessionId` - User session id.
        `file` - SOAP file attachment.
      Returns:
        File object id.
      Throws:
        `com.collabnet.ce.soap60.fault.InvalidSessionFault` - when session is invalid (or not active).
        `com.collabnet.ce.soap60.fault.SystemFault` - when a system level error occurs.
        `RemoteException`
      See Also:
        `FileStorageAppSoap.uploadFile(java.lang.String, javax.activation.DataHandler)`

    - #### prepareDownloadFile

          public void prepareDownloadFile(String sessionId,
                                          String fileStorageId,
                                          Object returnValue)

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

    - #### downloadFile

          public DataHandler downloadFile(String sessionId,
                                          String fileStorageId)
                                   throws RemoteException

      Simulate a call to downloadFile
      Specified by:
        `downloadFile` in interface `IFileStorageAppSoap`
      Parameters:
        `sessionId` - User session id.
        `fileStorageId` - Id of temporary file storage returned by DocmentApp.getDocumentFileId or FrsApp.getFrsFileId
      Returns:
        File as SOAP attachment.
      Throws:
        `com.collabnet.ce.soap60.fault.InvalidSessionFault` - when session is invalid (or not active).
        `com.collabnet.ce.soap60.fault.PermissionDeniedFault` - when the user has insufficient privileges.
        `com.collabnet.ce.soap60.fault.SystemFault` - when a system level error occurs.
        `com.collabnet.ce.soap60.fault.IllegalArgumentFault` - when the specified fileStorageId is invalid.
        `RemoteException`
      See Also:
        `FileStorageAppSoap.downloadFile(java.lang.String, java.lang.String)`

    - #### prepareDownloadFileDirect

          public void prepareDownloadFileDirect(String sessionId,
                                                String containerId,
                                                String rawFileId,
                                                Object returnValue)

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

    - #### downloadFileDirect

          public DataHandler downloadFileDirect(String sessionId,
                                                String containerId,
                                                String rawFileId)
                                         throws RemoteException

      Simulate a call to downloadFileDirect
      Specified by:
        `downloadFileDirect` in interface `IFileStorageAppSoap`
      Parameters:
        `sessionId` - User session id.
        `containerId` - The Folder which houses the attachment
        `rawFileId` - FileId to be downloaded
      Returns:
        File as SOAP attachment.
      Throws:
        `com.collabnet.ce.soap60.fault.InvalidSessionFault` - when session is invalid (or not active).
        `com.collabnet.ce.soap60.fault.PermissionDeniedFault` - when the user has insufficient privileges.
        `com.collabnet.ce.soap60.fault.SystemFault` - when a system level error occurs.
        `RemoteException`
      See Also:
        `FileStorageAppSoap.downloadFileDirect(java.lang.String, java.lang.String, java.lang.String)`

Copyright © 2020 CollabNet. All rights reserved.