com.jp.protection.pub
Class ProductInfo

java.lang.Object
  extended by com.jp.protection.pub.ProductInfo
All Implemented Interfaces:
java.io.Serializable

public class ProductInfo
extends java.lang.Object
implements java.io.Serializable

Class intended to hold product and publisher's company information used by various Protection! classes.

See Also:
Serialized Form

Nested Class Summary
static class ProductInfo.ProductInfoLink
          Class that holds the properties of a product information links such as text, tooltip text and URL.
 
Field Summary
protected  java.lang.String fCompany
           
protected  java.lang.String fCopyright
           
protected  java.lang.String fEdition
           
protected  java.lang.String fEditionName
           
protected  java.lang.String fID
           
protected  int fMajorVersion
           
protected  int fMinorVersion
           
protected  java.lang.String fName
           
protected  java.util.HashMap fProductEditionMap
           
protected  dev.util.collections.HashedBoundList fProductInfoLinks
           
protected  java.lang.String fShortName
           
static java.lang.String PRODUCT_INFO_LINK_ID_ACTIVATE
           
static java.lang.String PRODUCT_INFO_LINK_ID_BUY_ONLINE
           
static java.lang.String PRODUCT_INFO_LINK_ID_DEACTIVATE
           
static java.lang.String PRODUCT_INFO_LINK_ID_FEEDBACK
           
static java.lang.String PRODUCT_INFO_LINK_ID_SALES
           
static java.lang.String PRODUCT_INFO_LINK_ID_SITE
           
static java.lang.String PRODUCT_INFO_LINK_ID_SUPPORT
           
static java.lang.String PROPERTY_COMPANY
           
static java.lang.String PROPERTY_COPYRIGHT
           
static java.lang.String PROPERTY_EDITION
           
static java.lang.String PROPERTY_EDITION_NAME
           
static java.lang.String PROPERTY_FEEDBACK_TEXT
           
static java.lang.String PROPERTY_FEEDBACK_TOOLTIP_TEXT
           
static java.lang.String PROPERTY_FEEDBACK_URL
           
static java.lang.String PROPERTY_ID
           
static java.lang.String PROPERTY_MAJOR_VERSION
           
static java.lang.String PROPERTY_MINOR_VERSION
           
static java.lang.String PROPERTY_NAME
           
static java.lang.String PROPERTY_SHORT_NAME
           
static java.lang.String PROPERTY_SITE_TEXT
           
static java.lang.String PROPERTY_SITE_TOOLTIP_TEXT
           
static java.lang.String PROPERTY_SITE_URL
           
static long serialVersionUID
           
 
Constructor Summary
ProductInfo()
           
 
Method Summary
 void addProductEditionName(java.lang.String aProductEditionID, java.lang.String aProductEditionName)
          Specifies product edition name for the given product edition identifier
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds property change listener to the listener's list
protected  void firePropertyChange(java.beans.PropertyChangeEvent e)
           
 java.lang.String getCompany()
          Returns the name of the company
 java.lang.String getCopyright()
          Returns product's copyright notice
static java.lang.String getDomain(java.lang.String anUrl)
           
 java.lang.String getEdition()
          Returns product's edition (represented by the product edition identifier).
 java.lang.String getEditionName()
          Returns product's edition name
 java.lang.String getFeedbackText()
          Convenience method to obtain feedback link's text
 java.lang.String getFeedbackTooltipText()
          Convenience method to obtain feedback link's tooltip text
 java.lang.String getFeedbackURL()
          Convenience method to obtain feedback link's URL
 java.lang.String getID()
          Returns product's identifier.
 int getMajorVersion()
          Returns product's major version.
 int getMinorVersion()
          Returns product's minor version.
 java.lang.String getName()
          Returns product's name
 java.util.HashMap getProductEditionMap()
          Returns product edition identifier to name mapping
 java.lang.String getProductEditionName(java.lang.String aProductEditionID)
          Returns product edition name for the given product edition identifier
 ProductInfo.ProductInfoLink getProductInfoLink(int anIndex)
          Returns product information link by its index
 ProductInfo.ProductInfoLink getProductInfoLink(java.lang.String anID)
          Returns product information link by its identifier
 dev.util.collections.HashedBoundList getProductInfoLinks()
          Returns the list of product information links.
 java.lang.String getShortName()
          Returns product's short name
 java.lang.String getSiteText()
          Convenience method to obtain site link's text
 java.lang.String getSiteTooltipText()
          Convenience method to obtain site link's tooltip text
 java.lang.String getSiteURL()
          Convenience method to obtain site link's URL
 java.lang.String getSiteURLDomain()
          Convenience method to obtain site link's URL domain
 void removeProductEditionName(java.lang.String aProductEditionID)
          Removes product edition name for the given product edition identifier
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Removes property change listener from the listener's list
 void setCompany(java.lang.String aCompany)
          Specifies the name of the company
 void setCopyright(java.lang.String aCopyright)
          Specifies product's copyright notice
 void setEdition(java.lang.String aEdition)
          Specifies product's edition (represented by the product edition identifier).
 void setEditionName(java.lang.String aEditionName)
          Specifies product's edition name
 void setID(java.lang.String aID)
          Specifies identifier for the product.
 void setMajorVersion(int aMajorVersion)
          Specifies major version for the product.
 void setMinorVersion(int aMinorVersion)
          Specifies minor version for the product.
 void setName(java.lang.String aName)
          Specifies the name of the product
 void setShortName(java.lang.String aShortName)
          Specifies the short name of the product
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

