copied.org.eclipse.equinox.internal.p2.publisher.eclipse
Class ProductFile

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by copied.org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile
All Implemented Interfaces:
org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
Direct Known Subclasses:
ProductFile2

public class ProductFile
extends org.xml.sax.helpers.DefaultHandler
implements org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor

Used to parse a .product file.


Field Summary
protected static java.lang.String ATTRIBUTE_FRAGMENT
           
protected static java.lang.String ATTRIBUTE_ID
           
protected static java.lang.String ATTRIBUTE_VERSION
           
protected  java.util.List<org.eclipse.equinox.p2.metadata.IVersionedId> fragments
           
protected  java.util.List<org.eclipse.equinox.p2.metadata.IVersionedId> plugins
           
 
Constructor Summary
ProductFile(java.lang.String location)
          Constructs a product file parser.
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
           
 java.lang.String getApplication()
          Returns the application identifier for this product.
 java.util.List<org.eclipse.equinox.frameworkadmin.BundleInfo> getBundleInfos()
          Returns a List for each bundle that has custom configuration data in the product file.
 java.util.List<org.eclipse.equinox.p2.metadata.IVersionedId> getBundles(boolean includeFragments)
          Returns a List for each bundle that makes up this product.
 java.lang.String getConfigIniPath()
           
 java.lang.String getConfigIniPath(java.lang.String os)
           
 java.util.Map<java.lang.String,java.lang.String> getConfigurationProperties()
          Returns the properties found in .product file.
 java.util.List<org.eclipse.equinox.p2.metadata.IVersionedId> getFeatures()
          Returns a List of features that constitute this product.
 java.util.List<org.eclipse.equinox.p2.metadata.IVersionedId> getFragments()
          Returns a list of fragments that constitute this product.
 java.lang.String[] getIcons(java.lang.String os)
           
 java.lang.String getId()
          Returns the ID for this product.
 java.lang.String getLauncherName()
          Gets the name of the launcher specified in the .product file.
 java.lang.String getLicenseText()
           
 java.lang.String getLicenseURL()
           
 java.io.File getLocation()
          Gets the location of the .product file.
 java.lang.String getProductId()
           
 java.lang.String getProductName()
          Returns the product name.
 java.lang.String getProgramArguments(java.lang.String os)
          Returns the program arguments for a specific platform.
 java.lang.String getSplashLocation()
          Returns the location (the bundle) that defines the splash screen
 java.lang.String getVersion()
          Returns the version of the product
 java.lang.String getVMArguments(java.lang.String os)
          Returns the VM arguments for a specific platform.
protected  void processPlugin(org.xml.sax.Attributes attributes)
           
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
           
 boolean useFeatures()
          Returns true if this product is built using feature, false otherwise.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTE_FRAGMENT

protected static final java.lang.String ATTRIBUTE_FRAGMENT
See Also:
Constant Field Values

ATTRIBUTE_VERSION

protected static final java.lang.String ATTRIBUTE_VERSION
See Also:
Constant Field Values

ATTRIBUTE_ID

protected static final java.lang.String ATTRIBUTE_ID
See Also:
Constant Field Values

plugins

protected java.util.List<org.eclipse.equinox.p2.metadata.IVersionedId> plugins

fragments

protected java.util.List<org.eclipse.equinox.p2.metadata.IVersionedId> fragments
Constructor Detail

ProductFile

public ProductFile(java.lang.String location)
            throws java.lang.Exception
Constructs a product file parser.

Throws:
java.lang.Exception
Method Detail

getLauncherName

public java.lang.String getLauncherName()
Gets the name of the launcher specified in the .product file.

Specified by:
getLauncherName in interface org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor

getLocation

public java.io.File getLocation()
Gets the location of the .product file.

Specified by:
getLocation in interface org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor

getConfigurationProperties

public java.util.Map<java.lang.String,java.lang.String> getConfigurationProperties()
Returns the properties found in .product file. Properties are located in the block of the file

Specified by:
getConfigurationProperties in interface org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor

getBundles

public java.util.List<org.eclipse.equinox.p2.metadata.IVersionedId> getBundles(boolean includeFragments)
Returns a List for each bundle that makes up this product.

Specified by:
getBundles in interface org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor
Parameters:
includeFragments - Indicates whether or not fragments should be included in the list

getBundleInfos

public java.util.List<org.eclipse.equinox.frameworkadmin.BundleInfo> getBundleInfos()
Returns a List for each bundle that has custom configuration data in the product file.

Specified by:
getBundleInfos in interface org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor
Returns:
A List

getFragments

public java.util.List<org.eclipse.equinox.p2.metadata.IVersionedId> getFragments()
Returns a list of fragments that constitute this product.

Specified by:
getFragments in interface org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor

getFeatures

public java.util.List<org.eclipse.equinox.p2.metadata.IVersionedId> getFeatures()
Returns a List of features that constitute this product.

Specified by:
getFeatures in interface org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor

getIcons

public java.lang.String[] getIcons(java.lang.String os)
Specified by:
getIcons in interface org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor

getConfigIniPath

public java.lang.String getConfigIniPath(java.lang.String os)
Specified by:
getConfigIniPath in interface org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor

getConfigIniPath

public java.lang.String getConfigIniPath()

getId

public java.lang.String getId()
Returns the ID for this product.

Specified by:
getId in interface org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor

getProductId

public java.lang.String getProductId()
Specified by:
getProductId in interface org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor

getSplashLocation

public java.lang.String getSplashLocation()
Returns the location (the bundle) that defines the splash screen

Specified by:
getSplashLocation in interface org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor

getProductName

public java.lang.String getProductName()
Returns the product name.

Specified by:
getProductName in interface org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor

getApplication

public java.lang.String getApplication()
Returns the application identifier for this product.

Specified by:
getApplication in interface org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor

useFeatures

public boolean useFeatures()
Returns true if this product is built using feature, false otherwise.

Specified by:
useFeatures in interface org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor

getVersion

public java.lang.String getVersion()
Returns the version of the product

Specified by:
getVersion in interface org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor

getVMArguments

public java.lang.String getVMArguments(java.lang.String os)
Returns the VM arguments for a specific platform. If the empty string is used for the OS, this returns the default VM arguments

Specified by:
getVMArguments in interface org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor

getProgramArguments

public java.lang.String getProgramArguments(java.lang.String os)
Returns the program arguments for a specific platform. If the empty string is used for the OS, this returns the default program arguments

Specified by:
getProgramArguments in interface org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor

getLicenseText

public java.lang.String getLicenseText()
Specified by:
getLicenseText in interface org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor

getLicenseURL

public java.lang.String getLicenseURL()
Specified by:
getLicenseURL in interface org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attributes)
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName)
Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler

characters

public void characters(char[] ch,
                       int start,
                       int length)
Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler

processPlugin

protected void processPlugin(org.xml.sax.Attributes attributes)


Copyright © 2008-2011. All Rights Reserved.