SalesPoint v3.3 API

data
Interface CatalogItem

All Superinterfaces:
Comparable<Object>, Nameable, Serializable
All Known Subinterfaces:
Catalog<T>, Currency<T>, CurrencyItem, ListenableCatalog<T>
All Known Implementing Classes:
AbstractCurrency, CatalogFilter, CatalogImpl, CatalogItemImpl, CountingStockTableModel.Record, CurrencyFilter, CurrencyImpl, CurrencyItemImpl, EUROCurrencyImpl

public interface CatalogItem
extends Nameable, Comparable<Object>

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

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

See Also:
Constant Field Values
Method Detail

getValue

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

Catalog getCatalog()
Get the Catalog that currently contains this CatalogItem.

Override:
Always

addValueListener

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

Override:
Always

removeValueListener

void removeValueListener(PropertyChangeListener pcl)
Remove a PropertyChangeListener for the "value" property.

Override:
Always

SalesPoint v3.3 API