PROPERTY_NAME

public static final java.lang.String PROPERTY_NAME
See Also:
Constant Field Values

PROPERTY_SHORT_NAME

public static final java.lang.String PROPERTY_SHORT_NAME
See Also:
Constant Field Values

PROPERTY_ID

public static final java.lang.String PROPERTY_ID
See Also:
Constant Field Values

PROPERTY_MAJOR_VERSION

public static final java.lang.String PROPERTY_MAJOR_VERSION
See Also:
Constant Field Values

PROPERTY_MINOR_VERSION

public static final java.lang.String PROPERTY_MINOR_VERSION
See Also:
Constant Field Values

PROPERTY_EDITION

public static final java.lang.String PROPERTY_EDITION
See Also:
Constant Field Values

PROPERTY_EDITION_NAME

public static final java.lang.String PROPERTY_EDITION_NAME
See Also:
Constant Field Values

PROPERTY_COMPANY

public static final java.lang.String PROPERTY_COMPANY
See Also:
Constant Field Values

PROPERTY_COPYRIGHT

public static final java.lang.String PROPERTY_COPYRIGHT
See Also:
Constant Field Values

PROPERTY_SITE_TEXT

public static final java.lang.String PROPERTY_SITE_TEXT
See Also:
Constant Field Values

PROPERTY_SITE_URL

public static final java.lang.String PROPERTY_SITE_URL
See Also:
Constant Field Values

PROPERTY_SITE_TOOLTIP_TEXT

public static final java.lang.String PROPERTY_SITE_TOOLTIP_TEXT
See Also:
Constant Field Values

PROPERTY_FEEDBACK_TEXT

public static final java.lang.String PROPERTY_FEEDBACK_TEXT
See Also:
Constant Field Values

PROPERTY_FEEDBACK_URL

public static final java.lang.String PROPERTY_FEEDBACK_URL
See Also:
Constant Field Values

PROPERTY_FEEDBACK_TOOLTIP_TEXT

public static final java.lang.String PROPERTY_FEEDBACK_TOOLTIP_TEXT
See Also:
Constant Field Values

PRODUCT_INFO_LINK_ID_SITE

public static final java.lang.String PRODUCT_INFO_LINK_ID_SITE
See Also:
Constant Field Values

PRODUCT_INFO_LINK_ID_FEEDBACK

public static final java.lang.String PRODUCT_INFO_LINK_ID_FEEDBACK
See Also:
Constant Field Values

PRODUCT_INFO_LINK_ID_SUPPORT

public static final java.lang.String PRODUCT_INFO_LINK_ID_SUPPORT
See Also:
Constant Field Values

PRODUCT_INFO_LINK_ID_SALES

public static final java.lang.String PRODUCT_INFO_LINK_ID_SALES
See Also:
Constant Field Values

PRODUCT_INFO_LINK_ID_BUY_ONLINE

public static final java.lang.String PRODUCT_INFO_LINK_ID_BUY_ONLINE
See Also:
Constant Field Values

PRODUCT_INFO_LINK_ID_ACTIVATE

public static final java.lang.String PRODUCT_INFO_LINK_ID_ACTIVATE
See Also:
Constant Field Values

PRODUCT_INFO_LINK_ID_DEACTIVATE

public static final java.lang.String PRODUCT_INFO_LINK_ID_DEACTIVATE
See Also:
Constant Field Values

fID

protected java.lang.String fID

fName

protected java.lang.String fName

fShortName

protected java.lang.String fShortName

fMajorVersion

protected int fMajorVersion

fMinorVersion

protected int fMinorVersion

fEdition

protected java.lang.String fEdition

fEditionName

protected java.lang.String fEditionName

fCompany

protected java.lang.String fCompany

fCopyright

protected java.lang.String fCopyright

fProductInfoLinks

protected dev.util.collections.HashedBoundList fProductInfoLinks

fProductEditionMap

protected java.util.HashMap fProductEditionMap
Constructor Detail

ProductInfo

public ProductInfo()
Method Detail

getProductInfoLinks

