Klasse FileExecuteHelper

java.lang.Object
net.simplace.core.service.FileExecuteHelper

public class FileExecuteHelper extends Object
This Class runs a extern Application with a certain document/file from wich the Filename is given.
Autor:
Andreas Enders
  • 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.BrowserLaunchingInitializingException
      edu.stanford.ejalbert.exception.UnsupportedOperatingSystemException
    • executeFile

      public static Process executeFile(File aFile) throws ExecutionException
      Opens the file in the registered application
      Parameter:
      aFile -
      Gibt zurück:
      opened file Process
      Löst aus:
      ExecutionException
    • executeFile

      public static Process executeFile(String aFileName)
      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

      public static Process executeFileExtern(File aFile) throws ExecutionException
      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(String aFile) throws ExecutionException
      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

      public static Process executeExecutable(String aWholePathAndProgName)
      Calls the executable.
      Parameter:
      aWholePathAndProgName -
      Gibt zurück:
      executing file Process
    • executeApplication

      public static String executeApplication(String aAppName, File aWorkingDir) throws IOException
      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