Looking for the name of a design pattern

From: John Wheeler (johnwheeler79_at_msn.com)
Date: 03/30/04


Date: 30 Mar 2004 09:30:03 -0800

I have an object called Inventory that implements an IInventory
interface. IInventory has abstractions like

void addWarehouse(Warehouse w);
List getWarehouses();
List getSuppliers();
...

I have another object that implements java.util.Observable and
IInventory, which I call CurrentInventory. It delegates to an internal
Inventory instance when IInventory methods are called. It does special
things though, for instance:

void addWarehouse(Warehouse w) {
   m_inventory.addWarehouse(w);
   setChanged();
   notifyObservers(this);
}

List getWarehouses() {
   return Collections.unmodifiableList(m_inventory.getWarehouses());
}

I use CurrentInventory as a model for my user interface, but I dislike
its name. I would like to name it after a pattern if possible. I
thought it might be a proxy, but I read descriptions about that
pattern, and its more for access control.

THANKS



Relevant Pages

  • Re: Looking for the name of a design pattern
    ... >IInventory, which I call CurrentInventory. ... >void addWarehouse{ ... >List getWarehouses() { ... >I use CurrentInventory as a model for my user interface, ...
    (comp.object)
  • Re: Looking for the name of a design pattern
    ... > I have an object called Inventory that implements an IInventory ... > void addWarehouse{ ... > List getWarehouses() { ... > I use CurrentInventory as a model for my user interface, ...
    (comp.object)
  • Re: Looking for the name of a design pattern
    ... > I have an object called Inventory that implements an IInventory ... the interface to several parts of the domain. ... and think of building separate factory object/method to instantiate ...
    (comp.object)