au.com.prunge.jgenfile.impl
Class NullGetFileSystemMetadataOperation

java.lang.Object
  |
  +--au.com.prunge.jgenfile.impl.AbstractOperation
        |
        +--au.com.prunge.jgenfile.impl.AbstractFileSystemOperation
              |
              +--au.com.prunge.jgenfile.impl.NullGetFileSystemMetadataOperation
All Implemented Interfaces:
FileSystemOperation, GetFileSystemMetadataOperation, Operation

public class NullGetFileSystemMetadataOperation
extends AbstractFileSystemOperation
implements GetFileSystemMetadataOperation

A get file system metadata operation that does nothing. No metadata is ever returned.

Version:
1.0
Author:
Peter Runge

Constructor Summary
NullGetFileSystemMetadataOperation(au.com.prunge.jgenfile.FileSystem fileSystem, Set metadataKeySet)
          Constructs a NullGetFileSystemMetadataOperation.
 
Method Summary
 Map getMetadata()
          Always returns an empty map.
 Set getMetadataKeySet()
          Returns the set of metadata keys this operation is looking up for the file system.
 void runImpl()
          The actual run() implementation goes in this method.
 
Methods inherited from class au.com.prunge.jgenfile.impl.AbstractFileSystemOperation
getFileSystem
 
Methods inherited from class au.com.prunge.jgenfile.impl.AbstractOperation
abort, addOperationHints, checkRun, getLastRunException, getOperationHint, getOperationHints, hasRun, run, setLastRunException, setOperationHint, setOperationHints
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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, run, setOperationHint, setOperationHints
 

Constructor Detail

NullGetFileSystemMetadataOperation

public NullGetFileSystemMetadataOperation(au.com.prunge.jgenfile.FileSystem fileSystem,
                                          Set metadataKeySet)
                                   throws NullPointerException
Constructs a NullGetFileSystemMetadataOperation.

Parameters:
fileSystem - the file system this operation is for.
metadataKeySet - a set of metadata keys to access.
Throws:
NullPointerException - if metadataKeySet is null.
Method Detail

getMetadataKeySet

public Set getMetadataKeySet()
Description copied from interface: GetFileSystemMetadataOperation
Returns the set of metadata keys this operation is looking up for the file system.

Specified by:
getMetadataKeySet in interface GetFileSystemMetadataOperation
Returns:
a set of MetadataKey objects.
See Also:
GetFileSystemMetadataOperation.getMetadataKeySet()

getMetadata

public Map getMetadata()
                throws OperationNotFinishedException,
                       JGenFileException
Always returns an empty map.

Specified by:
getMetadata in interface GetFileSystemMetadataOperation
Returns:
a map of MetadataKey objects to values.
Throws:
OperationNotFinishedException - if this method was called and the run() method has not finished or has not been called.
JGenFileException - if another error occurs.
See Also:
GetFileSystemMetadataOperation.getMetadata()

runImpl

public void runImpl()
             throws JGenFileException
Description copied from class: AbstractOperation
The actual run() implementation goes in this method. Setting the last run exception and setting hasRun to true is not required by this method as it is handled by the run() method in this class.

If this method completes successfully (i.e. without throwing an exception), the last run exception is set to null indicating no exception occurred and subsequent calls to hasRun() will return true.

If this method throws an exception, the last run exception is filled in and hasRun() subsequent calls to hasRun() will return false.

Specified by:
runImpl in class AbstractOperation
Throws:
JGenFileException - if an error occurs.
See Also:
au.com.prunge.jgenfile.AbstractOperation#runImpl()