javax.jnlp
Interface IntegrationService


public interface IntegrationService

Provides desktop integration for JNLP applications. In particular, this service provides API for programmatically request, query and remove shortcuts and request, query and remove mimetype associations.

Since:
6.0.18

Method Summary
 boolean hasAssociation(java.lang.String mimetype, java.lang.String[] extensions)
          Checks if this application is associated with the specified mimetype and filename extensions.
 boolean hasDesktopShortcut()
          Checks if the application has a desktop shortcut.
 boolean hasMenuShortcut()
          Checks if the application has a menu shortcut.
 boolean removeAssociation(java.lang.String mimetype, java.lang.String[] extensions)
          Remove an association for this application as handler for the specified mimetype.
 boolean removeShortcuts()
          Requests that all shortcuts for the application are removed.
 boolean requestAssociation(java.lang.String mimetype, java.lang.String[] extensions)
          Requests that this application is registered as the handler for the specified mime type and (optionally) filename extensions.
 boolean requestShortcut(boolean desktop, boolean menu, java.lang.String submenu)
          Requests that a shortcut is created for this application.
 

Method Detail

requestShortcut

boolean requestShortcut(boolean desktop,
                        boolean menu,
                        java.lang.String submenu)
Requests that a shortcut is created for this application. It can be specified to appear in a system menu, on the desktop or both. For the menu it is possible to specify a submenu path where the shortcut should be placed.

Parameters:
desktop - true if the shortcut should appear on the desktop
menu - true if the shortcut should appear in a system menu
submenu - the path to the submenu where to place the shortcut (only meaningful if menu is true).
The path is relative to the (platform dependant) default menu path.
Returns:
true if all shortcuts have been created successfully, false otherwise

hasDesktopShortcut

boolean hasDesktopShortcut()
Checks if the application has a desktop shortcut.

Returns:
true if the application has a desktop shortcut, false otherwise

hasMenuShortcut

boolean hasMenuShortcut()
Checks if the application has a menu shortcut.

Returns:
true if the application has a menu shortcut, false otherwise

removeShortcuts

boolean removeShortcuts()
Requests that all shortcuts for the application are removed.

Returns:
true if the shortcuts have been removed successfully false otherwise

requestAssociation

boolean requestAssociation(java.lang.String mimetype,
                           java.lang.String[] extensions)
Requests that this application is registered as the handler for the specified mime type and (optionally) filename extensions.

Parameters:
mimetype - the mimetype to register this application as handler for
extensions - the filename extensions to register this application as handler for or null
Returns:
true if the app has been associated successfully, false otherwise
Throws:
java.lang.IllegalArgumentException - if either mimetype or extensions is null, or if mimetype has illegal mime type syntax, or if extensions contains null or empty elements

hasAssociation

boolean hasAssociation(java.lang.String mimetype,
                       java.lang.String[] extensions)
Checks if this application is associated with the specified mimetype and filename extensions.

Parameters:
mimetype - the mimetype to check association for
extensions - the filename extensions to check association for
Returns:
true if this application is associated with the specified mimetype and filename extensions, false otherwise
Throws:
java.lang.IllegalArgumentException - if either mimetype or extensions is null, or if mimetype has illegal mime type syntax, or if extensions contains null or empty elements

removeAssociation

boolean removeAssociation(java.lang.String mimetype,
                          java.lang.String[] extensions)
Remove an association for this application as handler for the specified mimetype.

Parameters:
mimetype - the mimetype to remove association for
extensions - the filename extensions to remove association for
Returns:
true if the association has been removed successfully, false otherwise
Throws:
java.lang.IllegalArgumentException - if either mimetype or extensions is null, or if mimetype has illegal mime type syntax, or if extensions contains null or empty elements


Copyright © 1998, 2011, Oracle and/or its affiliates. All rights reserved.