Class CommandLineTool


  • public class CommandLineTool
    extends Object
    Represents a command-line tool as used in the configuration for GenerateRefEntriesMojo.
    Command-line tools are associated with a script name, the Java class of the tool, and a list of relative paths to hand-written files for trailing sections.
    Trailing section paths are relative to the RefEntry file to write.
    • Constructor Detail

      • CommandLineTool

        public CommandLineTool()
    • Method Detail

      • getName

        public String getName()
        Returns the script name.
        Returns:
        The script name.
      • setName

        public void setName​(String name)
        Set the script name.
        Parameters:
        name - The script name.
      • getApplication

        public String getApplication()
        Returns the tool class.
        Returns:
        The tool class.
      • setApplication

        public void setApplication​(String application)
        Set the tool class.
        Parameters:
        application - The tool class.
      • getTrailingSectionPaths

        public List<String> getTrailingSectionPaths()
        Returns additional paths to DocBook XML RefSect1 documents to be appended after generated content in reference documentation.
        DocBook represents a reference manual page with the RefEntry. See refentry.
        A RefEntry describing an OpenDJ tool contains block elements in the following order:
             RefMeta
             RefNameDiv
             RefSynopsisDiv
             RefSect1 - Description (generated, potentially with a hand-written supplement)
             RefSect1 - Options (generated)
             RefSect1 - Subcommands (optional, hand-written intro + generated RefSect2s)
             RefSect1 - Filter (optional, hand-written)
             RefSect1 - Attribute (optional, hand-written)
             RefSect1 - Exit Codes (hand-written)
             RefSect1 - Files (optional, hand-written)
             RefSect1 - Examples (hand-written)
             RefSect1 - See Also (hand-written)
         
        As the trailing RefSect1s following Subcommands are hand-written, they are included in the generated content as XIncludes elements. The paths in this case are therefore relative to the current RefEntry.
        Returns:
        The relative paths to trailing section files.
      • setTrailingSectionPaths

        public void setTrailingSectionPaths​(List<String> paths)
        Set additional paths to DocBook XML RefSect1 documents.
        Parameters:
        paths - The paths relative to the current RefEntry.
      • isEnabled

        public boolean isEnabled()
        Returns true if the tool is enabled.
        Returns:
        true if the tool is enabled.
      • setEnabled

        public void setEnabled​(boolean enabled)
        Set to true if the tool is enabled, false otherwise.
        Parameters:
        enabled - true if the tool is enabled, false otherwise.