|
||||||||||
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.SingleAttributeValueReader
public class SingleAttributeValueReader
This class allows a single attribute value to be exposed to the validation service, along with some guidance about how that value should be interpreted, provided by the AttributeDefinition that corresponds. It's a special AttributeValueReader since it explicitly doesn't expose any other attribute values, so it should only be used when the underlying business object is not available and we want to limit access to (for example) validation that requires only a single attribute value. This eliminates more complicated validation like 'this field is required when another field is filled in.'
Field Summary |
---|
Fields inherited from class org.kuali.rice.krad.datadictionary.validation.BaseAttributeValueReader |
---|
attributeName, entryName |
Constructor Summary | |
---|---|
SingleAttributeValueReader(Object value,
String entryName,
String attributeName,
AttributeDefinition definition)
|
Method Summary | ||
---|---|---|
AttributeValueReader |
clone()
|
|
Constrainable |
getDefinition(String attributeName)
This method provides access to the constrainable attribute definition of a specific attribute name. |
|
List<Constrainable> |
getDefinitions()
This method returns a list of all constrainable dictionary metadata definitions for attributes or fields encapsulated by this object. |
|
Constrainable |
getEntry()
The dictionary metadata associated with an object (its "entry" in the dictionary) can also be constrainable, in which case the object value itself can be validated against one or more constraints. |
|
String |
getLabel(String attributeName)
This method looks up a label for a specific attribute name. |
|
Object |
getObject()
The underlying object itself (not the field/attribute value, but the object). |
|
String |
getPath()
The path is a string representation of specifically which attribute (at some depth) is being accessed, for example, on a person object there might be the following field path: joe.home.mailingAddress.state |
|
Class<?> |
getType(String selectedAttributeName)
The type of the attribute specified. |
|
|
getValue()
A convenience method for looking up the attribute value that is currently being processed. |
|
|
getValue(String attributeName)
A method for looking up any attribute value by name for the object being processed. |
|
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 |
Constructor Detail |
---|
public SingleAttributeValueReader(Object value, String entryName, String attributeName, AttributeDefinition definition)
Method Detail |
---|
public Constrainable getDefinition(String attributeName)
AttributeValueReader
attributeName
- - the name of the attribute/field whose metadata is being requested
public List<Constrainable> getDefinitions()
AttributeValueReader
public Constrainable getEntry()
AttributeValueReader
AttributeValueReader.getEntry()
public String getLabel(String attributeName)
AttributeValueReader
public Object getObject()
AttributeValueReader
public String getPath()
AttributeValueReader
public Class<?> getType(String selectedAttributeName)
AttributeValueReader
public boolean isReadable()
AttributeValueReader
public <X> X getValue() throws AttributeValidationException
AttributeValueReader
AttributeValidationException
public <X> X getValue(String attributeName) throws AttributeValidationException
AttributeValueReader
AttributeValidationException
public AttributeValueReader clone()
clone
in interface AttributeValueReader
clone
in class BaseAttributeValueReader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |