public class CommandHelpRetriever extends Object
Options:java com.ibm.as400.util.CommandHelpRetriever -library <library> -command <command> [ -system <systemName> -userid <userid> -password <password> -showChoicePgmValues -output <outputDirectory> -debug ]
-help
Parameters:
-library
IBM i library.-l
or -lib
.
-command
IBM i command.-c
or -cmd
.
-system
IBM i system name-s
or -sys
.
-userid
IBM i userID.-u
or -uid
.
-password
IBM i password.-p
or -pwd
.
-showChoicePgmValues
[true | false] -scpv
.
-output
output location.
-o
.
-debug
[true | false]
-d
.
Command
,
CommandList
Constructor | Description |
---|---|
CommandHelpRetriever() |
Constructs an instance of the CommandHelpRetriever utility.
|
Modifier and Type | Method | Description |
---|---|---|
String |
generateHTML(Command command) |
Generates IBM-formatted command help documentation for the specified CL command.
|
String |
generateHTML(Command command,
PanelGroup panelGroup) |
Generates IBM-formatted command help documentation for the specified CL command.
|
byte[] |
generateHTMLBytes(Command command,
PanelGroup panelGroup) |
Generates IBM-formatted command help documentation for the specified CL command.
|
String |
generateUIM(Command command) |
Generates an IBM-formatted UIM template for the specified CL command.
|
boolean |
getDebug() |
Returns whether or not the source XML and source command HTML help, which are used in
generating the resulting command help HTML documentation, are saved to the current output location.
|
String |
getOutputLocation() |
Returns the output location for the source XML and source command HTML help when running programatically.
|
boolean |
getShowChoiceProgramValues() |
Returns whether or not the generated HTML documentation will contain parameter values
returned by a "choices program".
|
static void |
main(String[] args) |
Performs the actions specified in the invocation arguments.
|
void |
setDebug(boolean debug) |
Sets whether or not the source XML and source command HTML help, which are used in
generating the resulting command help HTML documentation, are saved to the current output location.
|
void |
setOutputLocation(String location) |
Sets the output location for the source XML and source command HTML help when running programatically.
|
void |
setShowChoiceProgramValues(boolean show) |
Sets whether or not parameter values returned by a "choices program" will be generated
as part of the HTML documentation.
|
public CommandHelpRetriever()
public static void main(String[] args)
args
- The command line arguments.public String generateHTML(Command command) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException, SAXException, ParserConfigurationException, TransformerConfigurationException, TransformerException
Locale
specified on the AS400
object for the given Command
.
Note: While the String being returned is a typical UTF-16 Java String, the contents
of the String is an HTML file with a META tag that defines the charset as UTF-8.
Applications that use the String returned by this method should then be sure to convert
the contents to UTF-8 bytes, or replace the charset tag inside the HTML with whichever
encoding the application chooses to convert to. See generateHTMLBytes()
.
command
- The command.AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
SAXException
ParserConfigurationException
TransformerConfigurationException
TransformerException
Locale
,
AS400
,
Command
public String generateHTML(Command command, PanelGroup panelGroup) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException, SAXException, ParserConfigurationException, TransformerConfigurationException, TransformerException
Locale
specified on the AS400
object for the given Command
.
Note: While the String being returned is a typical UTF-16 Java String, the contents
of the String is an HTML file with a META tag that defines the charset as UTF-8.
Applications that use the String returned by this method should then be sure to convert
the contents to UTF-8 bytes, or replace the charset tag inside the HTML with whichever
encoding the application chooses to convert to. See generateHTMLBytes()
.
command
- The command.panelGroup
- The panel group used to generate the help text, instead of the Command's defined panel group.AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
SAXException
ParserConfigurationException
TransformerConfigurationException
TransformerException
Locale
,
AS400
,
Command
,
PanelGroup
public byte[] generateHTMLBytes(Command command, PanelGroup panelGroup) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException, SAXException, ParserConfigurationException, TransformerConfigurationException, TransformerException
Locale
specified on the AS400
object for the given Command
.
Note: The byte array returned by this method has already been encoded in UTF-8 in order to match the charset tag within the HTML document.
command
- The command.panelGroup
- The panel group used to generate the help text. Specify null to use the Command's defined panel group.AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
SAXException
ParserConfigurationException
TransformerConfigurationException
TransformerException
Locale
,
AS400
,
Command
,
PanelGroup
public String generateUIM(Command command) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException, SAXException, ParserConfigurationException, TransformerConfigurationException, TransformerException
Locale
specified on the AS400
object for the given Command
.command
- The command.AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
SAXException
ParserConfigurationException
TransformerConfigurationException
TransformerException
Locale
,
AS400
,
Command
public boolean getDebug()
setDebug(boolean)
public String getOutputLocation()
setOutputLocation(java.lang.String)
public boolean getShowChoiceProgramValues()
setShowChoiceProgramValues(boolean)
public void setDebug(boolean debug)
debug
- true if the source XML and source HTML files will be generated; false otherwise. The default is false.getDebug()
public void setOutputLocation(String location)
location
- The output location of the source files.getOutputLocation()
public void setShowChoiceProgramValues(boolean show)
show
- true to show the extra parameter values; false otherwise. The default
value is false.getShowChoiceProgramValues()
Copyright © 2024. All rights reserved.