public abstract class CDOCommand extends Factory
Modifier and Type | Class and Description |
---|---|
static class |
CDOCommand.CommandException |
static class |
CDOCommand.CommandParameter |
static class |
CDOCommand.WithAccessor |
static class |
CDOCommand.WithRepository |
Modifier and Type | Field and Description |
---|---|
static String |
INDENT |
static String |
PRODUCT_GROUP |
Constructor and Description |
---|
CDOCommand(String name,
String description) |
CDOCommand(String name,
String description,
CDOCommand.CommandParameter... parameters) |
Modifier and Type | Method and Description |
---|---|
CDOCommand |
create(String description) |
void |
execute() |
abstract void |
execute(String[] args) |
Object |
executeCommand(String cmd) |
String |
getDescription() |
CommandInterpreter |
getInterpreter() |
String |
getName() |
CDOCommand.CommandParameter[] |
getParameters() |
String |
getSyntax() |
static CDOCommand.CommandParameter |
optional(String name) |
static CDOCommand.CommandParameter |
parameter(String name) |
static CDOCommand.CommandParameter |
parameter(String name,
boolean optional) |
static CDOCommand.CommandParameter[] |
parameters(CDOCommand.CommandParameter parameter,
CDOCommand.CommandParameter[] parameters) |
void |
print(Object o) |
void |
printBundleResource(org.osgi.framework.Bundle bundle,
String resource) |
void |
printDictionary(Dictionary<?,?> dic,
String title) |
void |
println() |
void |
println(Object o) |
void |
printStackTrace(Throwable t) |
void |
setInterpreter(CommandInterpreter interpreter) |
protected static String[] |
trimFirstArgument(String[] args) |
getDescriptionFor, getKey, getProductGroup, getType, toString
public static final String PRODUCT_GROUP
public static final String INDENT
public CDOCommand(String name, String description, CDOCommand.CommandParameter... parameters)
public final CDOCommand create(String description) throws ProductCreationException
ProductCreationException
public final CommandInterpreter getInterpreter()
public final void setInterpreter(CommandInterpreter interpreter)
public final String getName()
public final String getDescription()
public final CDOCommand.CommandParameter[] getParameters()
public final String getSyntax()
public final void print(Object o)
public final void println()
public final void println(Object o)
public final void printStackTrace(Throwable t)
public final void printDictionary(Dictionary<?,?> dic, String title)
public final void printBundleResource(org.osgi.framework.Bundle bundle, String resource)
public static CDOCommand.CommandParameter[] parameters(CDOCommand.CommandParameter parameter, CDOCommand.CommandParameter[] parameters)
public static CDOCommand.CommandParameter parameter(String name, boolean optional)
public static CDOCommand.CommandParameter parameter(String name)
public static CDOCommand.CommandParameter optional(String name)
Copyright (c) 2011-2014 Eike Stepper (Berlin, Germany) and others.