public class ProductFile extends org.xml.sax.helpers.DefaultHandler implements IProductDescriptor
| Modifier and Type | Field and Description |
|---|---|
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<FeatureEntry> |
fragments |
static java.lang.String |
GENERIC_VERSION_NUMBER |
protected java.util.List<FeatureEntry> |
plugins |
INCLUDED_FEATURES, ROOT_FEATURES| Constructor and Description |
|---|
ProductFile(java.lang.String location)
Constructs a product file parser.
|
ProductFile(java.lang.String location,
java.lang.String os) |
| Modifier and Type | Method and Description |
|---|---|
void |
characters(char[] ch,
int start,
int length) |
boolean |
containsPlugin(java.lang.String plugin) |
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<BundleInfo> |
getBundleInfos()
Returns a List
|
java.util.List<IVersionedId> |
getBundles(boolean includeFragments)
Returns a List
|
java.lang.String |
getConfigIniPath() |
java.lang.String |
getConfigIniPath(java.lang.String os)
Returns the path to the config.ini file as specified in the .product file.
|
java.util.Properties |
getConfigProperties() |
java.util.Map<java.lang.String,BundleInfo> |
getConfigurationInfo() |
java.util.Map<java.lang.String,java.lang.String> |
getConfigurationProperties()
Returns the properties found in .product file.
|
java.util.Map<java.lang.String,java.lang.String> |
getConfigurationProperties(java.lang.String os,
java.lang.String arch)
Returns the properties found in .product file that are valid
for the specified platform os and architecture.
|
java.util.List<IVersionedId> |
getFeatures()
Returns a List
|
java.util.List<IVersionedId> |
getFeatures(int options)
Returns the features listed in the product.
|
java.util.List<IVersionedId> |
getFragments()
Returns a list
|
java.lang.String[] |
getIcons() |
java.lang.String[] |
getIcons(java.lang.String os)
Returns a list of icons for this product for a given 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()
Returns the license text for this product
|
java.lang.String |
getLicenseURL()
Returns the license URL for this product
|
java.io.File |
getLocation()
Gets the location of the .product file.
|
ProductContentType |
getProductContentType()
Specifies what kind of installable units (e.g. bundles, features or everything) are included in the product.
|
java.util.List<FeatureEntry> |
getProductEntries() |
java.lang.String |
getProductId()
Returns the Product extension point ID
|
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 |
getProgramArguments(java.lang.String os,
java.lang.String arch)
Returns the program arguments for a specific platform.
|
java.util.List<IRepositoryReference> |
getRepositoryEntries()
Returns a List
|
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 |
getVM(java.lang.String os)
Returns the VM associated as Execution Environment with the given OS.
|
java.lang.String |
getVMArguments(java.lang.String os)
Returns the VM arguments for a specific platform.
|
java.lang.String |
getVMArguments(java.lang.String os,
java.lang.String arch)
Returns the VM arguments for a specific platform and architecture
combination.
|
boolean |
hasBundles(boolean includeFragments)
Returns
true when getBundles(includeFragments) returns a non-empty list. |
boolean |
hasFeatures()
Returns
true when getFeatures() returns a non-empty list. |
boolean |
haveCustomConfig() |
boolean |
includeLaunchers()
Determines if the launchers should be included in the published product
|
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.
|
public static final java.lang.String GENERIC_VERSION_NUMBER
protected static final java.lang.String ATTRIBUTE_FRAGMENT
protected static final java.lang.String ATTRIBUTE_VERSION
protected static final java.lang.String ATTRIBUTE_ID
protected java.util.List<FeatureEntry> plugins
protected java.util.List<FeatureEntry> fragments
public ProductFile(java.lang.String location,
java.lang.String os)
throws CoreException
CoreExceptionpublic ProductFile(java.lang.String location)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getLauncherName()
getLauncherName in interface IProductDescriptorpublic java.io.File getLocation()
getLocation in interface IProductDescriptorpublic java.util.Map<java.lang.String,java.lang.String> getConfigurationProperties()
getConfigurationProperties in interface IProductDescriptorpublic java.util.Map<java.lang.String,java.lang.String> getConfigurationProperties(java.lang.String os,
java.lang.String arch)
getConfigurationProperties in interface IProductDescriptorpublic java.util.List<IVersionedId> getBundles(boolean includeFragments)
getBundles in interface IProductDescriptorincludeFragments - Indicates whether or not fragments should
be included in the listpublic boolean hasBundles(boolean includeFragments)
IProductDescriptortrue when getBundles(includeFragments) returns a non-empty list.hasBundles in interface IProductDescriptorpublic java.util.List<BundleInfo> getBundleInfos()
getBundleInfos in interface IProductDescriptorpublic java.util.List<IVersionedId> getFragments()
getFragments in interface IProductDescriptorIProductDescriptor.useFeatures()public java.util.List<IVersionedId> getFeatures()
getFeatures in interface IProductDescriptorpublic boolean hasFeatures()
IProductDescriptortrue when getFeatures() returns a non-empty list.hasFeatures in interface IProductDescriptorpublic java.util.List<IVersionedId> getFeatures(int options)
IProductDescriptorIProductDescriptor.useFeatures() returns true.getFeatures in interface IProductDescriptoroptions - bitmask to indicate what kind of features to return.IProductDescriptor.INCLUDED_FEATURES,
IProductDescriptor.ROOT_FEATURESpublic java.util.List<FeatureEntry> getProductEntries()
public boolean containsPlugin(java.lang.String plugin)
public java.lang.String[] getIcons()
public java.lang.String[] getIcons(java.lang.String os)
IProductDescriptorgetIcons in interface IProductDescriptorpublic java.lang.String getConfigIniPath(java.lang.String os)
IProductDescriptorgetConfigIniPath in interface IProductDescriptorpublic java.lang.String getConfigIniPath()
public boolean haveCustomConfig()
public java.lang.String getId()
getId in interface IProductDescriptorpublic java.lang.String getProductId()
IProductDescriptorgetProductId in interface IProductDescriptorpublic java.lang.String getSplashLocation()
getSplashLocation in interface IProductDescriptorpublic java.lang.String getProductName()
getProductName in interface IProductDescriptorpublic java.lang.String getApplication()
getApplication in interface IProductDescriptorpublic boolean useFeatures()
useFeatures in interface IProductDescriptorpublic java.lang.String getVersion()
getVersion in interface IProductDescriptorpublic boolean includeLaunchers()
IProductDescriptorincludeLaunchers in interface IProductDescriptorpublic java.util.Map<java.lang.String,BundleInfo> getConfigurationInfo()
public java.util.Properties getConfigProperties()
public java.lang.String getVMArguments(java.lang.String os)
getVMArguments in interface IProductDescriptorpublic java.lang.String getVMArguments(java.lang.String os,
java.lang.String arch)
getVMArguments in interface IProductDescriptorpublic java.lang.String getProgramArguments(java.lang.String os)
getProgramArguments in interface IProductDescriptorpublic java.lang.String getProgramArguments(java.lang.String os,
java.lang.String arch)
getProgramArguments in interface IProductDescriptorpublic java.lang.String getLicenseText()
IProductDescriptorgetLicenseText in interface IProductDescriptorpublic java.lang.String getLicenseURL()
IProductDescriptorgetLicenseURL in interface IProductDescriptorpublic java.util.List<IRepositoryReference> getRepositoryEntries()
IProductDescriptorgetRepositoryEntries in interface IProductDescriptorpublic void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandlerpublic void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
endElement in interface org.xml.sax.ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandlerpublic void characters(char[] ch,
int start,
int length)
characters in interface org.xml.sax.ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandlerpublic java.lang.String getVM(java.lang.String os)
IProductDescriptorgetVM in interface IProductDescriptoros - the OSprotected void processPlugin(org.xml.sax.Attributes attributes)
public ProductContentType getProductContentType()
IProductDescriptorgetProductContentType in interface IProductDescriptor