org.openpermis.policy.bean.basic
Class BasicPropertyForwarder

java.lang.Object
  extended by org.openpermis.policy.bean.basic.BasicPropertyForwarder
All Implemented Interfaces:
PropertyChangeListener, EventListener

public class BasicPropertyForwarder
extends Object
implements PropertyChangeListener

Forwarder for bean part property changes.

Once registered at a bean part it will observe changes and register itself as listener for any bean part value changes. Any changes in contained bean parts will then be forwarded.

Since:
0.1.0

Constructor Summary
BasicPropertyForwarder(PartBean partBean, PropertyChangeSupport propertyChangeSupport)
          Creates and registers new basic property forwarder for the specified part bean.
 
Method Summary
protected  void attach(String propertyName, Object obj)
          Attaches this forwarder as a change listener to the specified object.
protected  void detach(String propertyName, Object obj)
          Detaches this forwarder as a change listener from the specified object.
protected  void forward(PropertyChangeEvent event)
          Forwards this event to listeners of the owner part bean.
 void propertyChange(PropertyChangeEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicPropertyForwarder

public BasicPropertyForwarder(PartBean partBean,
                              PropertyChangeSupport propertyChangeSupport)
Creates and registers new basic property forwarder for the specified part bean.

Parameters:
partBean - the part bean for which to forward contained part bean property changes.
propertyChangeSupport - the property change support to use for forwarding.
Since:
0.1.0
Method Detail

detach

protected void detach(String propertyName,
                      Object obj)
Detaches this forwarder as a change listener from the specified object.

If the object is a PartBean it simply detaches itself.

If the object is a Collection it will detach itself deeply.

Parameters:
propertyName - the name of the property that caused the detach.
obj - the object to detach from, may be null.
Since:
0.1.0

attach

protected void attach(String propertyName,
                      Object obj)
Attaches this forwarder as a change listener to the specified object.

If the object is a PartBean it simply attaches itself.

If the object is a Collection it will attach itself deeply.

Parameters:
propertyName - the name of the property that caused the attach.
obj - the object to attach to, may be null.
Since:
0.1.0

forward

protected void forward(PropertyChangeEvent event)
Forwards this event to listeners of the owner part bean.

The event forwarded will have the same propagation ID as the event passed in.

Parameters:
event - the event to forward, source must not be null.
Since:
0.1.0

propertyChange

public void propertyChange(PropertyChangeEvent event)
Specified by:
propertyChange in interface PropertyChangeListener
Since:
0.1.0


PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:14:49
Copyright (c) 2002-2007 Ergon Informatik AG