Package com.collabnet.ce.soap60.webservices.filestorage

# Class FileStorageAppSoap

java.lang.Object
com.collabnet.ce.soap60.webservices.WebService
com.collabnet.ce.soap60.webservices.filestorage.FileStorageAppSoap

All Implemented Interfaces:
  `IFileStorageAppSoap`

public class FileStorageAppSoap extends WebService implements 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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FileStorageAppSoap()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `jakarta.activation.DataHandler`
  `downloadFile(String sessionId, String fileStorageId)`
  Downloads file as SOAP attachment.
  `jakarta.activation.DataHandler`
  `downloadFileDirect(String sessionId, String containerId, String rawFileId)`
  Downloads file Direct as SOAP attachment.
  `String`
  `uploadFile(String sessionId, jakarta.activation.DataHandler file)`
  Uploads a file as SOAP attachment.

  ### Methods inherited from class com.collabnet.ce.soap60.webservices.WebService

  `assertNormalProject, assertProjectGroup, canGiveFullUserDetails, checkGeneralPermission, checkPermission, checkPermission, checkSiteWidePermission, createUserSessionKey, downloadFile, filterInvalidProjMembers, generateFolderName, getAccessControlService, getApplicationRegistryService, getAttachment, getAuthenticationService, getCategorization, getCoreService, getDiscussion, getDocMan, getDocumentRootFolder, getFileStorageService, getFolderKey, getFolderPath, getFolderPath, getFolderPath, getFrs, getIntegrationData, getItemPath, getItemPath, getLocale, getMonitoring, getNews, getNulledMinSoapDate, getObjectKey, getObjectPath, getOperation, getPages, getPlanning, getPluggableComponent, getProjectId, getProjectPath, getProjectPath, getRbac, getSearch, getStoredFileSize, getStoredFileText, getTagService, getTeam, getTemplate, getTracker, getUser, getUserData, getUsername, getUserService, getWiki, hasPermission, hasSiteWidePermission, isFolderResource, isProjectGroup, isProjectId, isStrEmpty, isSuperUser, isValidEmail, makeStoredFileDO, makeStoredFileDOs, requireProjectAdminPermission, setPartialOrFullUserData, setUserNameToResponse, storeFile, storeTextFile, validateChoice, validateChoice, validateIconFile, validateString, validateStringArray, validateStringWithTrim, validateTokenAndExactUsername, validateTokenAndExactUsername, validateWikiPageName, verifyLicense`

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

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

- ## Constructor Details

  - ### FileStorageAppSoap

    public FileStorageAppSoap()

- ## Method Details

  - ### uploadFile

    public String uploadFile(String sessionId, jakarta.activation.DataHandler file) throws InvalidSessionFault, SystemFault
    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:
      `InvalidSessionFault` - when session is invalid (or not active).
      `SystemFault` - when a system level error occurs.
    Since:
      4.1

  - ### downloadFile

    public jakarta.activation.DataHandler downloadFile(String sessionId, String fileStorageId) throws InvalidSessionFault, PermissionDeniedFault, SystemFault, IllegalArgumentFault
    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:
      `InvalidSessionFault` - when session is invalid (or not active).
      `PermissionDeniedFault` - when the user has insufficient privileges.
      `SystemFault` - when a system level error occurs.
      `IllegalArgumentFault` - when the specified fileStorageId is invalid.
    Since:
      4.1

  - ### downloadFileDirect

    public jakarta.activation.DataHandler downloadFileDirect(String sessionId, String containerId, String rawFileId) throws InvalidSessionFault, PermissionDeniedFault, SystemFault
    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:
      `InvalidSessionFault` - when session is invalid (or not active).
      `PermissionDeniedFault` - when the user has insufficient privileges.
      `SystemFault` - when a system level error occurs.
    Since:
      4.4SP1