org.appng.api.support

## Class ElementHelper

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

-     public class ElementHelper
      extends Object

  Utility class offering methods for proper initialization of `Linkpanel`s, `Link`s, `Navigation`/ `NavigationItem`s, `BeanOption`s, `Param`s etc.
  Also wraps an `Environment` and an `ExpressionEvaluator` to evaluate expressions.
  Author:
    Matthias Müller

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `INTERNAL_ERROR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ElementHelper(Environment environment, Site site, Application application, ExpressionEvaluator expressionEvaluator)`
    `ElementHelper(Site site, Application application)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Messages` | `addMessages(Environment environment, Messages messages)` Returns the messages for the current session.
    `boolean` | `conditionMatches(Condition condition)`
    `static boolean` | `conditionMatches(ExpressionEvaluator expressionEvaluator, Condition condition)`
    `Messages` | `getMessages()` Returns the messages for the current session.
    `Messages` | `getMessagesInternal(Environment other)`
    `String` | `getOutputPrefix()`
    `String` | `getOutputPrefix(Environment env)` Deprecated. use `getOutputPrefix()`, since an `Environment` is wrapped here
    `Class<?>[]` | `getValidationGroups(MetaData metaData, Object bindObject)`
    `boolean` | `hasMessages()`
    `boolean` | `hasMessages(Environment environment)` Deprecated. use `hasMessages()`, since an `Environment` is wrapped here
    `ExpressionEvaluator` | `initExpressionEvaluator(ExpressionEvaluator other)`
    `void` | `initNavigation(ApplicationRequest applicationRequest, Path pathInfo, PageConfig pageConfig)`
    `boolean` | `isMessageParam(Object o)`
    `void` | `processDataContainer(Request applicationRequest, DataContainer container, String callerName)`
    `Messages` | `removeMessages()` Returns the messages for the current session.
    `Messages` | `removeMessages(Environment environment)`

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

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

- - ### Field Detail

    - #### INTERNAL_ERROR

          public static final String INTERNAL_ERROR

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ElementHelper

          public ElementHelper(Site site,
                               Application application)

    - #### ElementHelper

          public ElementHelper(Environment environment,
                               Site site,
                               Application application,
                               ExpressionEvaluator expressionEvaluator)

  - ### Method Detail

    - #### initExpressionEvaluator

          public ExpressionEvaluator initExpressionEvaluator(ExpressionEvaluator other)

    - #### initNavigation

          public void initNavigation(ApplicationRequest applicationRequest,
                                     Path pathInfo,
                                     PageConfig pageConfig)

    - #### addMessages

          public static Messages addMessages(Environment environment,
                                             Messages messages)

      Returns the messages for the current session.
      Parameters:
        `environment` - the current `Environment`
      Returns:
        the messages for the current session, if any

    - #### removeMessages

          public Messages removeMessages()

      Returns the messages for the current session.
      Returns:
        the messages for the current session, if any

    - #### removeMessages

          public Messages removeMessages(Environment environment)

    - #### hasMessages

          @Deprecated
          public boolean hasMessages(Environment environment)

      Deprecated. use `hasMessages()`, since an `Environment` is wrapped here

    - #### getMessages

          public Messages getMessages()

      Returns the messages for the current session.
      Returns:
        the messages for the current session, if any

    - #### getMessagesInternal

          public Messages getMessagesInternal(Environment other)

    - #### hasMessages

          public boolean hasMessages()

    - #### conditionMatches

          public boolean conditionMatches(Condition condition)

    - #### conditionMatches

          public static boolean conditionMatches(ExpressionEvaluator expressionEvaluator,
                                                 Condition condition)

    - #### processDataContainer

          public void processDataContainer(Request applicationRequest,
                                           DataContainer container,
                                           String callerName)
                                    throws ClassNotFoundException,
                                           ProcessingException

      Throws:
        `ClassNotFoundException`
        `ProcessingException`

    - #### isMessageParam

          public boolean isMessageParam(Object o)

    - #### getValidationGroups

          public Class<?>[] getValidationGroups(MetaData metaData,
                                                Object bindObject)

    - #### getOutputPrefix

          @Deprecated
          public String getOutputPrefix(Environment env)

      Deprecated. use `getOutputPrefix()`, since an `Environment` is wrapped here

    - #### getOutputPrefix

          public String getOutputPrefix()

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