net.sourceforge.jnlp

## 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.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class net.sourceforge.jnlp.JNLPFile

      `JNLPFile.ManifestBoolean, JNLPFile.ManifestsAttributes`

  - ### Field Summary

    - ### Fields inherited from class net.sourceforge.jnlp.JNLPFile

      `codeBase, component, defaultArch, defaultLocale, defaultOS, fileLocation, fileVersion, info, launchType, parserSettings, resources, security, sharedResources, sourceLocation, specVersion, TITLE_NOT_FOUND, uniqueKey, update`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PluginBridge(java.net.URL codebase, java.net.URL documentBase, java.lang.String jar, java.lang.String main, int width, int height, PluginParameters params)` Creates a new PluginBridge using a default JNLPCreator.
    `PluginBridge(java.net.URL codebase, java.net.URL documentBase, java.lang.String archive, java.lang.String main, int width, int height, PluginParameters params, JNLPCreator jnlpCreator)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `codeBaseLookup()`
    `java.util.List<java.lang.String>` | `getArchiveJars()`
    `java.util.List<java.lang.String>` | `getCodeBaseFolders()`
    `java.lang.String` | `getDebugJnlp()`
    `DownloadOptions` | `getDownloadOptions()`
    `PluginParameters` | `getParams()`
    `SecurityDesc.RequestedPermissionLevel` | `getRequestedPermissionLevel()`
    `ResourcesDesc` | `getResources(java.util.Locale locale, java.lang.String os, java.lang.String arch)`
    `ResourcesDesc[]` | `getResourcesDescs(java.util.Locale locale, java.lang.String os, java.lang.String arch)`
    `java.lang.String` | `getTitle()`
    `boolean` | `haveDebugJnlp()`
    `boolean` | `isApplet()`
    `boolean` | `isApplication()`
    `boolean` | `isComponent()`
    `boolean` | `isInstaller()`
    `static java.lang.String` | `strippClass(java.lang.String s)`
    `java.lang.String` | `toJnlp(boolean needSecurity, boolean useHref, boolean fix)`
    `boolean` | `useJNLPHref()`

    - ### Methods inherited from class net.sourceforge.jnlp.JNLPFile

      `createJnlpTitle, createJnlpTitleValue, createJnlpVendor, createJnlpVendorValue, getApplet, getApplication, getCodeBase, getComponent, getFileLocation, getFileVersion, getInformation, getInformation, getInstaller, getLaunchInfo, getManifestsAttributes, getNewVMArgs, getNotNullProbalbeCodeBase, getParserSettings, getResources, getResourcesDescs, getSecurity, getSourceLocation, getSpecVersion, getTitleFromJnlp, getTitleFromManifest, getUniqueKey, getUpdate, getVendor, localeMatches, needsNewVM, openURL, requiresSignedJNLPWarning, setDefaults, setSignedJNLPAsMissing`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PluginBridge

          public PluginBridge(java.net.URL codebase,
                              java.net.URL documentBase,
                              java.lang.String jar,
                              java.lang.String main,
                              int width,
                              int height,
                              PluginParameters params)
                       throws java.lang.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:
        `java.lang.Exception` - general exception as anything can happen

    - #### PluginBridge

          public PluginBridge(java.net.URL codebase,
                              java.net.URL documentBase,
                              java.lang.String archive,
                              java.lang.String main,
                              int width,
                              int height,
                              PluginParameters params,
                              JNLPCreator jnlpCreator)
                       throws java.lang.Exception

      Throws:
        `java.lang.Exception`

  - ### Method Detail

    - #### getArchiveJars

          public java.util.List<java.lang.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 java.lang.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(java.util.Locale locale,
                                            java.lang.String os,
                                            java.lang.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 java.util.List<java.lang.String> getCodeBaseFolders()

      Returns:
        the list of folders to be added to the codebase

    - #### getResourcesDescs

          public ResourcesDesc[] getResourcesDescs(java.util.Locale locale,
                                                   java.lang.String os,
                                                   java.lang.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 java.lang.String getDebugJnlp()

    - #### haveDebugJnlp

          public boolean haveDebugJnlp()

    - #### toJnlp

          public java.lang.String toJnlp(boolean needSecurity,
                                         boolean useHref,
                                         boolean fix)

    - #### strippClass

          public static java.lang.String strippClass(java.lang.String s)

Submit a bug or feature