org.codehaus.mojo.mrm.impl.digest
Class AutoDigestFileSystem

java.lang.Object
  extended by org.codehaus.mojo.mrm.api.BaseFileSystem
      extended by org.codehaus.mojo.mrm.impl.digest.AutoDigestFileSystem
All Implemented Interfaces:
Serializable, org.codehaus.mojo.mrm.api.FileSystem

public class AutoDigestFileSystem
extends org.codehaus.mojo.mrm.api.BaseFileSystem

A delegating file system that will automatically provide digests of any files that are missing digests from the backing file system.

Since:
1.0
See Also:
Serialized Form

Constructor Summary
AutoDigestFileSystem(org.codehaus.mojo.mrm.api.FileSystem backing)
          Creates an instance that will add SHA1 and MD5 digests to the backing file system for any entries that are missing digests.
AutoDigestFileSystem(org.codehaus.mojo.mrm.api.FileSystem backing, DigestFileEntryFactory[] digestFactories)
          Creates an instance that will use the supplied DigestFileEntryFactorys to add any missing digests to the backing file system.
 
Method Summary
 org.codehaus.mojo.mrm.api.Entry get(String path)
          
 long getLastModified(org.codehaus.mojo.mrm.api.DirectoryEntry entry)
          
 org.codehaus.mojo.mrm.api.Entry[] listEntries(org.codehaus.mojo.mrm.api.DirectoryEntry directory)
          
 
Methods inherited from class org.codehaus.mojo.mrm.api.BaseFileSystem
get, getRoot, mkdir, put, put, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoDigestFileSystem

public AutoDigestFileSystem(org.codehaus.mojo.mrm.api.FileSystem backing)
Creates an instance that will add SHA1 and MD5 digests to the backing file system for any entries that are missing digests.

Parameters:
backing - the backing file system.
Since:
1.0

AutoDigestFileSystem

public AutoDigestFileSystem(org.codehaus.mojo.mrm.api.FileSystem backing,
                            DigestFileEntryFactory[] digestFactories)
Creates an instance that will use the supplied DigestFileEntryFactorys to add any missing digests to the backing file system.

Parameters:
backing - the backing file system.
digestFactories - the digest factories.
Since:
1.0
Method Detail

listEntries

public org.codehaus.mojo.mrm.api.Entry[] listEntries(org.codehaus.mojo.mrm.api.DirectoryEntry directory)


getLastModified

public long getLastModified(org.codehaus.mojo.mrm.api.DirectoryEntry entry)
                     throws IOException

Throws:
IOException

get

public org.codehaus.mojo.mrm.api.Entry get(String path)

Specified by:
get in interface org.codehaus.mojo.mrm.api.FileSystem
Overrides:
get in class org.codehaus.mojo.mrm.api.BaseFileSystem


Copyright © 2009-2011 Codehaus. All Rights Reserved.