SHL-23 - Create docbook based reference guide
This commit is contained in:
@@ -100,7 +100,8 @@ public class HelloWorldCommands implements CommandMarker {
|
||||
@CliCommand(value = "hw simple", help = "Print a simple hello world message")
|
||||
public void simple(
|
||||
@CliOption(key = { "message" }, mandatory = true, help = "The hello world message") final String message,
|
||||
@CliOption(key = { "location" }, mandatory = false, help = "Where you are saying hello", specifiedDefaultValue="At work") final String location) {
|
||||
@CliOption(key = { "location" }, mandatory = false, help = "Where you are saying hello", specifiedDefaultValue="At work")
|
||||
final String location) {
|
||||
|
||||
LOG.info("Message = [" + message + "] Location = [" + location + "]");
|
||||
|
||||
@@ -126,13 +127,14 @@ public class HelloWorldCommands implements CommandMarker {
|
||||
key message is required and a help message is provided to give guidance to
|
||||
the user when tabbing to get completion for the command. </para>
|
||||
|
||||
<para>The implementation of the 'simple' method is trivial, just a log
|
||||
statement, but this is where you would typically call other collaborating
|
||||
objects that were injected into the class via Spring.</para>
|
||||
<para>The implementation of the '<methodname>simple</methodname>' method
|
||||
is trivial, just a log statement, but this is where you would typically
|
||||
call other collaborating objects that were injected into the class via
|
||||
Spring.</para>
|
||||
|
||||
<para>The method argument types in this example are
|
||||
<classname>String</classname>, which doesn't present any issue with type
|
||||
conversion. You can specify methods with any rich object type including
|
||||
conversion. You can specify methods with any rich object type as well as
|
||||
basic primitive types such as int, float etc. For all types other than
|
||||
those handled by the shell by default (basic types,
|
||||
<classname>Date</classname>, <classname>File</classname>) you will need to
|
||||
|
||||
@@ -209,31 +209,31 @@ public class HelloWorldCommands implements CommandMarker {
|
||||
|
||||
<programlisting>public interface ExecutionProcessor extends CommandMarker {
|
||||
|
||||
/**
|
||||
* Method called before invoking the target command (described by {@link ParseResult}).
|
||||
* Additionally, for advanced cases, the parse result itself effectively changing the invocation
|
||||
* calling site.
|
||||
*
|
||||
* @param invocationContext target command context
|
||||
* @return the invocation target
|
||||
*/
|
||||
ParseResult beforeInvocation(ParseResult invocationContext);
|
||||
/**
|
||||
* Method called before invoking the target command (described by {@link ParseResult}).
|
||||
* Additionally, for advanced cases, the parse result itself effectively changing the invocation
|
||||
* calling site.
|
||||
*
|
||||
* @param invocationContext target command context
|
||||
* @return the invocation target
|
||||
*/
|
||||
ParseResult beforeInvocation(ParseResult invocationContext);
|
||||
|
||||
/**
|
||||
* Method called after successfully invoking the target command (described by {@link ParseResult}).
|
||||
*
|
||||
* @param invocationContext target command context
|
||||
* @param result the invocation result
|
||||
*/
|
||||
void afterReturningInvocation(ParseResult invocationContext, Object result);
|
||||
/**
|
||||
* Method called after successfully invoking the target command (described by {@link ParseResult}).
|
||||
*
|
||||
* @param invocationContext target command context
|
||||
* @param result the invocation result
|
||||
*/
|
||||
void afterReturningInvocation(ParseResult invocationContext, Object result);
|
||||
|
||||
/**
|
||||
* Method called after invoking the target command (described by {@link ParseResult}) had thrown an exception .
|
||||
*
|
||||
* @param invocationContext target command context
|
||||
* @param thrown the thrown object
|
||||
*/
|
||||
void afterThrowingInvocation(ParseResult invocationContext, Throwable thrown);
|
||||
/**
|
||||
* Method called after invoking the target command (described by {@link ParseResult}) had thrown an exception .
|
||||
*
|
||||
* @param invocationContext target command context
|
||||
* @param thrown the thrown object
|
||||
*/
|
||||
void afterThrowingInvocation(ParseResult invocationContext, Throwable thrown);
|
||||
|
||||
}</programlisting>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user