Class 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.
Author:
Andreas Enders
  • Constructor Details

    • FileExecuteHelper

      public FileExecuteHelper()
  • Method Details

    • showInExternalBrowser

      public static void showInExternalBrowser(String aURL, boolean aNewWindows) throws edu.stanford.ejalbert.exception.BrowserLaunchingInitializingException, edu.stanford.ejalbert.exception.UnsupportedOperatingSystemException
      Parameters:
      aURL -
      aNewWindows -
      Throws:
      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
      Parameters:
      aFile -
      Returns:
      opened file Process
      Throws:
      ExecutionException
    • executeFile

      public static Process executeFile(String aFileName)
      executes a file returning the Process-Object for excepion-case null is returned
      Parameters:
      aFileName -
      Returns:
      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.
      Parameters:
      aFile -
      Returns:
      opened file Process
      Throws:
      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.
      Parameters:
      aFile -
      Returns:
      opened file Process
      Throws:
      ExecutionException
    • executeFileExtern

      public static Process executeFileExtern(File aFile, boolean aCreateTemporaryCopy) throws ExecutionException
      Opens the file in the registered system-application.
      Parameters:
      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.
      Returns:
      opened file Process
      Throws:
      ExecutionException
    • executeExecutable

      public static Process executeExecutable(String aWholePathAndProgName)
      Calls the executable.
      Parameters:
      aWholePathAndProgName -
      Returns:
      executing file Process
    • executeApplication

      public static String executeApplication(String aAppName, File aWorkingDir) throws IOException
      Invokes an executable. Returns stdout as String.
      Parameters:
      aAppName -
      aWorkingDir -
      Returns:
      stdout as String
      Throws:
      IOException
    • executeScript

      public static void executeScript(String aPath, String aExecutableName, String aParameterString) throws ExecutionException
      Parameters:
      aPath -
      aExecutableName -
      aParameterString -
      Throws:
      ExecutionException
    • newMailInStandardClient

      public static void newMailInStandardClient(List<String> aToAddrsList, String aSubject, String aBody, String aAttachementPath) throws IOException
      Opens the standard E-Mail-Client.
      Parameters:
      aToAddrsList - List of Strings with valid E-Mail-adresses.
      aSubject -
      aBody -
      aAttachementPath -
      Throws:
      IOException