private static class Test.DomainCU extends Test.BaseOperation
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
opName
the operation name
|
private java.util.function.Function<DomainData,Request> |
requestFactory
the request factory
|
private boolean |
withAuthInfo
flag whether authinfo is supported/required
|
Constructor and Description |
---|
DomainCU(java.lang.String name,
java.util.function.Function<DomainData,Request> factory,
boolean authInfo)
constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
return the name of the operation
|
Test.Command |
parse(Test.Arguments args,
java.io.PrintWriter pw)
create a command from the arguments; note that in case of errors,
no help shall be printed (i.e. call to
Test.Operation.printHelp(java.io.PrintWriter) |
protected Request |
parseData(Test.Arguments args,
java.io.PrintWriter pw)
parse the arguments
|
void |
printHelp(java.io.PrintWriter pw)
print the help for the operation; the output shall not exceed
80 characters per line
|
parseMultipleValueOption, parseSingleIntValueOption, parseSingleValueOption, printRepeatedOptionError
private java.lang.String opName
private boolean withAuthInfo
private java.util.function.Function<DomainData,Request> requestFactory
public DomainCU(java.lang.String name, java.util.function.Function<DomainData,Request> factory, boolean authInfo)
name
- the operation namefactory
- the factoryauthInfo
- true
if authinfo is supported/requiredprotected Request parseData(Test.Arguments args, java.io.PrintWriter pw)
args
- the argumentspw
- the print writer to use for error outputnull
in case of errorspublic java.lang.String getName()
public void printHelp(java.io.PrintWriter pw)
pw
- the print writer to usepublic Test.Command parse(Test.Arguments args, java.io.PrintWriter pw)
Test.Operation.printHelp(java.io.PrintWriter)
args
- the argumentspw
- the print writer to use for error outputnull
if the arguments
could not be parsedCopyright © 2005-2013 Knipp Medien und Kommunikation GmbH