Package 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 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 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, createJnlpVendor, createJnlpVendorValue, createNameForDesktopFile, getApplet, getApplication, getCodeBase, getComponent, getFileLocation, getFileVersion, getInformation, getInformation, getInstaller, getLaunchInfo, getManifestsAttributes, getNewVMArgs, getNotNullProbalbeCodeBase, getParserSettings, getResources, getResourcesDescs, getSecurity, getSourceLocation, getSpecVersion, getTitle, getTitleFromJnlp, getTitleFromManifest, getUniqueKey, getUpdate, getVendor, getVendor, localeMatches, needsNewVM, openURL, requiresSignedJNLPWarning, setDefaults, setSignedJNLPAsMissing
-
-
-
-
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 attributedocumentBase
- as specified in attributejar
- jar attribute valuemain
- main method attribute valuewidth
- width of appelt as specified in attributeheight
- height of applet as specified in attributeparams
- 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 classJNLPFile
-
getDownloadOptions
public DownloadOptions getDownloadOptions()
- Overrides:
getDownloadOptions
in classJNLPFile
- Returns:
- options of download
-
getTitle
public java.lang.String getTitle()
-
getResources
public ResourcesDesc getResources(java.util.Locale locale, java.lang.String os, java.lang.String arch)
- Overrides:
getResources
in classJNLPFile
- Parameters:
locale
- preferred locale of resourceos
- preferred os of resourcearch
- 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 classJNLPFile
- Parameters:
locale
- preferred locale of resourceos
- preferred os of resourcearch
- preferred arch of resource- Returns:
- the resources section of the JNLP file for the specified locale, os, and arch.
-
isApplet
public boolean isApplet()
-
isApplication
public boolean isApplication()
- Overrides:
isApplication
in classJNLPFile
- Returns:
- whether the lauch descriptor describes an Application.
-
isComponent
public boolean isComponent()
- Overrides:
isComponent
in classJNLPFile
- Returns:
- whether the lauch descriptor describes a Component.
-
isInstaller
public boolean isInstaller()
- Overrides:
isInstaller
in classJNLPFile
- 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)
-
-