com.collabnet.ce.soap60.webservices.filestorage

## Interface IFileStorageAppSoap

- All Known Implementing Classes:
    FileStorageAppSoapMockStub, FileStorageAppSoapStub

      public interface IFileStorageAppSoap

  Provides SOAP web service for uploading/downloading files. Uploaded files are assigned a "temporary file storage id" which must be used within the SOAP session to create a document/FRS file/etc. Otherwise, the uploaded file is simply discarded. This service provides support for uploading/downloading files as attachments. Clients which are unable to use SOAP file attachments for uploading files, can use "SimpleFileStorageApp" service for uploading files in memory.

  Change History
  Version 4.4: No changes.
  Since:
    4.1

- - ### Method Summary

    All Methods Instance Methods Abstract 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.

- - ### Method Detail

    - #### uploadFile

          String uploadFile(String sessionId,
                            DataHandler file)
                     throws RemoteException

      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.
      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`
      Since:
        4.1

    - #### downloadFile

          DataHandler downloadFile(String sessionId,
                                   String fileStorageId)
                            throws RemoteException

      Downloads file as SOAP attachment.
      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`
      Since:
        4.1

    - #### downloadFileDirect

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

      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)
      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`
      Since:
        4.4SP1

Copyright © 2020 CollabNet. All rights reserved.