ccc.cli.fileupload
Interface Server

All Known Implementing Classes:
CccServer, DryRunServer

public interface Server

Server API for file upload.

Author:
Civic Computing Ltd.

Method Summary
 void createFile(java.util.UUID parentFolder, java.io.File f, 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.
 

Method Detail

createFile

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

Parameters:
parentFolder - The folder where the file will be created.
f - The file to create.
publish - Should the file be published.

createFolder

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

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.
Throws:
CCException - If it wasn't possible to create the folder.

getRoot

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

Returns:
The id of the root folder.
Throws:
CCException - If the root folder doesn't exist.


Copyright © 2010. All Rights Reserved.