org.appng.api.support

## Class ResultServiceImpl

- java.lang.Object
- - org.appng.api.support.ResultServiceImpl

- All Implemented Interfaces:
    ResultService, org.springframework.beans.factory.InitializingBean

      public class ResultServiceImpl
      extends Object
      implements ResultService

  Default `ResultService` implementation
  Author:
    Matthias Müller

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Application` | `application`
    `protected org.springframework.core.convert.ConversionService` | `conversionService`
    `protected static String` | `CURRENT`
    `protected Environment` | `environment`
    `protected ExpressionEvaluator` | `expressionEvaluator`
    `protected FieldConversionFactory` | `fieldConverter`
    `protected List<FieldType>` | `FILE_TYPES`
    `protected List<FieldType>` | `LIST_TYPES`
    `protected org.springframework.context.MessageSource` | `messageSource`
    `protected Site` | `site`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResultServiceImpl()`
    `ResultServiceImpl(ExpressionEvaluator expressionEvaluator)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterPropertiesSet()`
    `Result` | `getResult(FieldProcessor fp, Object object)` Builds a `Result` from the provided bindObject, using the `FieldProcessor`'s `MetaData`.
    `Resultset` | `getResultset(FieldProcessor fp, Collection<?> items)` Builds a `ResultSet` from the items provided by the `Collection`, using the `FieldProcessor`'s `MetaData`. Note that pagination will not be available.
    `Resultset` | `getResultset(FieldProcessor fp, org.springframework.data.domain.Page<?> page)` Builds a `ResultSet` from the items provided by the `Page`, using the `FieldProcessor`'s `MetaData`.
    `boolean` | `isFile(FieldType type)`
    `boolean` | `isListType(FieldType type)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### CURRENT

          protected static final String CURRENT

      See Also:
        Constant Field Values

    - #### LIST_TYPES

          protected final List<FieldType> LIST_TYPES

    - #### FILE_TYPES

          protected final List<FieldType> FILE_TYPES

    - #### conversionService

          protected org.springframework.core.convert.ConversionService conversionService

    - #### messageSource

          protected org.springframework.context.MessageSource messageSource

    - #### environment

          protected Environment environment

    - #### expressionEvaluator

          protected ExpressionEvaluator expressionEvaluator

    - #### fieldConverter

          protected FieldConversionFactory fieldConverter

    - #### application

          protected Application application

    - #### site

          protected Site site

  - ### Constructor Detail

    - #### ResultServiceImpl

          public ResultServiceImpl(ExpressionEvaluator expressionEvaluator)

    - #### ResultServiceImpl

          public ResultServiceImpl()

  - ### Method Detail

    - #### getResult

          public final Result getResult(FieldProcessor fp,
                                        Object object)

      Description copied from interface: `ResultService`
      Builds a `Result` from the provided bindObject, using the `FieldProcessor`'s `MetaData`.
      Specified by:
        `getResult` in interface `ResultService`
      Parameters:
        `fp` - a `FieldProcessor`
        `object` - a bindobject
      Returns:
        a `Result` containing a `Datafield` for each `FieldDef` provided by the `FieldProcessor`'s `MetaData`.

    - #### getResultset

          public Resultset getResultset(FieldProcessor fp,
                                        Collection<?> items)

      Description copied from interface: `ResultService`
      Builds a `ResultSet` from the items provided by the `Collection`, using the `FieldProcessor`'s `MetaData`.
      Note that pagination will not be available.
      Specified by:
        `getResultset` in interface `ResultService`
      Parameters:
        `fp` - a `FieldProcessor`
        `items` - a `Collection` of bindobjects
      Returns:
        a `Resultset` containing a `Result` for each item of the `Collection`. Every `Result` contains a `Datafield` for each `FieldDef` provided by the `FieldProcessor`'s `MetaData`.

    - #### getResultset

          public final Resultset getResultset(FieldProcessor fp,
                                              org.springframework.data.domain.Page<?> page)

      Description copied from interface: `ResultService`
      Builds a `ResultSet` from the items provided by the `Page`, using the `FieldProcessor`'s `MetaData`.
      Specified by:
        `getResultset` in interface `ResultService`
      Parameters:
        `fp` - a `FieldProcessor`
        `page` - a `Page` of bindobjects
      Returns:
        a `Resultset` containing a `Result` for each item of the `Page`. Every `Result` contains a `Datafield` for each `FieldDef` provided by the `FieldProcessor`'s `MetaData`.

    - #### isFile

          public final boolean isFile(FieldType type)

    - #### isListType

          public final boolean isListType(FieldType type)

    - #### afterPropertiesSet

          public void afterPropertiesSet()

      Specified by:
        `afterPropertiesSet` in interface `org.springframework.beans.factory.InitializingBean`

Copyright © 2011–2023 aiticon GmbH. All rights reserved.