SalesPoint Framework v3.0

data
Interface CatalogItem

All Known Subinterfaces:
Catalog, Currency, CurrencyItem, ListenableCatalog
All Known Implementing Classes:
CatalogItemImpl

public interface CatalogItem
extends Nameable, Comparable

An item in a Catalog.

CatalogItems describe available objects by their attributes. The only attribute that is mandatory is a key (String), usually a name, but it could be an ID-Number or anything. A CatalogItem can have a value attribute.

Note that the name as obtained via Nameable.getName() is used as the CatalogItem's key when inserting the CatalogItem inside a Catalog.

CatalogItems are contained in Catalogs.

Since:
v0.5
Version:
2.0 18/08/1999
Author:
Steffen Zschaler

Field Summary
static String VALUE_PROPERTY
          The programmatical name for the "value" property.
 
Fields inherited from class data.Nameable
NAME_PROPERTY
 
Method Summary
 void addValueListener(PropertyChangeListener pcl)
          Add a PropertyChangeListener that will receive events whenever the "value" property changes.
 Catalog getCatalog()
          Get the Catalog that currently contains this CatalogItem.
 Value getValue()
          Get the default value of this CatalogItem.
 void removeValueListener(PropertyChangeListener pcl)
          Remove a PropertyChangeListener for the "value" property.
 
Methods inherited from interface data.Nameable
addNameListener, addPropertyChangeListener, attach, detachNC, getName, removeNameListener, removePropertyChangeListener, setName
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

VALUE_PROPERTY

public static final String VALUE_PROPERTY
The programmatical name for the "value" property. This is "value".
Method Detail

getValue

public Value getValue()
Get the default value of this CatalogItem. Although CatalogItems have a default value, you can use any other value through the CatalogItemValue adapter.
Override:
Always.

getCatalog

public Catalog getCatalog()
Get the Catalog that currently contains this CatalogItem.
Override:
Always.

addValueListener

public void addValueListener(PropertyChangeListener pcl)
Add a PropertyChangeListener that will receive events whenever the "value" property changes.
Override:
Always.

removeValueListener

public void removeValueListener(PropertyChangeListener pcl)
Remove a PropertyChangeListener for the "value" property.
Override:
Always.

SalesPoint Framework v3.0