Package org.appng.cli

Class CliEnvironment


  • public class CliEnvironment
    extends Object
    Holds informations about the environment when executing ExecutableCliCommands.
    Author:
    Matthias Herlitzius
    • Constructor Detail

      • CliEnvironment

        public CliEnvironment​(org.springframework.context.ApplicationContext platformContext,
                              Properties cliConfig)
        Creates a new CliEnvironment.
        Parameters:
        platformContext - the ApplicationContext used
        cliConfig - 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
      • setResult

        public void setResult​(String result)
        Sets the result of a ExecutableCliCommand-execution, which is a string to output on the console.
        Parameters:
        result - the result to set
      • getResult

        public String getResult()
        Retrieves the result of a ExecutableCliCommand-execution, which is a string to output on the console.
      • getContext

        public org.springframework.context.ApplicationContext getContext()
        Retrieves the ApplicationContext.
        Returns:
        the ApplicationContext
      • getMessageSource

        public org.springframework.context.MessageSource getMessageSource()