com.collabnet.ce.soap60.webservices.filestorage

## Class SimpleFileStorageAppSoapStub

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

- All Implemented Interfaces:
    ISimpleFileStorageAppSoap

      public class SimpleFileStorageAppSoapStub
      extends com.collabnet.ce.soap60.webservices.ClientSoapStub
      implements ISimpleFileStorageAppSoap

- - ### Field Summary

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

      `DEFAULT_CLIENT_TIME_OUT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleFileStorageAppSoapStub(String soapServerUrl)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `endFileUpload(String sessionId, String fileStorageId)` Closes and saves uploaded file.
    `long` | `getSize(String sessionId, String fileStorageId)` Returns size of the specified temporary storage file in bytes.
    `byte[]` | `read(String sessionId, String fileStorageId, int offset, int length)` Reads from file a specified a number of bytes from the offset specified.
    `byte[]` | `read2(String sessionId, String fileStorageId, long offset, int length)` Reads from file a specified a number of bytes from the offset specified.
    `String` | `startFileUpload(String sessionId)` Opens a new file descriptor for uploading and returns the temporary storage id.
    `void` | `write(String sessionId, String fileStorageId, byte[] data)` Appends data to the file being uploaded.

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

    - #### SimpleFileStorageAppSoapStub

          public SimpleFileStorageAppSoapStub(String soapServerUrl)

  - ### Method Detail

    - #### startFileUpload

          public String startFileUpload(String sessionId)
                                 throws RemoteException

      Description copied from interface: `ISimpleFileStorageAppSoap`
      Opens a new file descriptor for uploading and returns the temporary storage id.
      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`

    - #### write

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

      Description copied from interface: `ISimpleFileStorageAppSoap`
      Appends data to the file being uploaded.
      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`

    - #### endFileUpload

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

      Description copied from interface: `ISimpleFileStorageAppSoap`
      Closes and saves uploaded file.
      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`

    - #### getSize

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

      Description copied from interface: `ISimpleFileStorageAppSoap`
      Returns size of the specified temporary storage file in bytes.
      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`

    - #### read

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

      Description copied from interface: `ISimpleFileStorageAppSoap`
      Reads from file a specified a number of bytes from the offset specified.
      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`

    - #### read2

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

      Description copied from interface: `ISimpleFileStorageAppSoap`
      Reads from file a specified a number of bytes from the offset specified.
      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`

Copyright © 2019 CollabNet. All rights reserved.