Class UnixShellScriptFileHeader
java.lang.Object
io.wcm.devops.conga.generator.plugins.fileheader.AbstractFileHeader
io.wcm.devops.conga.generator.plugins.fileheader.UnixShellScriptFileHeader
- All Implemented Interfaces:
FileHeaderPlugin,FilePlugin<FileHeaderContext,,Void> Plugin
Adds file headers to Unix script files (esp. Bash).
-
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 Stringprotected Stringprotected intgetInsertPosition(String content) getName()Methods inherited from class io.wcm.devops.conga.generator.plugins.fileheader.AbstractFileHeader
apply, extractFileHeaderBetweenBlockStartEnd, extractFileHeaderWithLinePrefixes, getCommentBlockEnd, getCommentBlockStart, 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
-
UnixShellScriptFileHeader
public UnixShellScriptFileHeader()
-
-
Method Details
-
getName
- 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
- Overrides:
getCommentLinePrefixin classAbstractFileHeader
-
getBlockSuffix
- Overrides:
getBlockSuffixin classAbstractFileHeader
-
getInsertPosition
- Overrides:
getInsertPositionin classAbstractFileHeader
-
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.
-