|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.datadictionary.validation.BaseAttributeValueReader org.kuali.rice.krad.datadictionary.validation.DictionaryObjectAttributeValueReader
public class DictionaryObjectAttributeValueReader
This class allows a dictionary object to expose information about its fields / attributes, including the values of those fields, with some guidance from the DataDictionaryEntry object.
Field Summary | |
---|---|
protected org.springframework.beans.BeanWrapper |
beanWrapper
|
protected DataDictionaryEntry |
entry
|
protected Object |
object
|
Fields inherited from class org.kuali.rice.krad.datadictionary.validation.BaseAttributeValueReader |
---|
attributeName, entryName |
Constructor Summary | |
---|---|
DictionaryObjectAttributeValueReader(Object object,
String entryName,
DataDictionaryEntry entry)
|
|
DictionaryObjectAttributeValueReader(Object object,
String entryName,
DataDictionaryEntry entry,
String attributePath)
|
Method Summary | ||
---|---|---|
AttributeValueReader |
clone()
overrides Object.clone() |
|
Constrainable |
getDefinition(String attrName)
provides access to the constrainable attribute definition of a specific attribute name |
|
List<Constrainable> |
getDefinitions()
gets a list of all constrainable dictionary metadata definitions for attributes or fields encapsulated by this object |
|
Constrainable |
getEntry()
gets the dictionary metadata associated with an object (its "entry" in the dictionary) |
|
String |
getLabel(String attrName)
looks up a label for a specific attribute name |
|
Object |
getObject()
gets the underlying object itself (not the field/attribute value, but the object) |
|
String |
getPath()
gets the path, which is a string representation of specifically which attribute (at some depth) is being accessed |
|
Class<?> |
getType(String attrName)
gets the type of the attribute specified - A Java class |
|
|
getValue()
looks up the attribute value that is currently being processed |
|
|
getValue(String attrName)
looks up any attribute value by name for the object being processed |
|
boolean |
isNestedAttribute()
|
|
boolean |
isParentAttributeNull()
|
|
boolean |
isReadable()
Indicates whether the configured attribute name is readable for the object |
Methods inherited from class org.kuali.rice.krad.datadictionary.validation.BaseAttributeValueReader |
---|
getAttributeName, getCleanSearchableValues, getEntryName, setAttributeName |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Object object
protected DataDictionaryEntry entry
protected org.springframework.beans.BeanWrapper beanWrapper
Constructor Detail |
---|
public DictionaryObjectAttributeValueReader(Object object, String entryName, DataDictionaryEntry entry)
public DictionaryObjectAttributeValueReader(Object object, String entryName, DataDictionaryEntry entry, String attributePath)
Method Detail |
---|
public Constrainable getDefinition(String attrName)
AttributeValueReader
If the value of the metadata associated with the object field does not implement constrainable, or if no metadata is associated with this object field, then null should be returned.
attrName
- - the name of the attribute/field whose metadata is being requested
public List<Constrainable> getDefinitions()
AttributeValueReader
public Constrainable getEntry()
AttributeValueReader
It can also be constrainable, in which case the object value itself can be validated against one or more constraints. If the specific entry for the dictionary object encapsulated by this reader is not constrainable, or if no entry exists for this dictionary object, or no dictionary object is being encapsulted, then null should be returned.
public String getLabel(String attrName)
AttributeValueReader
attrName
- - the name of attribute
public Object getObject()
AttributeValueReader
public String getPath()
AttributeValueReader
For example, on a person object there might be the following field path: joe.home.mailingAddress.state
public Class<?> getType(String attrName)
AttributeValueReader
attrName
- - the name of attribute
public boolean isReadable()
AttributeValueReader
public <X> X getValue() throws AttributeValidationException
AttributeValueReader
X
- - the type of the attribute
AttributeValidationException
public <X> X getValue(String attrName) throws AttributeValidationException
AttributeValueReader
X
- - the type of the attributeattrName
- - the name of attribute whose value is looked up
AttributeValidationException
public boolean isParentAttributeNull()
public boolean isNestedAttribute()
public AttributeValueReader clone()
AttributeValueReader
Object.clone()
clone
in interface AttributeValueReader
clone
in class BaseAttributeValueReader
AttributeValueReader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |