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

public final class ConfFileHeader extends AbstractFileHeader
Adds file headers to .conf files (e.g. for Apache config files).
  • Field Details

  • Constructor Details

    • ConfFileHeader

      public ConfFileHeader()
  • Method Details

    • 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 file
      context - Context objects
      Returns:
      true when the plugin can be applied to the given file.
    • getCommentLinePrefix

      protected String getCommentLinePrefix()
      Overrides:
      getCommentLinePrefix in class AbstractFileHeader
    • getBlockSuffix

      protected String getBlockSuffix()
      Overrides:
      getBlockSuffix in class AbstractFileHeader
    • 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.