ccc.cli.fileupload
Class DryRunServer

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

public class DryRunServer
extends java.lang.Object
implements Server

A dummy server to allow dry runs of file uploads.

Author:
Civic Computing Ltd.

Constructor Summary
DryRunServer(ResourcePath rootPath)
          Constructor.
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DryRunServer

public DryRunServer(ResourcePath rootPath)
Constructor.

Parameters:
rootPath - The path to the root folder.
Method Detail

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.

createFile

public void createFile(java.util.UUID parentFolder,
                       java.io.File f,
                       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.
f - The file to create.
publish - Should the file be published.

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.