Package org.kuali.rice.krad.uif.service
Interface UifDefaultingService
- All Known Implementing Classes:
UifDefaultingServiceImpl
public interface UifDefaultingService
This service helps build/define default controls for the UIF based on the associated data-level metadata.
It will use the information provided by the krad-data module to attempt to build sensible
default controls based on the data type, maximum length, and other attributes available
in the ORM-level metadata or provided as annotations on the data object classes.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Method Summary
Modifier and TypeMethodDescriptionDerives a UIF control from the information available on the passed in Data DictionaryAttributeDefinition.deriveHumanFriendlyNameFromPropertyName(String camelCasedName) Helper method to allow reasonable names to be defaulted from class or property names.Derives a default valid characters constraint definition given the metadata in theAttributeDefinition
-
Method Details
-
deriveControlAttributeFromMetadata
Derives a UIF control from the information available on the passed in Data DictionaryAttributeDefinition. Attempts to build reasonable defaults based on the data type and other metadata which has been included. If no special information is found in the metadata, it will return a standard/default text control.- Parameters:
attrDef- attribute definition- Returns:
- derived control
-
deriveHumanFriendlyNameFromPropertyName
Helper method to allow reasonable names to be defaulted from class or property names. This method assumes that the passed in name is camel-cased and will create the name by adding spaces before each capital letter or digit as well as capitalizing each word. In the case that the name given is a nested property, only the portion of the name after the last period will be used.- Parameters:
camelCasedName- property name, in camel case- Returns:
- human friendly property name
-
deriveValidCharactersConstraint
Derives a default valid characters constraint definition given the metadata in theAttributeDefinition- Parameters:
attrDef- attribute definition- Returns:
- A
ValidCharactersConstraintobject or null if no information in theAttributeDefinitionsuggests an appropriate default.
-