Find JSRs
Submit this Search


Ad Banner
 
 
 
 

This is the proposed change log for a Maintenance Review of JSR-056 version 6.0.18

The proposed new version number will be 6.0.18

Change 1 - bump the specification version number to 6.0.18

In The title page (index.html) replace (in 2 places):

  • Version 6.0.10

with:

  • Version 6.0.18

Change 2 - add this revision history to section 0.7:

Add section 0.7.5 as follows:

0.7.5 Changes since release 6.0.10

This is a minor update of the version 6.0.10 specification. The change are described below:

  • Modify section 3.7.1, 3.7.2, and 3.8.1 to add the “progress-class” attribute to the “application-desc”, “applet-desc”, and “component-desc” elements.

  • Modify section 4.4 to describe the “progress” value to the “download” attribute for jar resources.

  • Modify section 7 to include the new DownloadService2, and IntegrationService APIs.

  • Modify Appendix C, the DTD, to include the new “progress-class” attribute and “progress” attribute value above.

  • Modify Appendix D, the JNLP API, to include the new DownloadService2, and IntegrationService APIs.

This revision introduces the version number (6.0.18) for the JNLP file and the JNLP API. Version 6.0.18 is a proper superset of 1.0, and of version 6.0.10. A JNLP Client implementing this specification must be able to run a JNLP file which requires 1.0, 1.5, 6.0, 6.0.10, or 6.0.18; i.e., the spec attribute in the jnlp element is set to any of 1.0, 1.5, 6.0, 6.0.10, or 6.0.18.

A complete list of changes for v6.0.18 can be found at:

  • {include URL to where this change log is posted on jcp.org}

Change 3 – Adding “progress-class” attribute to each of the descriptor elements.

Add to the end of sections 3.7.1:

progress-class attribute: The name of a class containing an implementation of the javax.jnlp.DownloadServiceListener interface.

The optional progress-class attribute can be used by an application to indicate to the JNLP client it's preference that the specified class be used as a replacement for the client's default method of displaying download progress to the user. If the JNLP client can find and load this class, and it implements the DownloadServiceListener interface, it is free to call it during the downloading of other resources, instead of displaying progress in it's default way. (see section 4.4).

also, add to the bottom of sections 3.7.2, 3.8.1, and 3.8.2:

progress-class attribute: The name of a class containing an implementation of the javax.jnlp.DownloadServiceListener interface. (see section 3.7.1)

Change 4 – Adding the “progress” attribute to the “download” attribute of jar resources.

Add to the first example in section 4.4:

<jar href="progress.jar" download="progress"/>

Then add after 3 paragraphs later (before discussion of parts):

The value “progress” for the download attribute is a hint to the jnlp client that this jar may contain the class defined by the progress-class attribute (see section 3.7.1). This jar may be considered eager, and may be loaded first by the jnlp client so that the “progress-class” found in it may be used to display the progress of the downloading of all other eager resources.

Change 5 – Modifying the DTD in appendix C for Change 4 and 5 above.

Change:

<!--
The download attribute of a jar element indicates if this element must be downloaded before an application is launched (eager), or not (lazy).
-->

<!ATTLIST jar download (eager | lazy) "eager">

To:

<!--
The download attribute of a jar element indicates if this element must be downloaded before an application is launched (eager), or not (lazy), a value of progress implies eager, and is a hint that this jar may want to be downloaded first.
-->

<!ATTLIST jar download (eager | lazy | progress) "eager">

Add after:

<!ATTLIST application-desc main-class CDATA #IMPLIED>

The following:

<!--
The progress-class attribute of the application-desc element describes the progress class that implements javax.jnlp.DownloadServiceListener.
-->

<!ATTLIST application-desc progress-class CDATA #IMPLIED>

Add After:

<!ATTLIST applet-desc main-class CDATA #REQUIRED>

The following:

<!--
The progress-class attribute of the applet-desc element describes the progress class that implements javax.jnlp.DownloadServiceListener.
-->

<!ATTLIST applet-desc progress-class CDATA #IMPLIED>

Add After:

<!ELEMENT component-desc EMPTY>

The following:

<!--
The progress-class attribute of the component-desc element describes the progress class that implements javax.jnlp.DownloadServiceListener.
-->

<!ATTLIST component-desc progress-class CDATA #IMPLIED>

Add After:

<!ELEMENT installer-desc EMPTY>

The following:

<!--
The progress-class attribute of the installer-desc element describes the progress class that implements javax.jnlp.DownloadServiceListener.
-->

<!ATTLIST installer-desc progress-class CDATA #IMPLIED>

Change 6 – Modifying the JNLP API to add DownloadService2 and IntegrationService interfaces

Before 7.1, add to the list of services:

  • IntegrationService, which provides programmatic shortcut and mime-type association support. This service is optional.

  • DownloadService2, which provides support for programmatic cache queries and uninstall notification. This service is optional.

After 7.10, append the following two sections:

7.11 The IntegrationService Service

The javax.jnlp.IntegrationService provides API for programmatic desktop integration, namely shortcut management and mimetype association.

The application can request creation of desktop and menu shortcuts, query the existence of shortcuts and request removal of shortcuts using the following methods:

  • boolean requestShortcut(boolean desktop, boolean menu, String submenu)

  • boolean hasDesktopShortcut()

  • boolean hasMenuShortcut()

  • boolean removeShortcuts()

The method requestShortcut() will attempt to install shortcuts for the application. It will install desktop or menu shortcuts or both, according to the desktop and menu arguments. For menu shortcuts, the submenu argument specifies the name of the submenu where to place the shortcut. Depending on the configuration of the JNLP client and the operating system, this method might ask permission from the user to install shortcuts, or even deny shortcuts altogether. The return value indicates if the shortcuts have been installed successfully or not. The methods hasDesktopShortcut() and hasMenuShortcut() can be used to query the existence of shortcuts. The method removeShortcuts() will attempt to remove shortcuts for the application and return true if it was successful or there have been no shortcuts to begin with, and false if they have not been successfully removed (e.g. when operating system denied it for some reason).

Applications can request a mime-type association, query the existence of a mime-type association and request removal of a mime-type association using the following methods:

  • boolean requestAssociation(String mimetype, String [] extensions)

  • boolean hasAssociation(String mimetype, String [] extensions)

  • boolean removeAssociation(String mimetype, String [] extensions)

The method requestAssociation() requests that the application is associated with the specified mime-type and filename extensions. It returns true on success, and false otherwise. An application can use hasAssociation() to query if it is associated with a specified mime-type. The method removeAssociation() requests to remove the mime-type association and returns true on success and false otherwise.

7.12 The DownloadService2 Service

The DownloadService2 API provides API for programmatic cache management/queries as well as a notification system for uninstallation of resources.

Applications can query cached resources and find out if there is an update available by using the following methods:

  • ResourceSpec[] getCachedResources(ResourceSpec spec)

  • ResourceSpec[] getUpdateAvailableResources(ResourceSpec spec) throws IOException

An application can use getCachedResources() to query all resources in the local cache that match the specified URL and version patterns as well as a resource type. The url pattern is mandatory. If the version pattern is null, then all versions are returned. The type property narrows the query to specific resource types. If it has an unknown value (i.e. none of the constants defined in DownloadService2), it will be treated equivalent to ALL, i.e. it returns all resource types. The method getUpdateAvailableResources() returns all resources in the cache that match the spec (equivalent to getCachedResources()) AND have a newer version available online. This method will try to establish a network connection to determine if newer versions are available for cached resources and throw an IOException if this fails for some reason.

Change 7 – Modifying Appendix D to add DownloadService2 and IntegrationService interfaces

At the end, append the following 3 sections:

D.19 IntegrationService

public interface IntegrationService
public boolean requestShortcut(boolean desktop, boolean menu, String submenu);
public boolean hasDesktopShortcut();
public boolean hasMenuShortcut();
public boolean removeShortcuts();
public boolean requestAssociation(String mimetype, String [] extensions);
public boolean hasAssociation(String mimetype, String [] extensions);
public boolean removeAssociation(String mimetype, String [] extensions);

D.20 DownloadService2

public interface DownloadService2
public final static int ALL = 0;
public final static int APPLICATION = 1;
public final static int APPLET = 2;
public final static int EXTENSION = 3;
public final static int JAR = 4;
public final static int IMAGE = 5;
public final static int CLASS = 6;
public ResourceSpec[] getCachedResources(ResourceSpec spec);
public ResourceSpec[] getUpdateAvailableResources(ResourceSpec spec) throws IOException;

D.21 DownloadService2.ResourceSpec

public class ResourceSpec
public ResourceSpec(String url, String version, int type);
public String getUrl();
public String getVersion();
public int getType();
public long getSize();
public long getLastModified();
public long getExpirationDate();

Change 8 – Modifying TOC to add DownloadService2 and IntegrationService interfaces

Added the following two entries to the TOC for 7 JNLP API:

The IntegrationService Service

The DownloadService2 Service