Class ViewAttributeValueReader
java.lang.Object
org.kuali.rice.krad.datadictionary.validation.BaseAttributeValueReader
org.kuali.rice.krad.datadictionary.validation.ViewAttributeValueReader
- All Implemented Interfaces:
AttributeValueReader
AttributeValueReader which can read the correct values from all InputFields which exist on the View
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis is a simple object used to contain information about InputFields that are being evaluated and used by this ViewAttributeValueReader. -
Field Summary
Fields inherited from class org.kuali.rice.krad.datadictionary.validation.BaseAttributeValueReader
attributeName, entryName -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for ViewAttributeValueReader, the View must already be indexed and the InputFields must have already be initialized for this reader to work properly -
Method Summary
Modifier and TypeMethodDescriptionclone()Cones this AttributeValueReadergetDefinition(String attributeName) Gets the definition which is an InputField on the View/PageGets all InputFields (which extend Constrainable)getEntry()Not used for this reader, returns nullReturns the label associated with the InputField which has that AttributeNameReturns the Form objectgetPath()Returns current attributeName which represents the pathClass<?> Gets the type of value for this AttributeName as represented on the Form<X> XgetValue()Return value of the field for the attributeName currently set on this reader<X> XReturn value of the field for the attributeName passed inbooleanIf the current attribute being evaluated is a field of an addLine return false because it should not be evaluated during Validation.Methods inherited from class org.kuali.rice.krad.datadictionary.validation.BaseAttributeValueReader
getAttributeName, getCleanSearchableValues, getEntryName, setAttributeName
-
Constructor Details
-
ViewAttributeValueReader
Constructor for ViewAttributeValueReader, the View must already be indexed and the InputFields must have already be initialized for this reader to work properly- Parameters:
form- model object representing the View's form data
-
-
Method Details
-
getDefinition
Gets the definition which is an InputField on the View/Page- Parameters:
attributeName- - the name of the attribute/field whose metadata is being requested- Returns:
- dictionary metadata object implementing some constrainable capability
-
getDefinitions
Gets all InputFields (which extend Constrainable)- Returns:
- constrainable input fields
-
getLabel
Returns the label associated with the InputField which has that AttributeName- Parameters:
attributeName- attribute name- Returns:
- label associated with the named attribute
-
getObject
Returns the Form object- Returns:
- form set in the constructor
-
getEntry
Not used for this reader, returns null- Returns:
- null
-
getPath
Returns current attributeName which represents the path- Returns:
- attributeName set on this reader
-
getType
Gets the type of value for this AttributeName as represented on the Form- Parameters:
attributeName-- Returns:
- attribute type
-
isReadable
public boolean isReadable()If the current attribute being evaluated is a field of an addLine return false because it should not be evaluated during Validation.- Returns:
- false if InputField is part of an addLine for a collection, true otherwise
-
getValue
Return value of the field for the attributeName currently set on this reader- Type Parameters:
X- return type- Returns:
- value of the field for the attributeName currently set on this reader
- Throws:
AttributeValidationException
-
getValue
Return value of the field for the attributeName passed in- Type Parameters:
X- return type- Parameters:
attributeName- name (which represents a path) of the value to be retrieved on the Form- Returns:
- value of that attributeName represents on the form
- Throws:
AttributeValidationException
-
clone
Cones this AttributeValueReader- Specified by:
clonein interfaceAttributeValueReader- Specified by:
clonein classBaseAttributeValueReader- Returns:
- AttributeValueReader
-