|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sptci.echo.binding.Updater<V,M>
V - The class name of the view component.M - The class name of the model component.public abstract class Updater<V,M>
An abstract updater used to update UI containers or
JavaBean objects from one another.
Copyright 2006 Sans Pareil Technologies, Inc.
| Field Summary | |
|---|---|
protected M |
bean
The java bean that contains the data to use to update the view. |
protected static Logger |
logger
The logger used to log errors/warnings to. |
protected V |
view
The UI container that is to be updated. |
| Constructor Summary | |
|---|---|
protected |
Updater()
Default constructor. |
protected |
Updater(V view,
M bean)
Create a new instance with the specified UI container and java bean. |
| Method Summary | |
|---|---|
protected Map<String,Object> |
beanValues()
Fetch the values of all the fields in bean that have
an accessor method conforming to JavaBean naming
convention. |
M |
getBean()
Returns bean. |
V |
getView()
Returns view. |
void |
setBean(M bean)
Set bean. |
void |
setView(V view)
Set view. |
abstract void |
update()
Update the fields of the desired component with the data contained in similarly named fields in the other component. |
protected Map<String,Object> |
viewValues()
Fetch the values of all the fields in view. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Logger logger
protected V view
protected M bean
view.
| Constructor Detail |
|---|
protected Updater()
protected Updater(V view,
M bean)
view - The view to use.bean - The bean to use.| Method Detail |
|---|
protected Map<String,Object> beanValues()
throws IllegalAccessException,
InvocationTargetException,
IntrospectionException
bean that have
an accessor method conforming to JavaBean naming
convention.
key and
the field value as value.
IllegalAccessException - If a custom security policy
restricts access to the bean fields.
InvocationTargetException - If the accessor method for
the field could not be invoked successfully.
IntrospectionException - If errors are encountered while
introspecing the bean for accessors.ReflectionUtility.fetchFields(java.lang.Object),
ReflectionUtility.fetchMethod( Object, String, Class[] )
protected Map<String,Object> viewValues()
throws IllegalAccessException,
InvocationTargetException
view.
Convert the values of the UI components to the mapping scheme
used in bean generation.
key and
the field value as value.
IllegalAccessException - If a custom security policy
restricts access to the bean fields.
InvocationTargetException - If the accessor method for
the field could not be invoked successfully.Utility#getViewValue(Object),
ReflectionUtility.fetchFields(java.lang.Object),
ReflectionUtility.fetchMethod( Object, String, Class[] )public abstract void update()
public final V getView()
view.
public final void setView(V view)
view.
view - The value to set.public final M getBean()
bean.
public final void setBean(M bean)
bean.
bean - The value to set.
|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||