public class SingleAttributeValueReader extends BaseAttributeValueReader
attributeName, entryName| Constructor and Description |
|---|
SingleAttributeValueReader(Object value,
String entryName,
String attributeName,
AttributeDefinition definition) |
| Modifier and Type | Method and Description |
|---|---|
AttributeValueReader |
clone()
overrides
Object.clone() |
Constrainable |
getDefinition(String attributeName)
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 attributeName)
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 selectedAttributeName)
gets the type of the attribute specified - A Java class
|
<X> X |
getValue()
looks up the attribute value that is currently being processed
|
<X> X |
getValue(String attributeName)
looks up any attribute value by name for the object being processed
|
boolean |
isReadable()
Indicates whether the configured attribute name is readable for the object
|
getAttributeName, getCleanSearchableValues, getEntryName, setAttributeNamepublic SingleAttributeValueReader(Object value, String entryName, String attributeName, AttributeDefinition definition)
public Constrainable getDefinition(String attributeName)
AttributeValueReaderIf 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.
attributeName - - the name of the attribute/field whose metadata is being requestedpublic List<Constrainable> getDefinitions()
AttributeValueReaderpublic Constrainable getEntry()
AttributeValueReaderIt 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.
AttributeValueReader.getEntry()public String getLabel(String attributeName)
AttributeValueReaderattributeName - - the name of attributepublic Object getObject()
AttributeValueReaderpublic String getPath()
AttributeValueReaderFor example, on a person object there might be the following field path: joe.home.mailingAddress.state
public Class<?> getType(String selectedAttributeName)
AttributeValueReaderselectedAttributeName - - the name of attributepublic boolean isReadable()
AttributeValueReaderpublic <X> X getValue() throws AttributeValidationException
AttributeValueReaderX - - the type of the attributeAttributeValidationExceptionpublic <X> X getValue(String attributeName) throws AttributeValidationException
AttributeValueReaderX - - the type of the attributeattributeName - - the name of attribute whose value is looked upAttributeValidationExceptionpublic AttributeValueReader clone()
AttributeValueReaderObject.clone()clone in interface AttributeValueReaderclone in class BaseAttributeValueReaderAttributeValueReaderCopyright © 2005–2016 The Kuali Foundation. All rights reserved.