org.codehaus.mojo.mrm.impl
Class GenerateOnErrorFileEntry

java.lang.Object
  extended by org.codehaus.mojo.mrm.api.AbstractEntry
      extended by org.codehaus.mojo.mrm.api.BaseFileEntry
          extended by org.codehaus.mojo.mrm.impl.GenerateOnErrorFileEntry
All Implemented Interfaces:
Serializable, org.codehaus.mojo.mrm.api.Entry, org.codehaus.mojo.mrm.api.FileEntry

public class GenerateOnErrorFileEntry
extends org.codehaus.mojo.mrm.api.BaseFileEntry

A delegating file entry that also knows how to generate the content if the entry it delegates to has problems.

Since:
1.0
See Also:
Serialized Form

Constructor Summary
GenerateOnErrorFileEntry(org.codehaus.mojo.mrm.api.FileSystem fileSystem, org.codehaus.mojo.mrm.api.DirectoryEntry parent, org.codehaus.mojo.mrm.api.FileEntry delegateEntry, org.codehaus.mojo.mrm.api.FileEntry generatorEntry)
          Creates a FileEntry in the specified directory of the specified file system that delegates to another FileEntry but can (and will) fall back to another FileEntry if the primary delegate has an error.
 
Method Summary
 InputStream getInputStream()
          
 long getLastModified()
          
 long getSize()
          
 
Methods inherited from class org.codehaus.mojo.mrm.api.AbstractEntry
equals, getFileSystem, getName, getParent, hashCode, toPath, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.codehaus.mojo.mrm.api.Entry
getFileSystem, getName, getParent, toPath
 

Constructor Detail

GenerateOnErrorFileEntry

public GenerateOnErrorFileEntry(org.codehaus.mojo.mrm.api.FileSystem fileSystem,
                                org.codehaus.mojo.mrm.api.DirectoryEntry parent,
                                org.codehaus.mojo.mrm.api.FileEntry delegateEntry,
                                org.codehaus.mojo.mrm.api.FileEntry generatorEntry)
Creates a FileEntry in the specified directory of the specified file system that delegates to another FileEntry but can (and will) fall back to another FileEntry if the primary delegate has an error.

Parameters:
fileSystem - The file system.
parent - The parent directory.
delegateEntry - The primary delegate entry.
generatorEntry - The delegate entry that is more costly to use and therefore should only be used if the primary delegate has an error.
Since:
1.0
Method Detail

getLastModified

public long getLastModified()
                     throws IOException

Throws:
IOException

getSize

public long getSize()
             throws IOException

Throws:
IOException

getInputStream

public InputStream getInputStream()
                           throws IOException

Throws:
IOException


Copyright © 2009-2011 Codehaus. All Rights Reserved.