WebObjects 5.2

com.webobjects.eodistribution
Class WOJavaClientJNLP

java.lang.Object
  |
  +--com.webobjects.appserver.WOElement
        |
        +--com.webobjects.appserver.WOComponent
              |
              +--com.webobjects.eodistribution.WOJavaClientJNLP
All Implemented Interfaces:
Cloneable, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, WOActionResults

public class WOJavaClientJNLP
extends WOComponent

WOJavaClientJNLP is the component called to dynamically create the Web Start JNLP information for WebObjects Java Client applications. The JNLP information is in XML format, and its format is defined in WOJavaClientJNLP.wo, mainly by using WOXMLNode components. The implemented format uses several variables, repetitions and conditionals. The WOJavaClientJNLP class mostly consists of accessor methods for these variables. Developers configure the values through bindings on WOJavaClientComponents (the values are read from the bindings and transferred to the WOJavaClientJNLP component).

If developers create additional bindings for the WOJavaClientComponent, they will be passed as additionalMainArguments to the WOJavaClientJNLP component and then then (automatically) to the Java Client applications, as long as the values are of type String.

The JNLP XML format defined here includes all the commonly used parameters. However, it can be subclassed for very special situations. In these cases, additional string bindings in the WOJavaClientComponent can be used for additional variables in the JNLP file. Since these will be passed to the WOJavaClientJNLP component as "additionalMainArguments", subclasses can override either the method setAdditionalMainArguments or the method additionalMainArguments in order to filter these variables out of the list of "real" main arguments. To use your own WOJavaClientJNLP subclass, specify the class name with the JNLPComponentName binding on the WOJavaClientComponent.

See Also:
Serialized Form

Inner classes inherited from class com.webobjects.appserver.WOComponent
WOComponent.Event
 
Inner classes inherited from class com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.Null, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.Utility, NSKeyValueCoding.ValueAccessor
 
Inner classes inherited from class com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Inner classes inherited from class com.webobjects.foundation.NSValidation
NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
KeyPathSeparator
 
Constructor Summary
WOJavaClientJNLP(WOContext context)
          Creates a new WOJavaClientJNLP component in a given context.
 
Method Summary
 NSDictionary additionalMainArguments()
          Returns the additional command line parameters (in addition to the predefined, standard ones) which will be passed to the main method on the client.
 String applicationDescription()
          Returns a string describing the application.
 String applicationIcon()
          Returns the URL for the (optional) application icon.
 String applicationName()
          Returns the descriptive client application name.
 String applicationURL()
          Returns the application's URL for the JNLP file generation.
 String channelClassName()
          Returns the channelClassName for the JNLP file generation.
 String codebase()
          Returns the codebase URL.
 boolean hasApplicationDescription()
          Returns whether the string describing the application is set.
 boolean hasApplicationIcon()
          Returns whether the URL for the (optional) application icon is set.
 boolean hasApplicationName()
          Returns whether the application name is set.
 boolean hasHomepage()
          Returns whether the homepage URL is set.
 boolean hasVendor()
          Returns whether the vendor is set.
 String homepage()
          Returns the Homepage URL.
 String j2seVersion()
          Returns J2SE version required for the client installation, by default "1.3+".
 String jarFileDownload()
          Returns the download option for the current jar file (the default is "eager", but you may use "lazy").
 String jarFileMain()
          Returns the "main" flag for the current jar file (null by default).
 String jarFileName()
          Returns the current jar file that the WORepetition (for the jar file names) is iterating over while generating the JNLP file.
 NSArray jarFileNames()
          Returns the array of jar files to be downloaded by Web Start (at the codebase URL).
 String jnlpURL()
          Returns the URL at which Web Start will look an updated JNLP file.
 String mainArgument()
          Returns the current main argument that the WORepetition (for the main arguments) is iterating over over while generating the JNLP file.
 NSArray mainArguments()
          Returns all command line parameters which will be passed to the Java Client application's main method.
 String mainClass()
          Returns the full Java class name containing the main method for the client, by default com.webobjects.eoapplication.client.EOClientApplicationSupport.
 boolean needsAllPermissions()
          Returns whether the Java Client application needs all permissions (versus running in an applet-like sandbox).
 String page()
          Returns the page for the JNLP file generation.
 void setAdditionalMainArguments(NSDictionary additionalMainArguments)
          Sets additional command line parameters (in addition to the predefined, standard ones) which will be passed to the main method on the client.
 void setApplicationDescription(String applicationDescription)
          Sets a string describing the application.
 void setApplicationIcon(String applicationIcon)
          Sets a URL for the (optional) application icon.
 void setApplicationName(String applicationName)
          Sets the descriptive client application name.
 void setApplicationURL(String applicationURL)
          Sets the application's URL so that it can be used in the JNLP file generation.
 void setChannelClassName(String channelClassName)
          Sets the channelClassName so that it can be used in the JNLP file generation.
 void setCodebase(String codebase)
          Sets the codebase URL.
 void setHomepage(String homepage)
          Sets the Homepage URL.
 void setJarFileName(String name)
          Sets the current jar file that the WORepetition (for the jar file names) is iterating over while generating the JNLP file.
 void setJarFileNames(NSArray jarFileNames)
          Sets the array of jar files to be downloaded by Web Start (at the codebase URL).
 void setMainArgument(String name)
          Sets the current main argument that the WORepetition (for the main arguments) is iterating over over while generating the JNLP file.
 void setNeedsAllPermissions(boolean flag)
          Sets whether the Java Client application needs all permissions (versus running in an applet-like sandbox).
 void setPage(String page)
          Sets the page so that it can be used in the JNLP file generation.
 void setVendor(String vendor)
          Sets the descriptive vendor name.
 String vendor()
          Returns the descriptive vendor name.
 
