|
SalesPoint Framework v3.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--data.filters.CatalogFilter
A filter for Catalogs.
CatalogFilters can be used to present partial views of a Catalog to parts of your application, e.g., GUI elements. However, you cannot use a CatalogFilter as a replacement for a 'real' Catalog, e.g., as an item in another Catalog.
The actual filter condition is defined by overriding method match(data.CatalogItem)
.
Field Summary | |
protected Catalog |
m_cOrg
The Catalog that is being filtered. |
protected ListenerHelper |
m_lhListeners
The listeners that listen for events from this Catalog. |
Constructor Summary | |
CatalogFilter(Catalog cOrg)
Create a new CatalogFilter. |
Method Summary | |
void |
add(CatalogItem ci,
DataBasket db)
Add the given item to the source Catalog. |
void |
addCatalogChangeListener(CatalogChangeListener ccl)
Add a listener that wishes to receive events when the filtered Catalog changes. |
void |
addedCatalogItem(CatalogChangeEvent e)
Translate and propagate the event to all listeners of this Catalog. |
void |
addNameListener(PropertyChangeListener pcl)
Register the listener with the source Catalog. |
void |
addPropertyChangeListener(PropertyChangeListener pcl)
Register the listener with the source Catalog. |
void |
addValueListener(PropertyChangeListener pcl)
Register the listener with the source Catalog. |
NameContext |
attach(NameContext nc)
Attach the given name context to the source Catalog. |
void |
canEditCatalogItem(CatalogChangeEvent e)
Translate and propagate the event to all listeners of this Catalog. |
void |
canRemoveCatalogItem(CatalogChangeEvent e)
Translate and propagate the event to all listeners of this Catalog. |
void |
commitedAddCatalogItem(CatalogChangeEvent e)
Translate and propagate the event to all listeners of this Catalog. |
void |
commitEditCatalogItem(CatalogChangeEvent e)
Translate and propagate the event to all listeners of this Catalog. |
void |
commitedRemoveCatalogItem(CatalogChangeEvent e)
Translate and propagate the event to all listeners of this Catalog. |
int |
compareTo(Object o)
Compare the source Catalog to the given object. |
boolean |
contains(String sKey,
DataBasket db)
Check whether the indicated item is contained in the filtered Catalog. |
NameContext |
detachNC()
Detach the current name context from the source Catalog. |
void |
editingCatalogItem(CatalogChangeEvent e)
Translate and propagate the event to all listeners of this Catalog. |
protected void |
fireCanEditCatalogItem(CatalogItem ci,
DataBasket db)
Fire the event to all listeners of this Catalog. |
protected void |
fireCanRemoveCatalogItem(CatalogItem ci,
DataBasket db)
Fire the event to all listeners of this Catalog. |
protected void |
fireCatalogItemAddCommit(CatalogItem ci,
DataBasket db)
Fire the event to all listeners of this Catalog. |
protected void |
fireCatalogItemAdded(CatalogItem ci,
DataBasket db)
Fire the event to all listeners of this Catalog. |
protected void |
fireCatalogItemAddRollback(CatalogItem ci,
DataBasket db)
Fire the event to all listeners of this Catalog. |
protected void |
fireCatalogItemRemoveCommit(CatalogItem ci,
DataBasket db)
Fire the event to all listeners of this Catalog. |
protected void |
fireCatalogItemRemoved(CatalogItem ci,
DataBasket db)
Fire the event to all listeners of this Catalog. |
protected void |
fireCatalogItemRemoveRollback(CatalogItem ci,
DataBasket db)
Fire the event to all listeners of this Catalog. |
protected void |
fireCommitEditCatalogItem(CatalogItem ci,
DataBasket db)
Fire the event to all listeners of this Catalog. |
protected void |
fireEditingCatalogItem(CatalogItem ci,
DataBasket db)
Fire the event to all listeners of this Catalog. |
protected void |
fireNoEditCatalogItem(CatalogItem ci,
DataBasket db)
Fire the event to all listeners of this Catalog. |
protected void |
fireNoRemoveCatalogItem(CatalogItem ci,
DataBasket db)
Fire the event to all listeners of this Catalog. |
protected void |
fireRollbackEditCatalogItem(CatalogItem ci,
DataBasket db)
Fire the event to all listeners of this Catalog. |
CatalogItem |
get(String sKey,
DataBasket db,
boolean fForEdit)
Get the indicated item from the source Catalog if it is contained in the filtered Catalog. |
Catalog |
getCatalog()
Get the source Catalog's Catalog. |
Catalog |
getMainCatalog()
Get the source catalog. |
String |
getName()
Get the source Catalog's name. |
Value |
getValue()
Get the source Catalog's value. |
Iterator |
iterator(DataBasket db,
boolean fForEdit)
Get an iterator of all items that are contained in the filtered Catalog. |
Set |
keySet(DataBasket db)
Return a set that contains all keys for which a CatalogItem is contained in the filtered Catalog. |
protected abstract boolean |
match(CatalogItem ci)
Filter condition. |
void |
noEditCatalogItem(CatalogChangeEvent e)
Translate and propagate the event to all listeners of this Catalog. |
void |
noRemoveCatalogItem(CatalogChangeEvent e)
Translate and propagate the event to all listeners of this Catalog. |
CatalogItem |
remove(CatalogItem ci,
DataBasket db)
Remove the given item from the source Catalog if it is contained in the filtered Catalog. |
CatalogItem |
remove(String sKey,
DataBasket db)
Remove the given item from the source Catalog if it is contained in the filtered Catalog. |
void |
removeCatalogChangeListener(CatalogChangeListener ccl)
Remove a listener that received events when the filtered Catalog changed. |
void |
removedCatalogItem(CatalogChangeEvent e)
Translate and propagate the event to all listeners of this Catalog. |
void |
removeNameListener(PropertyChangeListener pcl)
Un-Register the listener with the source Catalog. |
void |
removePropertyChangeListener(PropertyChangeListener pcl)
Un-Register the listener with the source Catalog. |
void |
removeValueListener(PropertyChangeListener pcl)
Un-Register the listener with the source Catalog. |
void |
rollbackEditCatalogItem(CatalogChangeEvent e)
Translate and propagate the event to all listeners of this Catalog. |
void |
rolledbackAddCatalogItem(CatalogChangeEvent e)
Translate and propagate the event to all listeners of this Catalog. |
void |
rolledbackRemoveCatalogItem(CatalogChangeEvent e)
Translate and propagate the event to all listeners of this Catalog. |
void |
setName(String sName,
DataBasket db)
Set the source Catalog's name. |
int |
size(DataBasket db)
Calculate the size of the filtered Catalog. |
void |
subscribe()
Subscribe as a listener to the source Catalog if that is a ListenableCatalog . |
void |
unsubscribe()
Un-Subscribe as a listener from the source Catalog if that is a ListenableCatalog . |
void |
updateModel()
Empty method body. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected Catalog m_cOrg
protected ListenerHelper m_lhListeners
Constructor Detail |
public CatalogFilter(Catalog cOrg)
cOrg
- the Catalog to be filtered.Method Detail |
public int compareTo(Object o)
public NameContext detachNC()
public NameContext attach(NameContext nc)
public String getName()
public void setName(String sName, DataBasket db) throws NameContextException
public Value getValue()
public void addPropertyChangeListener(PropertyChangeListener pcl)
public void removePropertyChangeListener(PropertyChangeListener pcl)
public void addNameListener(PropertyChangeListener pcl)
public void removeNameListener(PropertyChangeListener pcl)
public void addValueListener(PropertyChangeListener pcl)
public void removeValueListener(PropertyChangeListener pcl)
public Catalog getCatalog()
public Catalog getMainCatalog()
public void add(CatalogItem ci, DataBasket db)
public CatalogItem remove(CatalogItem ci, DataBasket db) throws VetoException
public CatalogItem remove(String sKey, DataBasket db) throws VetoException
public CatalogItem get(String sKey, DataBasket db, boolean fForEdit) throws VetoException
public boolean contains(String sKey, DataBasket db)
public Iterator iterator(DataBasket db, boolean fForEdit)
public Set keySet(DataBasket db)
public int size(DataBasket db)
protected abstract boolean match(CatalogItem ci)
ci
- the item to be testedpublic void addedCatalogItem(CatalogChangeEvent e)
public void commitedAddCatalogItem(CatalogChangeEvent e)
public void rolledbackAddCatalogItem(CatalogChangeEvent e)
public void canRemoveCatalogItem(CatalogChangeEvent e) throws VetoException
public void noRemoveCatalogItem(CatalogChangeEvent e)
public void removedCatalogItem(CatalogChangeEvent e)
public void commitedRemoveCatalogItem(CatalogChangeEvent e)
public void rolledbackRemoveCatalogItem(CatalogChangeEvent e)
public void canEditCatalogItem(CatalogChangeEvent e) throws VetoException
public void noEditCatalogItem(CatalogChangeEvent e)
public void editingCatalogItem(CatalogChangeEvent e)
public void commitEditCatalogItem(CatalogChangeEvent e)
public void rollbackEditCatalogItem(CatalogChangeEvent e)
public void addCatalogChangeListener(CatalogChangeListener ccl)
public void removeCatalogChangeListener(CatalogChangeListener ccl)
protected void fireCatalogItemAdded(CatalogItem ci, DataBasket db)
protected void fireCatalogItemAddCommit(CatalogItem ci, DataBasket db)
protected void fireCatalogItemAddRollback(CatalogItem ci, DataBasket db)
protected void fireCatalogItemRemoved(CatalogItem ci, DataBasket db)
protected void fireCatalogItemRemoveCommit(CatalogItem ci, DataBasket db)
protected void fireCatalogItemRemoveRollback(CatalogItem ci, DataBasket db)
protected void fireCanRemoveCatalogItem(CatalogItem ci, DataBasket db) throws VetoException
protected void fireNoRemoveCatalogItem(CatalogItem ci, DataBasket db)
protected void fireCanEditCatalogItem(CatalogItem ci, DataBasket db) throws VetoException
protected void fireNoEditCatalogItem(CatalogItem ci, DataBasket db)
protected void fireEditingCatalogItem(CatalogItem ci, DataBasket db)
protected void fireCommitEditCatalogItem(CatalogItem ci, DataBasket db)
protected void fireRollbackEditCatalogItem(CatalogItem ci, DataBasket db)
public void subscribe()
ListenableCatalog
.public void unsubscribe()
ListenableCatalog
.public void updateModel()
|
SalesPoint Framework v3.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |