com.collabnet.ce.soap60.webservices.filestorage

## Class FileStorageAppSoapStub

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

- All Implemented Interfaces:
    IFileStorageAppSoap

      public class FileStorageAppSoapStub
      extends com.collabnet.ce.soap60.webservices.ClientSoapStub
      implements IFileStorageAppSoap

- - ### Field Summary

    - ### Fields inherited from class com.collabnet.ce.soap60.webservices.ClientSoapStub

      `DEFAULT_CLIENT_TIME_OUT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileStorageAppSoapStub(String soapServerUrl)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DataHandler` | `downloadFile(String sessionId, String fileStorageId)` Downloads file as SOAP attachment.
    `DataHandler` | `downloadFileDirect(String sessionId, String containerId, String rawFileId)` Downloads file Direct as SOAP attachment.
    `String` | `uploadFile(String sessionId, DataHandler file)` Uploads a file as SOAP attachment.

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

    - #### FileStorageAppSoapStub

          public FileStorageAppSoapStub(String soapServerUrl)

  - ### Method Detail

    - #### uploadFile

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

      Description copied from interface: `IFileStorageAppSoap`
      Uploads a file as SOAP attachment. The returned file id can be used to associate the file with a document, frs file, etc. Note that a file can ONLY be associated with a single document or an frs file.
      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`

    - #### downloadFile

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

      Description copied from interface: `IFileStorageAppSoap`
      Downloads file as SOAP attachment.
      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`

    - #### downloadFileDirect

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

      Description copied from interface: `IFileStorageAppSoap`
      Downloads file Direct as SOAP attachment. This does not assume that the file to be downloaded is stored in the session. This can only be used for Wiki or Tracker (Because those are the two for which we check permissions)
      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`

Copyright © 2020 CollabNet. All rights reserved.