Module com.github.rvesse.airline
Class VersionSection
java.lang.Object
com.github.rvesse.airline.help.sections.common.VersionSection
- All Implemented Interfaces:
HelpHint
,HelpSection
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionVersionSection
(String[] dataSources, ResourceLocator[] resourceLocators, String componentProperty, String versionProperty, String buildProperty, String dateProperty, String[] additionalProperties, String[] additionalTitles, boolean suppressErrors, boolean tabular) -
Method Summary
Modifier and TypeMethodDescriptionString[]
getContentBlock
(int blockNumber) Gets the content block with the given numberGets the format of the provided help informationGets the post-amble text that should be included at the end of the sectionGets the preamble text that should be includedgetTitle()
Gets the title for the sectionprivate Properties
loadDataSource
(ResourceLocator[] resourceLocators, String source) int
Gets the number of content blocks providedprivate void
sourceNotFound
(String dataSource) int
Gets an integer indicating the suggested order that a help generator should include this section in
-
Field Details
-
versions
-
tabular
private final boolean tabular -
titles
-
-
Constructor Details
-
VersionSection
-
-
Method Details
-
sourceNotFound
-
loadDataSource
private Properties loadDataSource(ResourceLocator[] resourceLocators, String source) throws IOException - Throws:
IOException
-
getPreamble
Description copied from interface:HelpHint
Gets the preamble text that should be included- Specified by:
getPreamble
in interfaceHelpHint
- Returns:
- Preamble text
-
getFormat
Description copied from interface:HelpHint
Gets the format of the provided help information -
numContentBlocks
public int numContentBlocks()Description copied from interface:HelpHint
Gets 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:
numContentBlocks
in interfaceHelpHint
- Returns:
- Number of content blocks
-
getContentBlock
Description copied from interface:HelpHint
Gets the content block with the given number- Specified by:
getContentBlock
in interfaceHelpHint
- Parameters:
blockNumber
- Block number- Returns:
- Content Block
-
getTitle
Description copied from interface:HelpSection
Gets the title for the section- Specified by:
getTitle
in interfaceHelpSection
- Returns:
- Section title
-
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 interfaceHelpSection
- 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 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:
suggestedOrder
in interfaceHelpSection
- Returns:
- Suggested order
-