RFC: Netx - Add support for filtering information based on os, arch and platform
dbhole at redhat.com
Wed Jun 24 11:07:47 PDT 2009
* Omair Majid <omajid at redhat.com> [2009-06-24 13:46]:
> The attached patch allows filtering the information elmenent in a jnlp
> file based on the current os, arch and platform as well as the current
> This is mostly the same as the code in ResourceDesc, except for the
> platform attribute. The jnlp programmer's guide  doesnt say what
> platform is supposed to mean. However, the jnlp changelog  says it is
> the 'os.platform' system property. This property isnt available in
> either Sun's proprietary JDK or OpenJDK, so I added an extra check to
> ignore the platform if System.getProperty("os.platform") returns a null.
Looks good. Assuming you have tested this, go ahead and apply.
> 2009-06-24 Omair Majid <omajid at redhat.com>
> * rt/net/sourceforge/jnlp/InformationDesc.java
> Add os, arch and platform.
> (InformationDesc): Accept os and arch parameters.
> (getOS): New function.
> (getArch): New function.
> (getPlatform): New function.
> * rt/net/sourceforge/jnlp/JNLPFile.java
> Fix comments and add defaultPlatform. Update initializer to
> initialize defaultPlatform.
> (getInformation): Return the information section as filtered through
> the default os, arch and platform as well as locale.
> (getInformation): Filter information section through os, arch,
> platform and locale.
> (getResources): Call localeMatches instead of localMatches.
> (setDefaults): Set the platform as well.
> (localMatches): Renamed to...
> (localeMatches): New function.
> (stringMatches): New function.
> * rt/net/sourceforge/jnlp/Parser.java
> (getInformationDesc): Parse os, arch and platform attributes of the
> information element.
> * rt/net/sourceforge/jnlp/PluginBridge.java
> (getInformation): Changed to take account of os, arch and platform
> as well as the locale.
> Any comments?
More information about the distro-pkg-dev