Package org.appng.cli
Class CliEnvironment
- java.lang.Object
-
- org.appng.cli.CliEnvironment
-
public class CliEnvironment extends Object
Holds informations about the environment when executingExecutableCliCommand
s.- Author:
- Matthias Herlitzius
-
-
Field Summary
Fields Modifier and Type Field Description static PrintStream
out
-
Constructor Summary
Constructors Constructor Description CliEnvironment(org.springframework.context.ApplicationContext platformContext, Properties cliConfig)
Creates a newCliEnvironment
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Properties
getCliConfig()
Retrieves the cli configurationorg.springframework.context.ApplicationContext
getContext()
Retrieves theApplicationContext
.CoreService
getCoreService()
Retrieves aCoreService
from theApplicationContext
.org.springframework.context.MessageSource
getMessageSource()
Properties
getPlatformConfig()
Returns the appNG platform configuration.String
getResult()
Retrieves the result of aExecutableCliCommand
-execution, which is a string to output on the console.void
initPlatform(Properties defaultOverrides)
Initialized the appNG platform.void
setResult(String result)
Sets the result of aExecutableCliCommand
-execution, which is a string to output on the console.
-
-
-
Field Detail
-
out
public static PrintStream out
-
-
Constructor Detail
-
CliEnvironment
public CliEnvironment(org.springframework.context.ApplicationContext platformContext, Properties cliConfig)
Creates a newCliEnvironment
.- Parameters:
platformContext
- theApplicationContext
usedcliConfig
- the configuration read from "/conf/appNG.properties"
-
-
Method Detail
-
initPlatform
public void initPlatform(Properties defaultOverrides)
Initialized the appNG platform.
-
getPlatformConfig
public Properties getPlatformConfig()
Returns the appNG platform configuration.- Returns:
- the appNG platform configuration
-
getCoreService
public CoreService getCoreService()
Retrieves aCoreService
from theApplicationContext
.- Returns:
- the
CoreService
-
setResult
public void setResult(String result)
Sets the result of aExecutableCliCommand
-execution, which is a string to output on the console.- Parameters:
result
- the result to set
-
getResult
public String getResult()
Retrieves the result of aExecutableCliCommand
-execution, which is a string to output on the console.
-
getContext
public org.springframework.context.ApplicationContext getContext()
Retrieves theApplicationContext
.- Returns:
- the
ApplicationContext
-
getCliConfig
public Properties getCliConfig()
Retrieves the cli configuration- Returns:
- the configuration read from "/conf/appNG.properties"
-
getMessageSource
public org.springframework.context.MessageSource getMessageSource()
-
-