Class ConfFileHeader
java.lang.Object
io.wcm.devops.conga.generator.plugins.fileheader.AbstractFileHeader
io.wcm.devops.conga.generator.plugins.fileheader.ConfFileHeader
- All Implemented Interfaces:
FileHeaderPlugin,FilePlugin<FileHeaderContext,,Void> Plugin
Adds file headers to .conf files (e.g. for Apache config files).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepts(FileContext file, FileHeaderContext context) Checks if the plugin can be applied to the given file.extract(FileContext file) Extract comment lines from file header.protected StringGets block suffix.protected StringGets comment line prefix.getName()Gets plugin name.Methods inherited from class io.wcm.devops.conga.generator.plugins.fileheader.AbstractFileHeader
apply, extractFileHeaderBetweenBlockStartEnd, extractFileHeaderWithLinePrefixes, getCommentBlockEnd, getCommentBlockStart, getInsertPosition, getLineBreak, sanitizeCommentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.wcm.devops.conga.generator.spi.FileHeaderPlugin
implicitApply
-
Field Details
-
NAME
Plugin name- See Also:
-
-
Constructor Details
-
ConfFileHeader
public ConfFileHeader()
-
-
Method Details
-
getName
Description copied from interface:PluginGets plugin name.- Returns:
- Plugin name to be referenced in definition file
-
accepts
Description copied from interface:FilePluginChecks if the plugin can be applied to the given file.- Parameters:
file- Context filecontext- Context objects- Returns:
- true when the plugin can be applied to the given file.
-
getCommentLinePrefix
Description copied from class:AbstractFileHeaderGets comment line prefix.- Overrides:
getCommentLinePrefixin classAbstractFileHeader- Returns:
- Comment line prefix string
-
getBlockSuffix
Description copied from class:AbstractFileHeaderGets block suffix.- Overrides:
getBlockSuffixin classAbstractFileHeader- Returns:
- Block suffix string
-
extract
Description copied from interface:FileHeaderPluginExtract comment lines from file header.- Parameters:
file- Context file- Returns:
- File header context with comment lines. Returns null if extraction not possible or no comments present.
-