org.codehaus.mojo.license.header
Class UpdateFileHeaderFilter
java.lang.Object
org.nuiton.processor.filters.DefaultFilter
org.codehaus.mojo.license.header.FileHeaderFilter
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 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.nuiton.processor.filters.DefaultFilter |
cachedContent, NOT_FOUND, reader, state |
| Fields inherited from interface org.nuiton.processor.filters.Filter |
EMPTY_STRING |
| 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 |
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.
UpdateFileHeaderFilter
public UpdateFileHeaderFilter()
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.