public abstract class BaseInterpreter
extends org.springframework.extensions.surf.util.AbstractLifecycleBean
Modifier and Type | Field and Description |
---|---|
protected AuthorityService |
authorityService |
protected 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 String |
executeCommand(String line)
Execute a single command using the BufferedReader passed in for any data needed.
|
static BaseInterpreter |
getConsoleBean(org.springframework.context.ApplicationContext context,
String beanName) |
String |
getCurrentUserName()
Get current user name
|
protected boolean |
hasAuthority(String username) |
String |
interpretCommand(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,
String beanName) |
static void |
runMain(String beanName) |
void |
setAuthorityService(AuthorityService authorityService) |
void |
setCurrentUserName(String username) |
void |
setTransactionService(TransactionService transactionService) |
protected TransactionService transactionService
protected AuthorityService authorityService
protected String lastCommand
public static void runMain(String beanName)
public static void runMain(org.springframework.context.ApplicationContext context, String beanName)
public static BaseInterpreter getConsoleBean(org.springframework.context.ApplicationContext context, String beanName)
public void setTransactionService(TransactionService transactionService)
public void setAuthorityService(AuthorityService authorityService)
public void rep()
public String interpretCommand(String line) throws IOException
line
- The unparsed commandIOException
protected boolean hasAuthority(String username)
protected abstract String executeCommand(String line) throws IOException
line
- The unparsed commandIOException
public String getCurrentUserName()
public void setCurrentUserName(String username)
protected void onBootstrap(org.springframework.context.ApplicationEvent event)
onBootstrap
in class org.springframework.extensions.surf.util.AbstractLifecycleBean
protected void onShutdown(org.springframework.context.ApplicationEvent event)
onShutdown
in class org.springframework.extensions.surf.util.AbstractLifecycleBean
Copyright © 2005–2017 Alfresco Software. All rights reserved.