All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.beans.samples.dips.license.HostAndDurationLicensePolicyCustomizer

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----com.ibm.beans.samples.dips.license.HostAndDurationLicensePolicyCustomizer

public class HostAndDurationLicensePolicyCustomizer
extends Panel
implements Customizer
The HostAndDurationLicensePolicyCustomizer serves three purposes depending on the state of the object it is customizing. The three states of the object are: The customizer presents a different GUI and customizes the object differently depending on the state. What happens in each state is:
Initialization
During this state, the customizer presents an initialization GUI that initializes the license policy with proper keys and saves a clone of the policy for later use by license issuers.
Issue license
GUI for retrieving customer information such as the name of the host the bean runs on and the expiration date of the license. Then, an encoded signature is generated and the information given to the customer.
Customer
GUI for entering the encoded license information from the license issuer.


Constructor Index

 o HostAndDurationLicensePolicyCustomizer()

Method Index

 o addPropertyChangeListener(PropertyChangeListener)
Adds a listener to get notified when the customizer changes the bean in a significant manner.
 o createCustomerGUI()
Creates the GUI that customers use to update their license policy with appropriate information from the license issuer.
 o createIssuerGUI()
Creates a customizable GUI for the issuance of licenses.
 o getPreferredSize()
Gets the preferred width and height of the customizer.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a listener from the notification list.
 o setObject(Object)
Sets the object instance with which this customizer is to interact.

Constructors

 o HostAndDurationLicensePolicyCustomizer
 public HostAndDurationLicensePolicyCustomizer()

Methods

 o setObject
 public void setObject(Object bean)
Sets the object instance with which this customizer is to interact. Once the object is set, the proper GUI is determined and created.

Parameters:
bean - The bean instance to customize.
 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener to get notified when the customizer changes the bean in a significant manner. Significant changes include changes to the property values of the license policy.

Parameters:
listener - The object to be notified of changes.
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a listener from the notification list.

Parameters:
listener - The object to be removed from the notification list.
 o getPreferredSize
 public Dimension getPreferredSize()
Gets the preferred width and height of the customizer.

Returns:
The preferred dimensions of the customizer.
Overrides:
getPreferredSize in class Container
 o createIssuerGUI
 protected void createIssuerGUI()
Creates a customizable GUI for the issuance of licenses. This GUI includes capabilities to load existing issuer license policy objects that were serialized during initialization. It must allow the entering of the same data that the license will validate, allow for the generation of a new license (calling sign() on the policy object), and the distribution of the encoded signature to the customer using some means.

 o createCustomerGUI
 protected void createCustomerGUI()
Creates the GUI that customers use to update their license policy with appropriate information from the license issuer. This information includes the presentation of programmatically determined data, such as current host name, and input of non-programmatic data. Non-programmatic data include dates and encoded license signatures.


All Packages  Class Hierarchy  This Package  Previous  Next  Index