|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.myfaces.orchestra.dynaForm.metadata.impl.MetaDataImpl
public class MetaDataImpl
A convenience implementation of the MetaDataWritable interface.
An instance of this type can be created and then passed to a list of one or more Extractor objects, together with a source object to be introspected. The extractor instances deduce information about fields of the source object and then add or update MetaField objects held by the MetaDataImpl.
The resulting populated object is then typically cast to the read-only MetaData interface type and passed to objects that make use of the gathered metadata, such as dynaform "gui builders".
| Constructor Summary | |
|---|---|
MetaDataImpl()
|
|
| Method Summary | |
|---|---|
MetaField |
getField(String name)
get the field by name |
int |
getFieldCount()
number of fields |
String[] |
getFieldNames()
get all fields names |
org.apache.myfaces.orchestra.dynaForm.metadata.impl.MetaFieldImpl |
getOrCreateField(String name)
Add a new field to the metadata or return one if one already exists for the given name |
Set<String> |
getRequestedFields()
|
boolean |
isParentOfWantedField(String name)
Is metadata about this field wanted because some child field of this field has explicitly been marked as requested? |
boolean |
isWantedField(String name)
Indicates whether metadata about this field is wanted. |
Iterator<String> |
iterFieldNames()
iterate through fields |
void |
requestField(String name)
Allow a field to be added to this object even after this MetaData object is "locked" for field addition. |
boolean |
setLockFields(boolean lockFields)
if set to true this avoids any field to be newly created, only already existent fields are to be processed |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MetaDataImpl()
| Method Detail |
|---|
public boolean isWantedField(String name)
If this object is not "locked", then this always returns true.
Even when locked, this returns true if:
isWantedField in interface MetaDataWritablesetLockFields(boolean)public boolean isParentOfWantedField(String name)
isParentOfWantedField in interface MetaDataWritable#processField(String),
setLockFields(boolean)public void requestField(String name)
This is used when traversing the object graph for linked entities.
When a name like "foo.bar.baz" is passed to this method, the requestedFieldsParent list has "foo" and "foo.bar" added to it.
requestField in interface MetaDataWritablepublic Set<String> getRequestedFields()
getRequestedFields in interface MetaDataWritablepublic org.apache.myfaces.orchestra.dynaForm.metadata.impl.MetaFieldImpl getOrCreateField(String name)
getOrCreateField in interface MetaDataWritablepublic int getFieldCount()
MetaData
getFieldCount in interface MetaDatagetFieldCount in interface MetaDataWritablepublic Iterator<String> iterFieldNames()
MetaData
iterFieldNames in interface MetaDataiterFieldNames in interface MetaDataWritablepublic MetaField getField(String name)
MetaData
getField in interface MetaDatagetField in interface MetaDataWritablepublic String[] getFieldNames()
MetaData
getFieldNames in interface MetaDatagetFieldNames in interface MetaDataWritablepublic boolean setLockFields(boolean lockFields)
setLockFields in interface MetaDataWritable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||