au.com.prunge.jgenfile
Interface GetChildOperation

All Superinterfaces:
DirectoryOperation, ItemOperation, Operation
All Known Implementing Classes:
LocalGetChildOperation

public interface GetChildOperation
extends DirectoryOperation

An operation that acquires a child item with a specific name in a directory.

If a child with the name specified when this operation was created does not exist in the directory, the getChild() method will return null and the childExists() method will return false.

Version:
1.0
Author:
Peter Runge

Method Summary
 au.com.prunge.jgenfile.Item getChild()
          Returns the child item.
 String getItemName()
          Returns the name of the item to acquire.
 void run()
          Runs this operation.
 
Methods inherited from interface au.com.prunge.jgenfile.DirectoryOperation
getDirectory
 
Methods inherited from interface au.com.prunge.jgenfile.ItemOperation
getItem
 
Methods inherited from interface au.com.prunge.jgenfile.Operation
abort, addOperationHints, getLastRunException, getOperationHint, getOperationHints, hasRun, setOperationHint, setOperationHints
 

Method Detail

getItemName

public String getItemName()
Returns the name of the item to acquire.

Returns:
the name of the item to acquire.

getChild

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

Returns:
the child item.
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 JGenFileException,
                OperationNotSupportedException,
                ItemNotFoundException
Runs this operation.

Specified by:
run in interface Operation
Throws:
ItemNotFoundException - if a child item with the specified name could not be found.
JGenFileException - if another error occurs.
OperationNotSupportedException - if this operation is not supported.
See Also:
Operation.abort()