public final class ProductInformation
extends java.lang.Object
Custom product-level properties can be obtained through the
HashStructure
returned by getHashStructure()
. The
typical approach is to wrap that HashStructure in a subclass of
HashStructureAdapter
to encapsulate the property lookups, to shield clients from the
string constants and any further levels of adapters used.
Constructor and Description |
---|
ProductInformation(HashStructure hash)
Creates an instance of ProductInformation based on the specified
HashStructure.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<IconDescription> |
getAdditionalIcons() |
IconDescription |
getBannerImage()
Returns the banner image shown in the about box.
|
java.lang.String |
getCopyright()
Returns the copyright text to display in the about box.
|
java.lang.String |
getEditionName()
Returns the edition name of the product, if any.
|
HashStructure |
getHashStructure()
Returns a read-only HashStructure containing the information that was
read from the "product-hook> element of the product extension's
manifest file.
|
IconDescription |
getIcon()
Returns an
IconDescription of a 32x32 icon image
for the product. |
IconDescription |
getImage()
Returns the product logo to display in the about box.
|
java.lang.String |
getName()
Returns the full product name, which may include the company
name, version number, and edition name.
|
static java.lang.String |
getProductID()
Returns the extension ID of the extension that represents the
entire product.
|
static ProductInformation |
getProductInformation()
Returns the ProductInformation instance created by the IDE
framework after processing the product extension's manifest.
|
java.lang.String |
getShortName()
Returns the short, simple name of the product without the company
name, version number, or edition name.
|
java.lang.String |
getUserAgentExtras()
Gets extra information to send with the user-agent of this product.
|
java.net.URL |
getWelcomePage()
Deprecated.
since 12.1.1.0 with no replacement
|
static void |
setProductInformation(ProductInformation info)
Method used by the IDE framework to set the ProductInformation
instance that will be returned from
getProductInformation() . |
void |
setUserAgentExtras(java.lang.String userAgentExtras)
Sets extra information to send with the user-agent of this product
when connecting to HTTP resources.
|
public ProductInformation(HashStructure hash)
public static final ProductInformation getProductInformation()
public static final void setProductInformation(ProductInformation info)
getProductInformation()
.public static final java.lang.String getProductID()
public final java.lang.String getShortName()
public final java.lang.String getName()
public final java.lang.String getEditionName()
public final IconDescription getIcon()
IconDescription
of a 32x32 icon image
for the product. This icon is used as the icon for the
main window.public java.util.List<IconDescription> getAdditionalIcons()
@Deprecated public final java.net.URL getWelcomePage()
public final java.lang.String getCopyright()
public final IconDescription getImage()
public final IconDescription getBannerImage()
public final HashStructure getHashStructure()
UnsupportedOperationException
on any method call that
attempts to modify the HashStructure.
All properties specified in the "product-hook> are available in
the returned HashStructure. The format of how the properties are
mapped from "product-hook> to the HashStructure is documented
in HashStructureHook
.
public final void setUserAgentExtras(java.lang.String userAgentExtras)
userAgentExtras
- extra information to send with the user agent.
If null, then the product edition (the result of #getEditionName())
will be sent.public final java.lang.String getUserAgentExtras()
getEditionName()
.
Calling setUserAgentExtras(String)
will override the
default behavior.