Class PluginBridge

java.lang.Object
net.sourceforge.jnlp.JNLPFile
net.sourceforge.jnlp.PluginBridge

public final class PluginBridge extends JNLPFile
Allows reuse of code that expects a JNLPFile object, while overriding behaviour specific to applets.
  • Constructor Details

    • PluginBridge

      public PluginBridge(URL codebase, URL documentBase, String jar, String main, int width, int height, PluginParameters params) throws Exception
      Creates a new PluginBridge using a default JNLPCreator.
      Parameters:
      codebase - as specified in attribute
      documentBase - as specified in attribute
      jar - jar attribute value
      main - main method attribute value
      width - width of appelt as specified in attribute
      height - height of applet as specified in attribute
      params - parameters as parsed from source html
      Throws:
      Exception - general exception as anything can happen
    • PluginBridge

      public PluginBridge(URL codebase, URL documentBase, String archive, String main, int width, int height, PluginParameters params, JNLPCreator jnlpCreator) throws Exception
      Throws:
      Exception
  • Method Details

    • getArchiveJars

      public List<String> getArchiveJars()
    • codeBaseLookup

      public boolean codeBaseLookup()
    • useJNLPHref

      public boolean useJNLPHref()
    • getParams

      public PluginParameters getParams()
    • getRequestedPermissionLevel

      public SecurityDesc.RequestedPermissionLevel getRequestedPermissionLevel()
      Overrides:
      getRequestedPermissionLevel in class JNLPFile
    • getDownloadOptions

      public DownloadOptions getDownloadOptions()
      Overrides:
      getDownloadOptions in class JNLPFile
      Returns:
      options of download
    • getTitle

      public String getTitle()
      Overrides:
      getTitle in class JNLPFile
      Returns:
      the JNLP file's best localized title. This method returns the same value as InformationDesc.getTitle(). Since jdk7 u45, also manifest title, and mainclass are taken to consideration; See PluginBridge
    • getResources

      public ResourcesDesc getResources(Locale locale, String os, String arch)
      Overrides:
      getResources in class JNLPFile
      Parameters:
      locale - preferred locale of resource
      os - preferred os of resource
      arch - preferred arch of resource
      Returns:
      the resources section of the JNLP file for the specified locale, os, and arch.
    • getCodeBaseFolders

      public List<String> getCodeBaseFolders()
      Returns:
      the list of folders to be added to the codebase
    • getResourcesDescs

      public ResourcesDesc[] getResourcesDescs(Locale locale, String os, String arch)
      Overrides:
      getResourcesDescs in class JNLPFile
      Parameters:
      locale - preferred locale of resource
      os - preferred os of resource
      arch - preferred arch of resource
      Returns:
      the resources section of the JNLP file for the specified locale, os, and arch.
    • isApplet

      public boolean isApplet()
      Overrides:
      isApplet in class JNLPFile
      Returns:
      whether the lauch descriptor describes an Applet.
    • isApplication

      public boolean isApplication()
      Overrides:
      isApplication in class JNLPFile
      Returns:
      whether the lauch descriptor describes an Application.
    • isComponent

      public boolean isComponent()
      Overrides:
      isComponent in class JNLPFile
      Returns:
      whether the lauch descriptor describes a Component.
    • isInstaller

      public boolean isInstaller()
      Overrides:
      isInstaller in class JNLPFile
      Returns:
      whether the lauch descriptor describes an Installer.
    • getDebugJnlp

      public String getDebugJnlp()
    • haveDebugJnlp

      public boolean haveDebugJnlp()
    • toJnlp

      public String toJnlp(boolean needSecurity, boolean useHref, boolean fix)
    • strippClass

      public static String strippClass(String s)