/** * Erzeugt eine Instanz fuer Konfiguration ueber Kommadozeilenparameter. * * @param logging - Logging ein oder ausgeschaltet * @param severity - Schweregrad der Meldungen die geloggt werden soll, <code>null</code> wenn * logging = <code>false</code> * @param commands - Liste von Kommandos die die Umgebung starten. * @return Das {@link IEnvironmentConfiguration}-Objekt fuer Kommandozeilenkonfiguration * @throws NullPointerException - wenn commandos == <code>null</code> */ public static IEnvironmentConfiguration instanceofNonExecutable( final boolean logging, final TLogSeverity severity, final List<String> commands) { EnvironmentConfiguration config = new EnvironmentConfiguration(logging, severity); config.fCommands = Collections.unmodifiableList(new ArrayList<String>(commands)); config.fExecutable = false; return config; }
/** * Erzeugt eine Instanz fuer die Konfiguration ueber eine ausfuherbare Datei. * * @param logging - Logging ein oder ausgeschaltet * @param severity - Schweregrad der Meldungen die geloggt werden soll, <code>null</code> wenn * logging = <code>false</code> * @param executableFile - Die ausfuehrbare Datei, als {@link File}-Objekt * @param params - Optionale Parameter fuer die Executable * @return Das {@link IEnvironmentConfiguration}-Objekt fuer Konfiguration ueber ausfuehrbare * Datei */ public static IEnvironmentConfiguration instanceOfExecutable( final boolean logging, final TLogSeverity severity, final File executableFile, final List<String> params) { EnvironmentConfiguration config = new EnvironmentConfiguration(logging, severity); config.fExecutableFile = executableFile; config.fExecutable = true; if (params == null) { config.fCommands = Collections.emptyList(); } else { config.fCommands = Collections.unmodifiableList(new ArrayList<String>(params)); } return config; }
/** * Liefert die (Singleton)-Instanz fuer eine Extern-Konfiguration. * * @return Das {@link IEnvironmentConfiguration}-Objekt fuer externe Konfiguration */ public static IEnvironmentConfiguration instanceOfExtern() { if (externInstance == null) { externInstance = new EnvironmentConfiguration(false, null); externInstance.fExtern = true; } return externInstance; }