public abstract class Tool extends Object
| Constructor and Description |
|---|
Tool() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
displayHelp()
Display Tool Help
|
protected abstract int |
execute()
Perform Tool Behaviour
|
protected void |
exit(int status)
Exit Tool
|
protected org.springframework.context.ApplicationContext |
getApplicationContext()
Get the Application Context
|
protected ServiceRegistry |
getServiceRegistry()
Get the Repository Service Registry
|
protected abstract String |
getToolName()
Get the tool name
|
protected int |
handleError(Throwable e)
Handle Error Message
|
protected void |
logError(String msg)
Log Error message
|
protected void |
logInfo(String msg)
Log message
|
protected void |
logVerbose(String msg)
Log Verbose message
|
protected org.alfresco.tools.ToolContext |
processArgs(String[] args)
Process Tool Arguments
|
void |
start(String[] args)
Tool entry point
|
protected org.alfresco.tools.ToolContext processArgs(String[] args) throws org.alfresco.tools.ToolArgumentException
args - the argumentsToolExceptionorg.alfresco.tools.ToolArgumentExceptionprotected void displayHelp()
protected abstract int execute()
throws ToolException
ToolExceptionprotected abstract String getToolName()
protected void logInfo(String msg)
msg - message to logprotected void logVerbose(String msg)
msg - message to logprotected void logError(String msg)
msg - message to logprotected int handleError(Throwable e)
e - exceptionprotected void exit(int status)
status - status codeprotected final org.springframework.context.ApplicationContext getApplicationContext()
protected final ServiceRegistry getServiceRegistry()
public final void start(String[] args)
args - the tool argumentsCopyright © 2005–2018 Alfresco Software. All rights reserved.