edu.cmu.hcii.calo.util.CommandLauncher Class Reference

List of all members.

Detailed Description

Executes URLs, links, commands, file paths, etc.

This class is only partly documented because I didn't write it and have only an inkling about how it works. It was released into the public domain by the author in a forum post, but without much documentation.

Also, it uses Hungarian variable naming, which makes me want to stick a pickaxe through my head.

Author:
kvally74, whoever that is


Static Public Member Functions

static void exec (String sCommand)
 Executes the command passed.

Static Private Member Functions

static String getCompletePath (String sCommand)
 Gives the full path to execute.
static boolean isPossibleFile (String sFile)
 Checks whether the url starts with c: or similar.
static boolean isPossibleServerShare (String sCmd)
 Checks whether the url starts with server share like //server/dir*.
static boolean isPossibleURL (String sUrl)
 Checks whether the url starts with www.

Static Private Attributes

static Pattern pUrlPattern
static Pattern pServerSharePatern = Pattern.compile("^[\\\\//]")
static Pattern pFilePattern = Pattern.compile("^[A-Za-z\\\\//][:]")


Member Function Documentation

static void edu.cmu.hcii.calo.util.CommandLauncher.exec ( String  sCommand  )  [static]

Executes the command passed.

Will launch applications, documents, and Web sites, among other things.

Parameters:
sCommand the command to execute

static String edu.cmu.hcii.calo.util.CommandLauncher.getCompletePath ( String  sCommand  )  [static, private]

Gives the full path to execute.

static boolean edu.cmu.hcii.calo.util.CommandLauncher.isPossibleFile ( String  sFile  )  [static, private]

Checks whether the url starts with c: or similar.

static boolean edu.cmu.hcii.calo.util.CommandLauncher.isPossibleServerShare ( String  sCmd  )  [static, private]

Checks whether the url starts with server share like //server/dir*.

static boolean edu.cmu.hcii.calo.util.CommandLauncher.isPossibleURL ( String  sUrl  )  [static, private]

Checks whether the url starts with www.

or mailto: or http: or ....

Parameters:
sUrl the url to check


Member Data Documentation

Pattern edu.cmu.hcii.calo.util.CommandLauncher.pUrlPattern [static, private]

Initial value:

        Pattern.compile("^www\\.|^http:|^mailto:|^file:|^WWW\\.|^HTTP:|^MAILTO:|^FILE:")


The documentation for this class was generated from the following file:
Generated on Mon Aug 13 15:06:21 2007 for CALO by  doxygen 1.5.2