public final class CommandProcessor
extends java.lang.Object
| Constructor and Description |
|---|
CommandProcessor()
Creates a new Command Processor, ready for execution
|
CommandProcessor(Folder fldr)
Create a Command Processor, ready for execution on a given view's foder
|
CommandProcessor(Server s)
Create a Command Processor, ready for execution on a given server This
constructor is appropriate for client integrations that use
meta data queries
|
CommandProcessor(View vw)
Create a Command Processor, ready for execution on a given view This
constructor is appropriate for client integrations that use the 'select'
statement to provide form based report generation
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(CommandProcessorListener listener)
adds a CommandProcessor event listener to this command processor instance
Relevant events will be fired through this interface
|
static boolean |
canParse(java.lang.String command)
Returns true if the specified command can be parsed by this processor
|
boolean |
canReturnHeader()
Returns true if this Command can return a header along with the results
false if this command will never return a header (whether or not it
returns results)
|
boolean |
canReturnResults()
Returns true if this Command can return a result set of 0 or more rows
false if this command will never return any results.
|
java.lang.String[][] |
execute(java.lang.String command)
Executes a command Throws an SDKRuntime exception if the command
execution fails The error message will indicate the reason for failure.
|
java.lang.String[] |
getExecutedCommands()
Returns the LIFO set of all commands executed by this processor.
|
Folder |
getFolder()
Returns the folder within which this command processor is executing
commands, null if not yet connected to a view Applications may register
for supported events on this instance
|
Project |
getProject()
Returns the project within which this command processor is executing
commands, null if not yet connected to a project Applications may
register for supported events on this instance
|
Server |
getServer()
Returns the server against which this command processor is executing
commands, null if not yet connected to a server Applications may register
for supported events on this instance
|
View |
getView()
Returns the view within which this command processor is executing
commands, null if not yet connected to a view Applications may register
for supported events on this instance
|
java.lang.String[] |
parse(java.lang.String command)
Parses the command.
|
java.lang.String |
toString()
Returns the command currently being executed
|
public CommandProcessor()
public CommandProcessor(View vw)
vw - the view in whose context the processor will runpublic CommandProcessor(Server s)
s - the server in whose context the processor will runpublic CommandProcessor(Folder fldr)
fldr - the folder in whose context the processor will runpublic static boolean canParse(java.lang.String command)
command - the command to be parsedpublic Server getServer()
public Project getProject()
public View getView()
public Folder getFolder()
public boolean canReturnResults()
public boolean canReturnHeader()
public java.lang.String[] parse(java.lang.String command)
command - the command whose syntax needs to be validatedpublic java.lang.String[][] execute(java.lang.String command)
command - the command to executepublic java.lang.String[] getExecutedCommands()
public void addListener(CommandProcessorListener listener)
listener - the listener through which events will be firedpublic java.lang.String toString()
toString in class java.lang.ObjectStarTeam SDK 17.0, Build 34
Copyright © 2019 Micro Focus or one of its affiliates. All rights reserved.