info.aduna.platform.desktop
Interface Desktop

All Known Implementing Classes:
DesktopBase, MacOSXDesktop, PosixDesktop, PosixGnomeDesktop, PosixKDEDesktop, WindowsDesktop

public interface Desktop


Method Summary
 boolean isExecutable(String resource)
          Determines whether the specified resource is an executable.
 int openResource(String resource)
          Opens the specified resource in the appropriate external application.
 boolean warnsWhenOpeningExecutable()
          Returns whether the native platform warns the user (usually through a dialog) when he or she is about to open an executable resource.
 

Method Detail

openResource

int openResource(String resource)
                 throws UnsupportedOperationException,
                        IOException
Opens the specified resource in the appropriate external application. The resource may have the form of a URL, but this is not required. This method blocks until the external process that actually opens the resource completes, and then returns its exit code.

Returns:
exit code of the external process
Throws:
UnsupportedOperationException - when the Platform does not know how to handle the specified resource.
IOException - when an I/O error occurs.

isExecutable

boolean isExecutable(String resource)
                     throws IOException
Determines whether the specified resource is an executable. It supports the same parameter format as the openResource method.

Throws:
IOException

warnsWhenOpeningExecutable

boolean warnsWhenOpeningExecutable()
Returns whether the native platform warns the user (usually through a dialog) when he or she is about to open an executable resource.

See Also:
openResource(java.lang.String)


Copyright © 1997-2008 Aduna. All Rights Reserved.