|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.as400.util.CommandHelpRetriever
Utility class for generating IBM-formatted CL command help documentation. This class requires that valid XML and XSL processors (e.g. Xerces and Xalan) be in the CLASSPATH. CommandHelpRetriever can be run as a command line program, as follows:
java com.ibm.as400.util.CommandHelpRetriever -libraryOptions:-command [ -system -userid -password -showChoicePgmValues -output -debug ]
-help
Parameters:
-library
iSeries library.-l
or -lib
.
-command
iSeries command.-c
or -cmd
.
-system
iSeries system name-s
or -sys
.
-userid
iSeries userId.-u
or -uid
.
-password
iSeries password.-p
or -pwd
.
-showChoicePgmValues
[true | false] -scpv
.
-output
output location.
-o
.
-debug
[true | false]
-d
.
Command
,
CommandList
Constructor Summary | |
---|---|
CommandHelpRetriever()
Constructs an instance of the CommandHelpRetriever utility. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CommandHelpRetriever()
Method Detail |
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()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |