Package net.simplace.core.service
Klasse FileExecuteHelper
java.lang.Object
net.simplace.core.service.FileExecuteHelper
This Class runs a extern Application with a certain document/file
from wich the Filename is given.
- Autor:
- Andreas Enders
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic StringexecuteApplication(String aAppName, File aWorkingDir) Invokes an executable.static ProcessexecuteExecutable(String aWholePathAndProgName) Calls the executable.static ProcessexecuteFile(File aFile) Opens the file in the registered applicationstatic ProcessexecuteFile(String aFileName) executes a file returning the Process-Object for excepion-case null is returnedstatic ProcessexecuteFileExtern(File aFile) Opens the file in the registered system-application.static ProcessexecuteFileExtern(File aFile, boolean aCreateTemporaryCopy) Opens the file in the registered system-application.static ProcessexecuteFileExtern(String aFile) Opens the file in the registered system-application.static voidexecuteScript(String aPath, String aExecutableName, String aParameterString) static voidnewMailInStandardClient(List<String> aToAddrsList, String aSubject, String aBody, String aAttachementPath) Opens the standard E-Mail-Client.static voidshowInExternalBrowser(String aURL, boolean aNewWindows)
-
Konstruktordetails
-
FileExecuteHelper
public FileExecuteHelper()
-
-
Methodendetails
-
showInExternalBrowser
public static void showInExternalBrowser(String aURL, boolean aNewWindows) throws edu.stanford.ejalbert.exception.BrowserLaunchingInitializingException, edu.stanford.ejalbert.exception.UnsupportedOperatingSystemException - Parameter:
aURL-aNewWindows-- Löst aus:
edu.stanford.ejalbert.exception.BrowserLaunchingInitializingExceptionedu.stanford.ejalbert.exception.UnsupportedOperatingSystemException
-
executeFile
Opens the file in the registered application- Parameter:
aFile-- Gibt zurück:
- opened file Process
- Löst aus:
ExecutionException
-
executeFile
executes a file returning the Process-Object for excepion-case null is returned- Parameter:
aFileName-- Gibt zurück:
- opened file Process or null for excepion-case
-
executeFileExtern
Opens the file in the registered system-application. CAVEAT: Changes to this method must be tested against all supportet Windows-Versions.- Parameter:
aFile-- Gibt zurück:
- opened file Process
- Löst aus:
ExecutionException
-
executeFileExtern
Opens the file in the registered system-application. CAVEAT: Changes to this method must be tested against all supportet Windows-Versions.- Parameter:
aFile-- Gibt zurück:
- opened file Process
- Löst aus:
ExecutionException
-
executeFileExtern
public static Process executeFileExtern(File aFile, boolean aCreateTemporaryCopy) throws ExecutionException Opens the file in the registered system-application.- Parameter:
aFile-aCreateTemporaryCopy- - If true, a copy of the file to be executed will be created and the copy will be executed. This can be done to prevent certain documents from being edited, i. e. offer documents. CAVEAT: Changes to this method must be tested against all supportet Windows-Versions.- Gibt zurück:
- opened file Process
- Löst aus:
ExecutionException
-
executeExecutable
Calls the executable.- Parameter:
aWholePathAndProgName-- Gibt zurück:
- executing file Process
-
executeApplication
Invokes an executable. Returns stdout as String.- Parameter:
aAppName-aWorkingDir-- Gibt zurück:
- stdout as String
- Löst aus:
IOException
-
executeScript
public static void executeScript(String aPath, String aExecutableName, String aParameterString) throws ExecutionException - Parameter:
aPath-aExecutableName-aParameterString-- Löst aus:
ExecutionException
-
newMailInStandardClient
public static void newMailInStandardClient(List<String> aToAddrsList, String aSubject, String aBody, String aAttachementPath) throws IOException Opens the standard E-Mail-Client.- Parameter:
aToAddrsList- List of Strings with valid E-Mail-adresses.aSubject-aBody-aAttachementPath-- Löst aus:
IOException
-