package data; import java.beans.*; /** * An item in a {@link Catalog}. * * <p>CatalogItems describe available objects by their attributes. The only attribute that is mandatory is * a {@link Nameable#getName key} ({@link String}), usually a name, but it could be an ID-Number or * anything. A CatalogItem can have a {@link #getValue value} attribute.<p> * * <p><strong>Note</strong> that the name as obtained via {@link Nameable#getName} is used as the * CatalogItem's key when inserting the CatalogItem inside a Catalog.</p> * * <p>CatalogItems are contained in {@link Catalog Catalogs}.</p> * * @author Steffen Zschaler * @version 2.0 18/08/1999 * @since v0.5 */ public interface CatalogItem extends Nameable, Comparable { /** * The programmatical name for the "value" property. This is "value". */ public static final String VALUE_PROPERTY = "value"; /** * Get the default value of this CatalogItem. Although CatalogItems have a default value, you can use any * other value through the {@link CatalogItemValue} adapter. * * @override Always */ public Value getValue(); /** * Get the Catalog that currently contains this CatalogItem. * * @override Always */ public Catalog getCatalog(); /** * Add a PropertyChangeListener that will receive events whenever the "value" property changes. * * @override Always */ public void addValueListener (PropertyChangeListener pcl); /** * Remove a PropertyChangeListener for the "value" property. * * @override Always */ public void removeValueListener (PropertyChangeListener pcl); }