org.codehaus.mojo.license.header
Class UpdateFileHeaderFilter

java.lang.Object
  extended by org.nuiton.processor.filters.DefaultFilter
      extended by org.codehaus.mojo.license.header.FileHeaderFilter
          extended by org.codehaus.mojo.license.header.UpdateFileHeaderFilter
All Implemented Interfaces:
org.nuiton.processor.filters.Filter

public class UpdateFileHeaderFilter
extends FileHeaderFilter

Implementation of FileHeaderFilter to update an incoming header.

Since:
1.0
Author:
tchemit

Nested Class Summary
 
Nested classes/interfaces inherited from class org.nuiton.processor.filters.DefaultFilter
org.nuiton.processor.filters.DefaultFilter.State
 
Field Summary
protected  boolean updateCopyright
          Flag sets to true if copyright can be updated.
protected  boolean updateDescription
          Flag sets to true if description can be updated.
protected  boolean updateLicense
          Flag set to true if license can be updated.
 
Fields inherited from class org.codehaus.mojo.license.header.FileHeaderFilter
detectHeader, fileHeader, fullHeaderContent, headerContent, log, modified, processTagHeaderContent, touched, transformer
 
Fields inherited from class org.nuiton.processor.filters.DefaultFilter
cachedContent, NOT_FOUND, reader, state
 
Fields inherited from interface org.nuiton.processor.filters.Filter
EMPTY_STRING
 
Constructor Summary
UpdateFileHeaderFilter()
           
 
Method Summary
protected  FileHeader getNewHeader(FileHeader oldHeader)
          Obtains the new header to use according to the old one.
 boolean isUpdateCopyright()
           
 boolean isUpdateDescription()
           
 boolean isUpdateLicense()
           
 void setUpdateCopyright(boolean updateCopyright)
           
 void setUpdateDescription(boolean updateDescription)
           
 void setUpdateLicense(boolean updateLicense)
           
 
Methods inherited from class org.codehaus.mojo.license.header.FileHeaderFilter
changeState, getFileHeader, getFooter, getFullHeaderContent, getHeader, getHeaderContent, getLog, getProcessTagHeaderContent, getTransformer, isDetectHeader, isModified, isTouched, performInFilter, performOutFilter, reset, resetContent, setFileHeader, setLog, setTransformer
 
Methods inherited from class org.nuiton.processor.filters.DefaultFilter
flush, getLineNumber, getMatchIndexFor, getMatchLengthFor, hasCachedData, parse, performHeaderFooterFilter, setReader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

updateDescription

protected boolean updateDescription
Flag sets to true if description can be updated.


updateLicense

protected boolean updateLicense
Flag set to true if license can be updated.


updateCopyright

protected boolean updateCopyright
Flag sets to true if copyright can be updated.

Constructor Detail

UpdateFileHeaderFilter

public UpdateFileHeaderFilter()
Method Detail

getNewHeader

protected FileHeader getNewHeader(FileHeader oldHeader)
Description copied from class: FileHeaderFilter
Obtains the new header to use according to the old one.

Note: If the new header should not be updated, then the result is null.

Specified by:
getNewHeader in class FileHeaderFilter
Parameters:
oldHeader - the old header found in file.
Returns:
null if header is still the same, otherwise the new header to apply

isUpdateCopyright

public boolean isUpdateCopyright()

setUpdateCopyright

public void setUpdateCopyright(boolean updateCopyright)

isUpdateDescription

public boolean isUpdateDescription()

setUpdateDescription

public void setUpdateDescription(boolean updateDescription)

isUpdateLicense

public boolean isUpdateLicense()

setUpdateLicense

public void setUpdateLicense(boolean updateLicense)


Copyright © 2010-2012 The Kuali Foundation. All Rights Reserved.