SalesPoint Framework v3.1

data
Interface CatalogItem

All Superinterfaces:
Comparable, Nameable, Serializable
All Known Subinterfaces:
Catalog, Currency, CurrencyItem, ListenableCatalog
All Known Implementing Classes:
AbstractCurrency, CatalogFilter, CatalogImpl, CatalogItemImpl, CurrencyFilter, CurrencyImpl, CurrencyItemImpl

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
Author:
Steffen Zschaler

Field Summary
static String VALUE_PROPERTY
          The programmatical name for the "value" property.
 
Fields inherited from interface 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".

See Also:
Constant Field Values
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.1