java.lang.Object
net.adoptopenjdk.icedteaweb.jnlp.element.resource.ExtensionDesc

public class ExtensionDesc extends Object
The extension element.
Version:
$Revision: 1.8 $
Author:
Jon A. Maxwell (JAM) - initial author
  • Field Details

  • Constructor Details

    • ExtensionDesc

      public ExtensionDesc(String name, VersionString version, URL location)
      Create an extension descriptor.
      Parameters:
      name - the extension name
      version - the required version of the JNLP file extension
      location - the location of the JNLP file extension
  • Method Details

    • addPart

      public void addPart(String extPart, String part, boolean lazy)
      Adds an extension part to be downloaded when the specified part of the main JNLP file is loaded. The extension part will be downloaded before the application is launched if the lazy value is false or the part is empty or null.
      Parameters:
      extPart - the part name in the extension file
      part - the part name in the main file
      lazy - whether to load the part before launching
    • getName

      public String getName()
      Returns:
      the name of the extension.
    • getVersion

      public VersionString getVersion()
      Returns:
      the required version of the extension JNLP file.
    • getLocation

      public URL getLocation()
      Returns:
      the location of the extension JNLP file.
    • resolve

      public void resolve() throws ParseException, IOException
      Resolves the extension by creating a JNLPFile from the file specified by the extension's location property.
      Throws:
      IOException - if the extension JNLPFile could not be resolved.
      ParseException - if the extension JNLPFile could not be parsed or was not a component or installer descriptor.
    • getJNLPFile

      public JNLPFile getJNLPFile()
      Returns:
      a JNLPFile for the extension, or null if the JNLP file has not been resolved.