-
public interface IntegrationServiceProvides 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanhasAssociation(String mimetype, String[] extensions)Checks if this application is associated with the specified mimetype and filename extensions.booleanhasDesktopShortcut()Checks if the application has a desktop shortcut.booleanhasMenuShortcut()Checks if the application has a menu shortcut.booleanremoveAssociation(String mimetype, String[] extensions)Remove an association for this application as handler for the specified mimetype.booleanremoveShortcuts()Requests that all shortcuts for the application are removed.booleanrequestAssociation(String mimetype, String[] extensions)Requests that this application is registered as the handler for the specified mime type and filename extensions.booleanrequestShortcut(boolean desktop, boolean menu, String submenu)Requests that a shortcut is created for this application.
-
-
-
Method Detail
-
requestShortcut
boolean requestShortcut(boolean desktop, boolean menu, 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. A menu request with a null or empty string will place the menu item in the (platform) dependent default menu path.- Parameters:
desktop-trueif the shortcut should appear on the desktopmenu-trueif the shortcut should appear in a system menusubmenu- 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:
trueif both the givenmenuanddesktopare false or all shortcuts requested bymenuanddesktopwere successfully created.falseotherwise.
-
hasDesktopShortcut
boolean hasDesktopShortcut()
Checks if the application has a desktop shortcut.- Returns:
trueif the application has a desktop shortcut,falseotherwise
-
hasMenuShortcut
boolean hasMenuShortcut()
Checks if the application has a menu shortcut.- Returns:
trueif the application has a menu shortcut,falseotherwise
-
removeShortcuts
boolean removeShortcuts()
Requests that all shortcuts for the application are removed.- Returns:
trueif the shortcuts have been removed successfullyfalseotherwise
-
requestAssociation
boolean requestAssociation(String mimetype, String[] extensions)
Requests that this application is registered as the handler for the specified mime type and filename extensions.- Parameters:
mimetype- the mimetype to register this application as handler forextensions- the filename extensions to register this application as handler for- Returns:
trueif the app has been associated successfully,falseotherwise- Throws:
IllegalArgumentException- if eithermimetypeorextensionsisnull, or ifmimetypehas illegal mime type syntax, or ifextensionscontainsnullor empty elements
-
hasAssociation
boolean hasAssociation(String mimetype, String[] extensions)
Checks if this application is associated with the specified mimetype and filename extensions.- Parameters:
mimetype- the mimetype to check association forextensions- the filename extensions to check association for- Returns:
trueif this application is associated with the specified mimetype and filename extensions,falseotherwise- Throws:
IllegalArgumentException- if eithermimetypeorextensionsisnull, or ifmimetypehas illegal mime type syntax, or ifextensionsis empty or containsnullor empty elements
-
removeAssociation
boolean removeAssociation(String mimetype, String[] extensions)
Remove an association for this application as handler for the specified mimetype.- Parameters:
mimetype- the mimetype to remove association forextensions- the filename extensions to remove association for- Returns:
trueif the association has been removed successfully,falseotherwise- Throws:
IllegalArgumentException- if eithermimetypeorextensionsisnull, or ifmimetypehas illegal mime type syntax, or ifextensionscontainsnullor empty elements
-
-