mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fix main entry point for the interpreters
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6816 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -65,24 +65,25 @@ public abstract class BaseInterpreter extends AbstractLifecycleBean
|
||||
*/
|
||||
protected String lastCommand = null;
|
||||
|
||||
|
||||
/**
|
||||
* Main entry point.
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
|
||||
public static void runMain(String beanName)
|
||||
{
|
||||
ApplicationContext context = ApplicationContextHelper.getApplicationContext();
|
||||
|
||||
BaseInterpreter console = getConsoleBean(context);
|
||||
runMain(context, beanName);
|
||||
}
|
||||
|
||||
public static void runMain(ApplicationContext context, String beanName)
|
||||
{
|
||||
BaseInterpreter console = getConsoleBean(context, beanName);
|
||||
|
||||
console.username = DEFAULT_ADMIN;
|
||||
console.rep();
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
public static BaseInterpreter getConsoleBean(ApplicationContext context)
|
||||
public static BaseInterpreter getConsoleBean(ApplicationContext context, String beanName)
|
||||
{
|
||||
return null;
|
||||
return (BaseInterpreter)context.getBean(beanName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user