Class WindowsShellScriptFileHeader
- java.lang.Object
-
- io.wcm.devops.conga.generator.plugins.fileheader.AbstractFileHeader
-
- io.wcm.devops.conga.generator.plugins.fileheader.WindowsShellScriptFileHeader
-
- All Implemented Interfaces:
FileHeaderPlugin
,FilePlugin<FileHeaderContext,Void>
,Plugin
public final class WindowsShellScriptFileHeader extends AbstractFileHeader
Adds file headers to Windows .bat or .cmd files.
-
-
Constructor Summary
Constructors Constructor Description WindowsShellScriptFileHeader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accepts(FileContext file, FileHeaderContext context)
Checks if the plugin can be applied to the given file.FileHeaderContext
extract(FileContext file)
Extract comment lines from file header.protected String
getBlockSuffix()
protected String
getCommentLinePrefix()
protected String
getLineBreak()
String
getName()
-
Methods inherited from class io.wcm.devops.conga.generator.plugins.fileheader.AbstractFileHeader
apply, extractFileHeaderBetweenBlockStartEnd, extractFileHeaderWithLinePrefixes, getCommentBlockEnd, getCommentBlockStart, getInsertPosition, sanitizeComment
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.wcm.devops.conga.generator.spi.FileHeaderPlugin
implicitApply
-
-
-
-
Field Detail
-
NAME
public static final String NAME
Plugin name- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public String getName()
- Returns:
- Plugin name to be referenced in definition file
-
accepts
public boolean accepts(FileContext file, FileHeaderContext context)
Description copied from interface:FilePlugin
Checks 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.
-
getLineBreak
protected String getLineBreak()
- Overrides:
getLineBreak
in classAbstractFileHeader
-
getCommentLinePrefix
protected String getCommentLinePrefix()
- Overrides:
getCommentLinePrefix
in classAbstractFileHeader
-
getBlockSuffix
protected String getBlockSuffix()
- Overrides:
getBlockSuffix
in classAbstractFileHeader
-
extract
public FileHeaderContext extract(FileContext file)
Description copied from interface:FileHeaderPlugin
Extract 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.
-
-