public abstract class BaseInterpreter
extends org.springframework.extensions.surf.util.AbstractLifecycleBean
| Modifier and Type | Field and Description |
|---|---|
protected AuthorityService |
authorityService |
protected java.lang.String |
lastCommand
Last command issued
|
protected TransactionService |
transactionService |
| Constructor and Description |
|---|
BaseInterpreter()
Make up a new console.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.lang.String |
executeCommand(java.lang.String line)
Execute a single command using the BufferedReader passed in for any data needed.
|
static BaseInterpreter |
getConsoleBean(org.springframework.context.ApplicationContext context,
java.lang.String beanName) |
java.lang.String |
getCurrentUserName()
Get current user name
|
protected boolean |
hasAuthority(java.lang.String username) |
java.lang.String |
interpretCommand(java.lang.String line)
Interpret a single command using the BufferedReader passed in for any data needed.
|
protected void |
onBootstrap(org.springframework.context.ApplicationEvent event) |
protected void |
onShutdown(org.springframework.context.ApplicationEvent event) |
void |
rep()
A Read-Eval-Print loop.
|
static void |
runMain(org.springframework.context.ApplicationContext context,
java.lang.String beanName) |
static void |
runMain(java.lang.String beanName) |
void |
setAuthorityService(AuthorityService authorityService) |
void |
setCurrentUserName(java.lang.String username) |
void |
setTransactionService(TransactionService transactionService) |
protected TransactionService transactionService
protected AuthorityService authorityService
protected java.lang.String lastCommand
public static void runMain(java.lang.String beanName)
public static void runMain(org.springframework.context.ApplicationContext context,
java.lang.String beanName)
public static BaseInterpreter getConsoleBean(org.springframework.context.ApplicationContext context, java.lang.String beanName)
public void setTransactionService(TransactionService transactionService)
public void setAuthorityService(AuthorityService authorityService)
public void rep()
public java.lang.String interpretCommand(java.lang.String line)
throws java.io.IOException
line - The unparsed commandjava.io.IOExceptionprotected boolean hasAuthority(java.lang.String username)
protected abstract java.lang.String executeCommand(java.lang.String line)
throws java.io.IOException
line - The unparsed commandjava.io.IOExceptionpublic java.lang.String getCurrentUserName()
public void setCurrentUserName(java.lang.String username)
protected void onBootstrap(org.springframework.context.ApplicationEvent event)
onBootstrap in class org.springframework.extensions.surf.util.AbstractLifecycleBeanprotected void onShutdown(org.springframework.context.ApplicationEvent event)
onShutdown in class org.springframework.extensions.surf.util.AbstractLifecycleBeanCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.