ccc.migration
Class FileUploader

java.lang.Object
  extended by ccc.migration.FileUploader
All Implemented Interfaces:
IFileUploader

public class FileUploader
extends java.lang.Object
implements IFileUploader

Implementation of the file uploader API.

Author:
Civic Computing Ltd.

Constructor Summary
FileUploader(org.apache.commons.httpclient.HttpClient httpClient, java.lang.String hostUrl)
          Constructor.
 
Method Summary
 void uploadFile(java.util.UUID parentId, java.lang.String fileName, java.lang.String originalTitle, java.lang.String originalDescription, java.util.Date originalLastUpdate, java.io.File file, boolean publish)
          Upload a file.
 void uploadFile(java.util.UUID parentId, java.lang.String fileName, java.lang.String title, java.lang.String description, java.util.Date lastUpdate, java.lang.String directory)
          Upload a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUploader

public FileUploader(org.apache.commons.httpclient.HttpClient httpClient,
                    java.lang.String hostUrl)
Constructor.

Parameters:
httpClient -
hostUrl -
Method Detail

uploadFile

public void uploadFile(java.util.UUID parentId,
                       java.lang.String fileName,
                       java.lang.String originalTitle,
                       java.lang.String originalDescription,
                       java.util.Date originalLastUpdate,
                       java.io.File file,
                       boolean publish)
Upload a file.

Specified by:
uploadFile in interface IFileUploader
Parameters:
parentId - The folder in which the file should be uploaded.
fileName - The name of the file.
originalTitle - The title of the file.
originalDescription - The file's description.
originalLastUpdate - The file's last update date.
file - The local file reference.
publish - Should the file be published.

uploadFile

public void uploadFile(java.util.UUID parentId,
                       java.lang.String fileName,
                       java.lang.String title,
                       java.lang.String description,
                       java.util.Date lastUpdate,
                       java.lang.String directory)
Upload a file.

Specified by:
uploadFile in interface IFileUploader
Parameters:
parentId - The folder in which the file should be uploaded.
fileName - The name of the file.
title - The title of the file.
description - The file's description.
lastUpdate - The last update of the file.
directory - The directory that the local file is stored.


Copyright © 2010. All Rights Reserved.