java.lang.Object
com.github.rvesse.airline.help.sections.common.VersionSection
All Implemented Interfaces:
HelpHint, HelpSection

public class VersionSection extends Object implements HelpSection
  • Field Details

  • Constructor Details

    • VersionSection

      public VersionSection(String[] dataSources, ResourceLocator[] resourceLocators, String componentProperty, String versionProperty, String buildProperty, String dateProperty, String[] additionalProperties, String[] additionalTitles, boolean suppressErrors, boolean tabular)
  • Method Details

    • sourceNotFound

      private void sourceNotFound(String dataSource)
    • loadDataSource

      private Properties loadDataSource(ResourceLocator[] resourceLocators, String source) throws IOException
      Throws:
      IOException
    • getPreamble

      public String getPreamble()
      Description copied from interface: HelpHint
      Gets the preamble text that should be included
      Specified by:
      getPreamble in interface HelpHint
      Returns:
      Preamble text
    • getFormat

      public HelpFormat getFormat()
      Description copied from interface: HelpHint
      Gets the format of the provided help information
      Specified by:
      getFormat in interface HelpHint
      Returns:
      Help format
    • numContentBlocks

      public int numContentBlocks()
      Description copied from interface: HelpHint
      Gets the number of content blocks provided

      Help generators should consult the HelpHint.getFormat() return value to determine how to format the content blocks but they are not required to do so

      Specified by:
      numContentBlocks in interface HelpHint
      Returns:
      Number of content blocks
    • getContentBlock

      public String[] getContentBlock(int blockNumber)
      Description copied from interface: HelpHint
      Gets the content block with the given number
      Specified by:
      getContentBlock in interface HelpHint
      Parameters:
      blockNumber - Block number
      Returns:
      Content Block
    • getTitle

      public String getTitle()
      Description copied from interface: HelpSection
      Gets the title for the section
      Specified by:
      getTitle in interface HelpSection
      Returns:
      Section title
    • getPostamble

      public String getPostamble()
      Description copied from interface: HelpSection
      Gets the post-amble text that should be included at the end of the section
      Specified by:
      getPostamble in interface HelpSection
      Returns:
    • suggestedOrder

      public int suggestedOrder()
      Description copied from interface: HelpSection
      Gets an integer indicating the suggested order that a help generator should include this section in

      A value of zero indicates that the help generator can decide where to place this section, a positive value indicates it should be placed after the default sections while a negative value indicates it should be placed before the default sections. There is however no guarantee that a help generator will honour the order given.

      Specified by:
      suggestedOrder in interface HelpSection
      Returns:
      Suggested order