netx.jnlp

Class ResourcesDesc


public class ResourcesDesc
extends java.lang.Object

The resources element.

Version:
$Revision: 1.7 $
Author:
Jon A. Maxwell (JAM) - initial author

Constructor Summary

ResourcesDesc(JNLPFile jnlpFile, locales[] , os[] , arch[] )
Create a representation of one information section of the JNLP File.

Method Summary

void
addResource(Object resource)
Add a resource.
String[]
getArch()
Returns the architecture required by these resources, or null if no locale was specified in the JNLP file.
ExtensionDesc[]
getExtensions()
Returns the Extensions.
JARDesc[]
getJARs()
Returns all of the JARs.
JARDesc[]
getJARs(String partName)
Returns the JARs with the specified part name.
JNLPFile
getJNLPFile()
Returns the JNLPFile the resources are for.
JREDesc[]
getJREs()
Returns the JVMs.
Locale[]
getLocales()
Returns the locale required by these resources, or null if no locale was specified in the JNLP file.
JARDesc
getMainJAR()
Returns the main JAR for these resources.
String[]
getOS()
Returns the os required by these resources, or null if no locale was specified in the JNLP file.
PackageDesc[]
getPackages()
Returns the Packages.
PackageDesc[]
getPackages(String className)
Returns the Packages that match the specified class name.
PropertyDesc[]
getProperties()
Returns the Properties as a list.
Map
getPropertiesMap()
Returns the properties as a map.
List
getResources(Class type)
Returns all resources of the specified type.

Constructor Details

ResourcesDesc

public ResourcesDesc(JNLPFile jnlpFile,
                     locales[] ,
                     os[] ,
                     arch[] )
Create a representation of one information section of the JNLP File.
Parameters:
jnlpFile - JNLP file the resources are for

Method Details

addResource

public void addResource(Object resource)
Add a resource.

getArch

public String[] getArch()
Returns the architecture required by these resources, or null if no locale was specified in the JNLP file.

getExtensions

public ExtensionDesc[] getExtensions()
Returns the Extensions.

getJARs

public JARDesc[] getJARs()
Returns all of the JARs.

getJARs

public JARDesc[] getJARs(String partName)
Returns the JARs with the specified part name.
Parameters:
partName - the part name, null and "" equivalent

getJNLPFile

public JNLPFile getJNLPFile()
Returns the JNLPFile the resources are for.

getJREs

public JREDesc[] getJREs()
Returns the JVMs.

getLocales

public Locale[] getLocales()
Returns the locale required by these resources, or null if no locale was specified in the JNLP file.

getMainJAR

public JARDesc getMainJAR()
Returns the main JAR for these resources. There first JAR is returned if no JARs are specified as the main JAR, and if there are no JARs defined then null is returned.

getOS

public String[] getOS()
Returns the os required by these resources, or null if no locale was specified in the JNLP file.

getPackages

public PackageDesc[] getPackages()
Returns the Packages.

getPackages

public PackageDesc[] getPackages(String className)
Returns the Packages that match the specified class name.
Parameters:
className - the fully qualified class name
Returns:
the PackageDesc objects matching the class name

getProperties

public PropertyDesc[] getProperties()
Returns the Properties as a list.

getPropertiesMap

public Map getPropertiesMap()
Returns the properties as a map.

getResources

public List getResources(Class type)
Returns all resources of the specified type.