Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

oracle.ide
Class ProductInformation

java.lang.Object
  extended by oracle.ide.ProductInformation

public final class ProductInformation
extends java.lang.Object

This class provides product-level information such as the product name, icon, copyright text, welcome page, and any other information stored in the <product-hook>.

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 Summary
ProductInformation(HashStructure hash)
          Creates an instance of ProductInformation based on the specified HashStructure.
 
Method Summary
 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()
          The URL of the welcome page or null if none.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProductInformation

public ProductInformation(HashStructure hash)
Creates an instance of ProductInformation based on the specified HashStructure. The IDE framework creates a ProductInformation instance automatically when processing the <product-hook> element in the extension manifest of the extension that is specified as being the "product extension", so an extension writer should not need to create a ProductInformation instance directly.

Method Detail

getProductInformation

public static final ProductInformation getProductInformation()
Returns the ProductInformation instance created by the IDE framework after processing the product extension's manifest.


setProductInformation

public static final void setProductInformation(ProductInformation info)
Method used by the IDE framework to set the ProductInformation instance that will be returned from getProductInformation().


getProductID

public static final java.lang.String getProductID()
Returns the extension ID of the extension that represents the entire product. This is the extension containing the <product-hook> element in its extension.xml.


getShortName

public final java.lang.String getShortName()
Returns the short, simple name of the product without the company name, version number, or edition name. Examples: "JDeveloper", "SQL Developer", "Warehouse Builder".


getName

public final java.lang.String getName()
Returns the full product name, which may include the company name, version number, and edition name. Examples: "Oracle JDeveloper Fusion", "Oracle SQL Developer 1.0.0".


getEditionName

public final java.lang.String getEditionName()
Returns the edition name of the product, if any. Examples: "Java Edition", "J2EE Edition". Returns null if the product information has no edition name.


getIcon

public final IconDescription getIcon()
Returns an IconDescription of a 32x32 icon image for the product. This icon is used as the icon for the main window.


getAdditionalIcons

public java.util.List<IconDescription> getAdditionalIcons()

getWelcomePage

public final java.net.URL getWelcomePage()
The URL of the welcome page or null if none.


getCopyright

public final java.lang.String getCopyright()
Returns the copyright text to display in the about box. Example:


getImage

public final IconDescription getImage()
Returns the product logo to display in the about box. The typical image size is 48x48.


getBannerImage

public final IconDescription getBannerImage()
Returns the banner image shown in the about box. This image typically also appears in promotional materials for the product, such as in magazines or ad banners on the web. There is no exact typical size for this image, though it usually has an aspect ratio of about 3-4 to 1.


getHashStructure

public final 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. Because the HashStructure is read-only, it will throw 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.


setUserAgentExtras

public final void setUserAgentExtras(java.lang.String userAgentExtras)
Sets extra information to send with the user-agent of this product when connecting to HTTP resources.

Parameters:
userAgentExtras - extra information to send with the user agent. If null, then the product edition (the result of #getEditionName()) will be sent.
Since:
11.0

getUserAgentExtras

public final java.lang.String getUserAgentExtras()
Gets extra information to send with the user-agent of this product.

Returns:
extra information to send with the user-agent of this product. By default, this returns the same as getEditionName(). Calling setUserAgentExtras(String) will override the default behavior.
Since:
11.0

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

Copyright © 1997, 2010, Oracle. All rights reserved.