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 Details

    • deriveControlAttributeFromMetadata

      Control deriveControlAttributeFromMetadata(AttributeDefinition attrDef)
      Derives a UIF control from the information available on the passed in Data Dictionary AttributeDefinition. 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

      String deriveHumanFriendlyNameFromPropertyName(String camelCasedName)
      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

      ValidCharactersConstraint deriveValidCharactersConstraint(AttributeDefinition attrDef)
      Derives a default valid characters constraint definition given the metadata in the AttributeDefinition
      Parameters:
      attrDef - attribute definition
      Returns:
      A ValidCharactersConstraint object or null if no information in the AttributeDefinition suggests an appropriate default.