Methods inherited from class com.webobjects.appserver.WOComponent
appendToResponse, application, awake, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, invokeAction, isCachingEnabled, isEventLoggingEnabled, isStateless, logString, name, pageWithName, parent, path, performParentAction, pullValuesFromParent, pushValuesToParent, reset, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, sleep, synchronizesVariablesWithBindings, takeValueForKey, takeValueForKeyPath, takeValuesFromRequest, template, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForKey, valueForKeyPath
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WOJavaClientJNLP

public WOJavaClientJNLP(WOContext context)
Creates a new WOJavaClientJNLP component in a given context.
Parameters:
context - the WebObjects context for the WOJavaClientJNLP component
Method Detail

additionalMainArguments

public NSDictionary additionalMainArguments()
Returns the additional command line parameters (in addition to the predefined, standard ones) which will be passed to the main method on the client.
Returns:
the NSDictionary with additional parameters for the main method

applicationDescription

public String applicationDescription()
Returns a string describing the application. Usually one sentence.
Returns:
the string describing the application

applicationIcon

public String applicationIcon()
Returns the URL for the (optional) application icon. See the Web Start documentation for more information.
Returns:
the URL for the (optional) application icon

applicationName

public String applicationName()
Returns the descriptive client application name. It will appear in the Web Start dialogs and progress panels.
Returns:
applicationName the application name

applicationURL

public String applicationURL()
Returns the application's URL for the JNLP file generation.
Returns:
applicationURL the application URL, usually dynamically derived from the WebObjects application server base URL

channelClassName

public String channelClassName()
Returns the channelClassName for the JNLP file generation. The channelClassName will be passed to the Java Client application as a command line parameter, and can be used to set a custom EODistributionChannel for the application.
Returns:
the class name of the custom EODistributionChannel subclass

codebase

public String codebase()
Returns the codebase URL. At this URL, Web Start will look for the jar files to be downloaded.
Returns:
the codebase URL

hasApplicationDescription

public boolean hasApplicationDescription()
Returns whether the string describing the application is set. Used for a conditional in the JNLP XML format.
Returns:
true if the string describing the application is set; false otherwise

hasApplicationIcon

public boolean hasApplicationIcon()
Returns whether the URL for the (optional) application icon is set. Used for a conditional in the JNLP XML format.
Returns:
true if the URL for the (optional) application icon is set; false otherwise

hasApplicationName

public boolean hasApplicationName()
Returns whether the application name is set. Used for a conditional in the JNLP XML format.
Returns:
true if the application name is set; false otherwise

hasHomepage

public boolean hasHomepage()
Returns whether the homepage URL is set. Used for a conditional in the JNLP XML format.
Returns:
true if the homepage URL is set; false otherwise

hasVendor

public boolean hasVendor()
Returns whether the vendor is set. Used for a conditional in the JNLP XML format.
Returns:
true if the vendor is set; false otherwise

homepage

public String homepage()
Returns the Homepage URL. It will appear in the Web Start dialogs and progress panels.
Returns:
the homepage URL.

j2seVersion

public String j2seVersion()
Returns J2SE version required for the client installation, by default "1.3+".
Returns:
the J2SE version as a String (possibly with a "+" at the end)

jarFileDownload

public String jarFileDownload()
Returns the download option for the current jar file (the default is "eager", but you may use "lazy"). See the Web Start and JNLP documentation for more information.
Returns:
the download option for the current jar file ("eager" or "lazy")

jarFileMain

public String jarFileMain()
Returns the "main" flag for the current jar file (null by default). See the Web Start and JNLP documentation for more information.
Returns:
the "main" flag for the current jar file

jarFileName

public String jarFileName()
Returns the current jar file that the WORepetition (for the jar file names) is iterating over while generating the JNLP file.
Returns:
the name of the current jar file

jarFileNames

public NSArray jarFileNames()
Returns the array of jar files to be downloaded by Web Start (at the codebase URL). The list of jar files is usually generated automatically from the bundles of the application or set per binding on the WOJavaClientComponent.
Parameters:
jarFileNames - the NSArray with the names of the jar files that Web Start should download