public dev.util.collections.HashedBoundList getProductInfoLinks()
Returns the list of product information links.

Returns:
list of the ProductInfoLink instances

getProductInfoLink

public ProductInfo.ProductInfoLink getProductInfoLink(int anIndex)
Returns product information link by its index

Parameters:
anIndex - index of the product information link to return
Returns:
a ProductInfoLink instance

getProductInfoLink

public ProductInfo.ProductInfoLink getProductInfoLink(java.lang.String anID)
Returns product information link by its identifier

Parameters:
anID - identifier of the product information link to return
Returns:
a ProductInfoLink instance

getEdition

public java.lang.String getEdition()
Returns product's edition (represented by the product edition identifier).

Returns:
product's edition

setEdition

public void setEdition(java.lang.String aEdition)
Specifies product's edition (represented by the product edition identifier).

Parameters:
aEdition - product's edition to set

getEditionName

public java.lang.String getEditionName()
Returns product's edition name

Returns:
product's edition name

setEditionName

public void setEditionName(java.lang.String aEditionName)
Specifies product's edition name

Parameters:
aEditionName - product's edition name to set

getMajorVersion

public int getMajorVersion()
Returns product's major version.

Returns:
product's major version

setMajorVersion

public void setMajorVersion(int aMajorVersion)
Specifies major version for the product.

Parameters:
aMajorVersion - product's major version

getMinorVersion

public int getMinorVersion()
Returns product's minor version.

Returns:
product's minor version

setMinorVersion

public void setMinorVersion(int aMinorVersion)
Specifies minor version for the product.

Parameters:
aMinorVersion - product major version

getID

public java.lang.String getID()
Returns product's identifier.

Returns:
product's identifier

setID

public void setID(java.lang.String aID)
Specifies identifier for the product.

Parameters:
aID - product's identifier

getName

public java.lang.String getName()
Returns product's name

Returns:
product's name

setName

public void setName(java.lang.String aName)
Specifies the name of the product

Parameters:
aName - name of the product

setShortName

public void setShortName(java.lang.String aShortName)
Specifies the short name of the product

Parameters:
aShortName - short name of the product

getShortName

public java.lang.String getShortName()
Returns product's short name

Returns:
product's short name

getFeedbackText

public java.lang.String getFeedbackText()
Convenience method to obtain feedback link's text

Returns:
feedback text

getFeedbackTooltipText

public java.lang.String getFeedbackTooltipText()
Convenience method to obtain feedback link's tooltip text

Returns:
feedback text

getFeedbackURL

public java.lang.String getFeedbackURL()
Convenience method to obtain feedback link's URL

Returns:
feedback text

getCompany

public java.lang.String getCompany()
Returns the name of the company

Returns:
the name of the company

setCompany

public void setCompany(java.lang.String aCompany)
Specifies the name of the company

Parameters:
aCompany - the name of the company

getCopyright

public java.lang.String getCopyright()
Returns product's copyright notice

Returns:
product's copyright notice

setCopyright

public void setCopyright(java.lang.String aCopyright)
Specifies product's copyright notice

Parameters:
aCopyright - product's copyright notice

getSiteText

public java.lang.String getSiteText()
Convenience method to obtain site link's text

Returns:
feedback text

getSiteTooltipText

public java.lang.String getSiteTooltipText()
Convenience method to obtain site link's tooltip text

Returns:
feedback text

getSiteURL

public java.lang.String getSiteURL()
Convenience method to obtain site link's URL

Returns:
feedback text

getSiteURLDomain

public java.lang.String getSiteURLDomain()
Convenience method to obtain site link's URL domain

Returns:
domain if can be obtained; null otherwise

getDomain

public static java.lang.String getDomain(java.lang.String anUrl)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes property change listener from the listener's list

Parameters:
l - property change listener to remove

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds property change listener to the listener's list

Parameters:
l - property change listener to add

firePropertyChange

protected void firePropertyChange(java.beans.PropertyChangeEvent e)

getProductEditionMap

public java.util.HashMap getProductEditionMap()
Returns product edition identifier to name mapping

Returns:
product edition identifier to name mapping

getProductEditionName

public java.lang.String getProductEditionName(java.lang.String aProductEditionID)
Returns product edition name for the given product edition identifier

Parameters:
aProductEditionID - product edition identifier
Returns:
product edition name

addProductEditionName

public void addProductEditionName(java.lang.String aProductEditionID,
                                  java.lang.String aProductEditionName)
Specifies product edition name for the given product edition identifier

Parameters:
aProductEditionID - product edition identifier
aProductEditionName - product edition name

removeProductEditionName

public void removeProductEditionName(java.lang.String aProductEditionID)
Removes product edition name for the given product edition identifier

Parameters:
aProductEditionID - product edition identifier