Class DefaultTableConfigurationProvider<T>

  • Type Parameters:
    T - the table elements type
    All Implemented Interfaces:
    TableConfigurationProvider<T>

    public class DefaultTableConfigurationProvider<T>
    extends java.lang.Object
    implements TableConfigurationProvider<T>
    Base implementation of a TableConfigurationProvider.

    The default implementation will add all bindable elements of the serviced class.
    Override createTableConfiguration() to customize.
    If the class contains components and their bindables should be added instead, override addBindableColumns(TableConfiguration, String...). Example:

     @TableConfigurationProviderService(value = TokenLockInfoDTO.class, noBundle = true)
     public class TokenLockInfoTableConfiguration extends DefaultTableConfigurationProvider<TokenLockInfoDTO> {
    
       @Override
       protected void addBindableColumns(TableConfiguration<TokenLockInfoDTO> configuration, String... components) {
         super.addBindableColumns(configuration, "pdoKey", "editedBy");
       }
     }
     
    Author:
    harald
    • Constructor Detail

      • DefaultTableConfigurationProvider

        public DefaultTableConfigurationProvider()
        Creates a table configuration provider.
    • Method Detail

      • isBundleProvided

        public boolean isBundleProvided()
        Returns whether a resource bundle is provided.
        Returns:
        true if provided, false if no bundle
      • getBundle

        public java.util.ResourceBundle getBundle()
        Gets the resource bundle for this provider.

        Throws MissingResourceException if no bundle found.

        Returns:
        the resource bundle
      • addBindableColumns

        protected void addBindableColumns​(TableConfiguration<T> configuration,
                                          java.lang.String... components)
        Adds all bindable columns.
        Override this method to specify the optional components.
        Parameters:
        configuration - the table configuration
        components - the binding path of components that should in turn be analyzed for bindables
      • addBindableColumns

        protected void addBindableColumns​(TableConfiguration<T> configuration,
                                          java.lang.String columnPrefix,
                                          java.lang.String displayPrefix,
                                          java.lang.Class<?> clazz,
                                          java.lang.String... components)
        Recursively adds all bindable columns including components.
        Parameters:
        configuration - the table configuration
        columnPrefix - the prefix for the column names
        displayPrefix - the prefix for the display names
        clazz - the class to analyze for bindable elements
        components - the binding path of components that should in turn be analyzed for bindables