jnlpURL

public String jnlpURL()
Returns the URL at which Web Start will look an updated JNLP file. The web site should have link to this URL for browsers to initiate a Web Start doenload/update. This method would be overridden by a subclass only in very rare cases.
Returns:
the URL for dynamically generating the JNLP file

mainArgument

public String mainArgument()
Returns the current main argument that the WORepetition (for the main arguments) is iterating over over while generating the JNLP file.
Returns:
the name of the current main argument

mainArguments

public NSArray mainArguments()
Returns all command line parameters which will be passed to the Java Client application's main method. This includes both names and values in one ordered NSArray. Instead of overriding this method in a subclass, consider overriding setAdditionalMainArguments or additionalMainArguments.
Returns:
the NSArray with command line parameters for the Java Client application's main method

mainClass

public String mainClass()
Returns the full Java class name containing the main method for the client, by default com.webobjects.eoapplication.client.EOClientApplicationSupport.
Returns:
the class name containing the main method for the client

needsAllPermissions

public boolean needsAllPermissions()
Returns whether the Java Client application needs all permissions (versus running in an applet-like sandbox).
Returns:
true if the Java Client application needs all permissions; false otherwise

page

public String page()
Returns the page for the JNLP file generation. This page is the page on which the WOJavaClientComponent is defined. (So that there can be be multiple such pages, although usually it is the "JavaClient" page.)
Returns:
the name of the WOJavaClientComponent's page

setAdditionalMainArguments

public void setAdditionalMainArguments(NSDictionary additionalMainArguments)
Sets additional command line parameters (in addition to the predefined, standard ones) which will be passed to the main method on the client.
Parameters:
additionalMainArguments - the NSDictionary with additional parameters for the main method

setApplicationDescription

public void setApplicationDescription(String applicationDescription)
Sets a string describing the application. Usually one sentence.
Parameters:
applicationDescription - the string describing the application

setApplicationIcon

public void setApplicationIcon(String applicationIcon)
Sets a URL for the (optional) application icon. See the Web Start documentation for more information.
Parameters:
applicationIcon - the URL for the (optional) application icon

setApplicationName

public void setApplicationName(String applicationName)
Sets the descriptive client application name. It will appear in the Web Start dialogs and progress panels.
Parameters:
applicationName - the application name

setApplicationURL

public void setApplicationURL(String applicationURL)
Sets the application's URL so that it can be used in the JNLP file generation.
Parameters:
applicationURL - the application URL, usually dynamically derived from the WebObjects application server base URL

setChannelClassName

public void setChannelClassName(String channelClassName)
Sets the channelClassName so that it can be used in the JNLP file generation. The channelClassName will be passed to the Java Client application as a command line parameter, and can be used to set a custom EODistributionChannel for the application.
Parameters:
channelClassName - the class name of the custom EODistributionChannel subclass

setCodebase

public void setCodebase(String codebase)
Sets the codebase URL. At this URL, Web Start will look for the jar files to be downloaded.
Parameters:
codebase - the codebase URL

setHomepage

public void setHomepage(String homepage)
Sets the Homepage URL. It will appear in the Web Start dialogs and progress panels.
Parameters:
homepage - the homepage URL

setJarFileName

public void setJarFileName(String name)
Sets the current jar file that the WORepetition (for the jar file names) is iterating over while generating the JNLP file.
Parameters:
name - the name of the current jar file

setJarFileNames

public void setJarFileNames(NSArray jarFileNames)
Sets the array of jar files to be downloaded by Web Start (at the codebase URL). The list of jar files is usually generated automatically from the bundles of the application or set per binding on the WOJavaClientComponent.
Parameters:
jarFileNames - the NSArray with the names of the jar files that Web Start should download

setMainArgument

public void setMainArgument(String name)
Sets the current main argument that the WORepetition (for the main arguments) is iterating over over while generating the JNLP file.
Parameters:
name - the name of the current main argument

setNeedsAllPermissions

public void setNeedsAllPermissions(boolean flag)
Sets whether the Java Client application needs all permissions (versus running in an applet-like sandbox).
Parameters:
flag - true if the Java Client application needs all permissions; false otherwise

setPage

public void setPage(String page)
Sets the page so that it can be used in the JNLP file generation. This page is the page on which the WOJavaClientComponent is defined. (So that there can be be multiple such pages, although usually it is the "JavaClient" page.)
Parameters:
page - the name of the WOJavaClientComponent's page

setVendor

public void setVendor(String vendor)
Sets the descriptive vendor name. It will appear in the Web Start dialogs and progress panels.
Parameters:
vendor - the vendor name

vendor

public String vendor()
Returns the descriptive vendor name. It will appear in the Web Start dialogs and progress panels.
Returns:
the vendor name

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.