Package com.aspectran.shell.service
Interface ShellService
- All Superinterfaces:
CoreService
- All Known Implementing Classes:
AbstractShellService
,DefaultShellService
The Interface ShellService.
Created: 2017. 10. 28.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the greeting message.boolean
isExposable
(String transletName) Returns whether the translet can be exposed to the shell service.boolean
Tests if the verbose mode is enabled.Create and return a new session adapter from the shell service.void
Prints greeting message.void
Prints help information.void
setGreetings
(String greetings) Specifies the greeting message.void
setVerbose
(boolean verbose) Enables or disables the verbose mode.translate
(TransletCommandLine transletCommandLine) Executes translet.Methods inherited from interface com.aspectran.core.service.CoreService
getActivityContext, getAltClassLoader, getAspectranConfig, getBasePath, getDefaultActivity, getSchedulerService, getServiceClassLoader, getServiceController, hasServiceClassLoader, isDerived, isHardReload, isLateStart, joinDerivedService, leaveFromRootService, withdrawDerivedService
-
Method Details
-
getConsole
ShellConsole getConsole() -
isVerbose
boolean isVerbose()Tests if the verbose mode is enabled. If verbose mode is on, a detailed description is printed each time the command is executed. Returns a flag indicating whether to show the description or not.- Returns:
- true if the verbose mode is enabled
-
setVerbose
void setVerbose(boolean verbose) Enables or disables the verbose mode. If verbose mode is on, a detailed description is printed each time the command is executed. Sets a flag indicating whether to show the description or not.- Parameters:
verbose
- true to enable the verbose mode; false to disable
-
getGreetings
String getGreetings()Returns the greeting message.- Returns:
- the greeting message
-
setGreetings
Specifies the greeting message.- Parameters:
greetings
- the greeting message
-
printGreetings
void printGreetings()Prints greeting message. -
printHelp
void printHelp()Prints help information. -
isExposable
Returns whether the translet can be exposed to the shell service.- Parameters:
transletName
- the name of the translet to check- Returns:
- true if the translet can be exposed; false otherwise
-
newSessionAdapter
SessionAdapter newSessionAdapter()Create and return a new session adapter from the shell service.- Returns:
- the session adapter
-
translate
Executes translet.- Parameters:
transletCommandLine
- the translet command line- Returns:
- the
Translet
instance - Throws:
TransletNotFoundException
-