|
|||||||||
| Home >> All >> org >> scopemvc >> model >> [ beans overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.scopemvc.model.beans
Class BeansPropertyManager

java.lang.Objectorg.scopemvc.core.ModelManager
org.scopemvc.core.PropertyManager
org.scopemvc.model.beans.BeansPropertyManager
- public class BeansPropertyManager
- extends org.scopemvc.core.PropertyManager
BeansPropertyManager is a org.scopemvc.core.PropertyManager that handles the properties of JavaBean model objects.
- Version:
- $Revision: 1.7 $ $Date: 2002/01/26 09:46:20 $
| Field Summary | |
private static org.apache.commons.logging.Log |
LOG
|
| Fields inherited from class org.scopemvc.core.PropertyManager |
|
| Fields inherited from class org.scopemvc.core.ModelManager |
modelClass |
| Constructor Summary | |
BeansPropertyManager()
|
|
| Method Summary | |
(package private) Accessor |
findTerminalAccessor(java.lang.Object inModel,
org.scopemvc.core.Selector inSelector)
Burrow down through submodels to find the terminal accessor (which could be a JavaBeans indexed property) from the passed model and selector. |
java.lang.Object |
get(java.lang.Object inModel,
org.scopemvc.core.Selector inSelector)
Return the value of the property identified by the passed org.scopemvc.core.Selector. |
java.lang.Class |
getPropertyClass(java.lang.Object inModel,
org.scopemvc.core.Selector inSelector)
Return the Class of a property. |
org.scopemvc.core.Selector |
getSelectorFor(java.lang.Object inModel,
java.lang.Object inProperty)
Tries to find a Selector that would get() a property equals() to the passed Object. |
java.util.Iterator |
getSelectorIterator(java.lang.Object inModel)
Return an Iterator that iterates over Selectors for all properties of the passed model object. |
boolean |
hasProperty(java.lang.Object inModel,
org.scopemvc.core.Selector inSelector)
Does the passed model object contain the property identified by the passed Selector? |
boolean |
isReadOnly(java.lang.Object inModel,
org.scopemvc.core.Selector inSelector)
Is a property read-only? If the passed Selector is null then is the model object as a whole read-only? |
void |
set(java.lang.Object inModel,
org.scopemvc.core.Selector inSelector,
java.lang.Object inValue)
***** Could add convenience methods for primitive types? ***** Refactor with Accessor |
| Methods inherited from class org.scopemvc.core.PropertyManager |
getInstance, getInstance |
| Methods inherited from class org.scopemvc.core.ModelManager |
make |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
LOG
private static final org.apache.commons.logging.Log LOG
| Constructor Detail |
BeansPropertyManager
public BeansPropertyManager()
| Method Detail |
get
public java.lang.Object get(java.lang.Object inModel, org.scopemvc.core.Selector inSelector) throws java.lang.Exception
- Description copied from class:
org.scopemvc.core.PropertyManager Return the value of the property identified by the passed org.scopemvc.core.Selector. If the passed Selector is null, return the model object itself.
set
public void set(java.lang.Object inModel, org.scopemvc.core.Selector inSelector, java.lang.Object inValue) throws java.lang.Exception
- ***** Could add convenience methods for primitive types?
***** Refactor with Accessor
isReadOnly
public boolean isReadOnly(java.lang.Object inModel, org.scopemvc.core.Selector inSelector) throws java.lang.Exception
- Description copied from class:
org.scopemvc.core.PropertyManager Is a property read-only? If the passed Selector is null then is the model object as a whole read-only?
Enforcement of the access state must be implemented by the model itself.
hasProperty
public boolean hasProperty(java.lang.Object inModel, org.scopemvc.core.Selector inSelector)
- Description copied from class:
org.scopemvc.core.PropertyManager - Does the passed model object contain the property identified by the
passed Selector?
getPropertyClass
public java.lang.Class getPropertyClass(java.lang.Object inModel, org.scopemvc.core.Selector inSelector) throws java.lang.Exception
- Description copied from class:
org.scopemvc.core.PropertyManager - Return the Class of a property.
getSelectorIterator
public java.util.Iterator getSelectorIterator(java.lang.Object inModel)
- Description copied from class:
org.scopemvc.core.PropertyManager Return an Iterator that iterates over Selectors for all properties of the passed model object.
getSelectorFor
public org.scopemvc.core.Selector getSelectorFor(java.lang.Object inModel, java.lang.Object inProperty)
Tries to find a Selector that would get() a property equals() to the passed Object. If the model is a java.util.List, call indexOf() to search contents first. For Object[] search through contents. Else get an Iterator over all properties and iterate over to find a match.
Note: doesn't search through JavaBeans indexed properties for a match.
findTerminalAccessor
Accessor findTerminalAccessor(java.lang.Object inModel, org.scopemvc.core.Selector inSelector) throws java.lang.Exception
- Burrow down through submodels to find the terminal
accessor (which could be a JavaBeans indexed property)
from the passed model and selector. Return null
for null selector.
|
|||||||||
| Home >> All >> org >> scopemvc >> model >> [ beans overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC