au.com.prunge.jgenfile
Interface GetRootOperation

All Superinterfaces:
FileSystemOperation, Operation
All Known Implementing Classes:
LocalGetRootOperation

public interface GetRootOperation
extends FileSystemOperation

An operation that acquires a root item with a specific name in a file system.

If a root with the name specified when this operation was created does not exist in the file system, the getRoot() method will return null and the rootExists() method will return false.

Version:
1.0
Author:
Peter Runge

Method Summary
 au.com.prunge.jgenfile.Item getRoot()
          Returns the root item.
 String getRootName()
          Returns the name of the root to acquire.
 void run()
          Runs this operation.
 
Methods inherited from interface au.com.prunge.jgenfile.FileSystemOperation
getFileSystem
 
Methods inherited from interface au.com.prunge.jgenfile.Operation
abort, addOperationHints, getLastRunException, getOperationHint, getOperationHints, hasRun, setOperationHint, setOperationHints
 

Method Detail

getRootName

public String getRootName()
Returns the name of the root to acquire.

Returns:
the name of the root to acquire.

getRoot

public au.com.prunge.jgenfile.Item getRoot()
                                    throws OperationNotFinishedException,
                                           JGenFileException
Returns the root item.

Returns:
the root item, or null.
Throws:
OperationNotFinishedException - if this method was called and the run() method has not finished or has not been called.
JGenFileException - if another error occurs.

run

public void run()
         throws ItemNotFoundException,
                JGenFileException
Runs this operation.

Specified by:
run in interface Operation
Throws:
ItemNotFoundException - if the root could not be found.
JGenFileException - if another error occurs.
See Also:
Operation.abort()