ccc.cli.fileupload
Class CccServer

java.lang.Object
  extended by ccc.cli.fileupload.CccServer
All Implemented Interfaces:
Server

public class CccServer
extends java.lang.Object
implements Server

Implementation of the Server interface - calls the CCC server.

Author:
Civic Computing Ltd.

Constructor Summary
CccServer(ResourcePath rootPath, Files files, Folders folders, Resources resources)
          Constructor.
 
Method Summary
 void createFile(java.util.UUID parentFolder, java.io.File localFile, boolean publish)
          Create a file in the new system.
 java.util.UUID createFolder(java.util.UUID parentFolder, java.lang.String name, boolean publish)
          Create a folder in the new system.
 java.util.UUID getRoot()
          Get the id of the root folder in the new system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CccServer

public CccServer(ResourcePath rootPath,
                 Files files,
                 Folders folders,
                 Resources resources)
Constructor.

Parameters:
rootPath - The absolute path to the folder where files will be uploaded.
files - The files API.
folders - The folders API.
resources - The resources API.
Method Detail

createFile

public void createFile(java.util.UUID parentFolder,
                       java.io.File localFile,
                       boolean publish)
Create a file in the new system.

Specified by:
createFile in interface Server
Parameters:
parentFolder - The folder where the file will be created.
localFile - The file to create.
publish - Should the file be published.

createFolder

public java.util.UUID createFolder(java.util.UUID parentFolder,
                                   java.lang.String name,
                                   boolean publish)
Create a folder in the new system.

Specified by:
createFolder in interface Server
Parameters:
parentFolder - The parent folder where the new folder will be created.
name - The name of the folder.
publish - Should the folder be published.
Returns:
The id of the newly created folder.

getRoot

public java.util.UUID getRoot()
Get the id of the root folder in the new system. TODO: Throw a more appropriate exception.

Specified by:
getRoot in interface Server
Returns:
The id of the root folder.


Copyright © 2010. All Rights Reserved.