3.1.2: 2012-07-31

net.sf.basedb.ws.client
Class FileClient

java.lang.Object
  extended by net.sf.basedb.ws.client.AbstractRPCClient
      extended by net.sf.basedb.ws.client.FileClient

public class FileClient
extends AbstractRPCClient

Web service client for files in BASE. Calls services in FileService

Since:
3.0
Author:
Nicklas

Field Summary
private  SessionClient session
           
 
Constructor Summary
FileClient(SessionClient session)
          Creates new ProjectClient object for an active session client.
 
Method Summary
 InputStream download(int fileId)
          Download a file when you know the id.
 FileInfo getById(int itemId)
          Get info about a file when you know the ID.
 
Methods inherited from class net.sf.basedb.ws.client.AbstractRPCClient
getOperation, getService, getServiceFactory, invokeBlocking, invokeBlocking, invokeBlocking, invokeFileBlocking, setServiceFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

session

private final SessionClient session
Constructor Detail

FileClient

public FileClient(SessionClient session)
Creates new ProjectClient object for an active session client.

Parameters:
session - The active session client
Method Detail

getById

public FileInfo getById(int itemId)
                 throws org.apache.axis2.AxisFault
Get info about a file when you know the ID.

Parameters:
itemId - The ID of the file
Returns:
An FileInfo object
Throws:
org.apache.axis2.AxisFault - If communication with web service fails.

download

public InputStream download(int fileId)
                     throws org.apache.axis2.AxisFault,
                            IOException
Download a file when you know the id.

Parameters:
fileId - Id of file to download
Returns:
An InputStream to read the file data from, or null if the file has no data
Throws:
org.apache.axis2.AxisFault - If communication with webservices fails.
IOException - If writing to the target file fails.

3.1.2: 2012-07-31