Class DefaultViewTemplateHelper

java.lang.Object
io.jmix.flowui.view.template.impl.DefaultViewTemplateHelper
All Implemented Interfaces:
ViewTemplateHelper

@Component("flowui_DefaultViewTemplateHelper") public class DefaultViewTemplateHelper extends Object implements ViewTemplateHelper
Default ViewTemplateHelper implementation used by built-in view templates.
See Also:
  • Field Details

    • metadataTools

      @Autowired protected MetadataTools metadataTools
  • Constructor Details

    • DefaultViewTemplateHelper

      public DefaultViewTemplateHelper()
  • Method Details

    • getProperties

      public List<MetaProperty> getProperties(MetaClass metaClass, List<String> includeProperties, List<String> excludeProperties)
      Returns direct single-value properties for the entity in metadata order.

      Collection-valued and embedded properties are ignored. System, secret, identifier, version, generated, and audit properties are excluded by default. Properties listed in includeProperties are added back when they are supported direct properties, and properties listed in excludeProperties are removed from the final result.

      Specified by:
      getProperties in interface ViewTemplateHelper
      Parameters:
      metaClass - entity metadata
      includeProperties - property names to include explicitly
      excludeProperties - property names to exclude explicitly
      Returns:
      filtered entity properties in metadata order
      Throws:
      IllegalArgumentException - if a property path is provided instead of a direct property name
    • getCollectionProperties

      public List<MetaProperty> getCollectionProperties(MetaClass metaClass, List<String> excludeProperties)
      Description copied from interface: ViewTemplateHelper
      Returns composition collection properties that should be rendered as tabs by a detail view template.

      Implementations return direct composition *-to-many properties, applying default filtering rules and then removing properties listed in excludeProperties. Association collections, datatype collections, and single-value properties are not returned.

      Specified by:
      getCollectionProperties in interface ViewTemplateHelper
      Parameters:
      metaClass - entity metadata
      excludeProperties - property names that must be excluded from the result
      Returns:
      filtered composition collection properties in metadata order
    • isSupportedCollectionProperty

      protected boolean isSupportedCollectionProperty(MetaProperty metaProperty)
    • validatePropertyNames

      protected Set<String> validatePropertyNames(MetaClass metaClass, Collection<String> propertyNames)
    • isSupportedProperty

      protected boolean isSupportedProperty(MetaProperty metaProperty)
    • isDefaultExcluded

      protected boolean isDefaultExcluded(MetaProperty metaProperty)
    • isCompositionInverse

      protected boolean isCompositionInverse(MetaProperty metaProperty)