Module com.github.rvesse.airline
Class VersionSection
- java.lang.Object
-
- com.github.rvesse.airline.help.sections.common.VersionSection
-
- All Implemented Interfaces:
HelpHint,HelpSection
public class VersionSection extends java.lang.Object implements HelpSection
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classVersionSection.VersionInfo
-
Field Summary
Fields Modifier and Type Field Description private booleantabularprivate java.lang.String[]titlesprivate java.util.List<VersionSection.VersionInfo>versions
-
Constructor Summary
Constructors Constructor Description VersionSection(java.lang.String[] dataSources, ResourceLocator[] resourceLocators, java.lang.String componentProperty, java.lang.String versionProperty, java.lang.String buildProperty, java.lang.String dateProperty, java.lang.String[] additionalProperties, java.lang.String[] additionalTitles, boolean suppressErrors, boolean tabular)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getContentBlock(int blockNumber)Gets the content block with the given numberHelpFormatgetFormat()Gets the format of the provided help informationjava.lang.StringgetPostamble()Gets the post-amble text that should be included at the end of the sectionjava.lang.StringgetPreamble()Gets the preamble text that should be includedjava.lang.StringgetTitle()Gets the title for the sectionprivate java.util.PropertiesloadDataSource(ResourceLocator[] resourceLocators, java.lang.String source)intnumContentBlocks()Gets the number of content blocks providedprivate voidsourceNotFound(java.lang.String dataSource)intsuggestedOrder()Gets an integer indicating the suggested order that a help generator should include this section in
-
-
-
Field Detail
-
versions
private java.util.List<VersionSection.VersionInfo> versions
-
tabular
private final boolean tabular
-
titles
private final java.lang.String[] titles
-
-
Constructor Detail
-
VersionSection
public VersionSection(java.lang.String[] dataSources, ResourceLocator[] resourceLocators, java.lang.String componentProperty, java.lang.String versionProperty, java.lang.String buildProperty, java.lang.String dateProperty, java.lang.String[] additionalProperties, java.lang.String[] additionalTitles, boolean suppressErrors, boolean tabular)
-
-
Method Detail
-
sourceNotFound
private void sourceNotFound(java.lang.String dataSource)
-
loadDataSource
private java.util.Properties loadDataSource(ResourceLocator[] resourceLocators, java.lang.String source) throws java.io.IOException
- Throws:
java.io.IOException
-
getPreamble
public java.lang.String getPreamble()
Description copied from interface:HelpHintGets the preamble text that should be included- Specified by:
getPreamblein interfaceHelpHint- Returns:
- Preamble text
-
getFormat
public HelpFormat getFormat()
Description copied from interface:HelpHintGets the format of the provided help information
-
numContentBlocks
public int numContentBlocks()
Description copied from interface:HelpHintGets the number of content blocks providedHelp 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:
numContentBlocksin interfaceHelpHint- Returns:
- Number of content blocks
-
getContentBlock
public java.lang.String[] getContentBlock(int blockNumber)
Description copied from interface:HelpHintGets the content block with the given number- Specified by:
getContentBlockin interfaceHelpHint- Parameters:
blockNumber- Block number- Returns:
- Content Block
-
getTitle
public java.lang.String getTitle()
Description copied from interface:HelpSectionGets the title for the section- Specified by:
getTitlein interfaceHelpSection- Returns:
- Section title
-
getPostamble
public java.lang.String getPostamble()
Description copied from interface:HelpSectionGets the post-amble text that should be included at the end of the section- Specified by:
getPostamblein interfaceHelpSection- Returns:
-
suggestedOrder
public int suggestedOrder()
Description copied from interface:HelpSectionGets an integer indicating the suggested order that a help generator should include this section inA 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:
suggestedOrderin interfaceHelpSection- Returns:
- Suggested order
-
-