org.appng.api.support

## Class FieldProcessorImpl

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

- All Implemented Interfaces:
    Serializable, FieldProcessor

      public final class FieldProcessorImpl
      extends Object
      implements FieldProcessor, Serializable

  Default `FieldProcessor`-implementation
  Author:
    Matthias Müller
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FieldProcessorImpl(String reference)`
    `FieldProcessorImpl(String reference, MetaData metaData)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addErrorMessage(FieldDef field, String message)` Adds a `Message` of type `MessageType.ERROR` to the given field.
    `void` | `addErrorMessage(String message)` Adds a `Message` of type `MessageType.ERROR`.
    `void` | `addInvalidMessage(FieldDef field, String message)` Adds a `Message` of type `MessageType.INVALID` to the given field.
    `void` | `addInvalidMessage(String message)` Adds a `Message` of type `MessageType.INVALID`.
    `void` | `addLinkPanels(List<Linkpanel> panels)` Adds the given list of `Linkpanel`s to this `FieldProcessor`
    `void` | `addNoticeMessage(FieldDef field, String message)` Adds a `Message` of type `MessageType.NOTICE` to the given field.
    `void` | `addNoticeMessage(String message)` Adds a `Message` of type `MessageType.INVALID`.
    `void` | `addOkMessage(FieldDef field, String message)` Adds a `Message` of type `MessageType.OK` to the given field.
    `void` | `addOkMessage(String message)` Adds a `Message` of type `MessageType.OK`.
    `void` | `clearFieldMessages()` Clears all `Message`s which were previously added using `addXXMessage(FieldDef field, String message)`.
    `void` | `clearFieldMessages(String... fieldBindings)` Clears all `Message`s for the `FieldDef`initions with the given bindings.
    `void` | `clearMessages()` Clears all `Message`s which were previously added using `addXXMessage(String message)`.
    `FieldDef` | `getField(String fieldBinding)` Returns the `FieldDef` with the given binding, if existing.
    `List<FieldDef>` | `getFields()` Returns all `FieldDef`intions known by this `FieldProcessor`.
    `Linkpanel` | `getLinkPanel(String fieldName)` Returns the `Linkpanel` with the given name, if existing.
    `List<Linkpanel>` | `getLinkPanels()`
    `Messages` | `getMessages()` Returns a new `Messages`-object containing all `Message`s previously added using `addXXMessage(String message)`.
    `MetaData` | `getMetaData()` Returns the `MetaData` of this `FieldProcessor`.
    `org.springframework.data.domain.Pageable` | `getPageable()` Returns the `Pageable` for this `FieldProcessor`.
    `String` | `getReference()` Returns the id of the `Action` or `Datasource` this `FieldProcessor` was created for.
    `boolean` | `hasErrors()` Checks whether this `FieldProcessor` or one of its fields has a `Message` of type `MessageType.ERROR`.
    `boolean` | `hasField(String fieldBinding)` Checks whether a `FieldDef` with the given binding exists for this `FieldProcessor`.
    `boolean` | `hasFieldErrors()` Checks whether one of the fields has a `Message` of type `MessageType.ERROR`.
    `void` | `setPageable(org.springframework.data.domain.Pageable pageable)`

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

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

- - ### Constructor Detail

    - #### FieldProcessorImpl

          public FieldProcessorImpl(String reference)

    - #### FieldProcessorImpl

          public FieldProcessorImpl(String reference,
                                    MetaData metaData)

  - ### Method Detail

    - #### addLinkPanels

          public void addLinkPanels(List<Linkpanel> panels)

      Description copied from interface: `FieldProcessor`
      Adds the given list of `Linkpanel`s to this `FieldProcessor`
      Specified by:
        `addLinkPanels` in interface `FieldProcessor`
      Parameters:
        `panels` - a list of `Linkpanel`s

    - #### getLinkPanels

          public List<Linkpanel> getLinkPanels()

    - #### getFields

          public List<FieldDef> getFields()

      Description copied from interface: `FieldProcessor`
      Returns all `FieldDef`intions known by this `FieldProcessor`.
      Specified by:
        `getFields` in interface `FieldProcessor`
      Returns:
        a `List` of `FieldDef`intions

    - #### getField

          public FieldDef getField(String fieldBinding)

      Description copied from interface: `FieldProcessor`
      Returns the `FieldDef` with the given binding, if existing.
      Specified by:
        `getField` in interface `FieldProcessor`
      Parameters:
        `fieldBinding` - the binding of the `FieldDef` to return
      Returns:
        the `FieldDef` with the given binding, or `null` if no such `FieldDef` exists
      See Also:
        `FieldDef.getBinding()`

    - #### getLinkPanel

          public Linkpanel getLinkPanel(String fieldName)

      Description copied from interface: `FieldProcessor`
      Returns the `Linkpanel` with the given name, if existing.
      Specified by:
        `getLinkPanel` in interface `FieldProcessor`
      Parameters:
        `fieldName` - the name of the `FieldDef` respectively the `Linkpanel`
      Returns:
        the `Linkpanel`, if existing, `null` otherwise

    - #### hasField

          public boolean hasField(String fieldBinding)

      Description copied from interface: `FieldProcessor`
      Checks whether a `FieldDef` with the given binding exists for this `FieldProcessor`.
      Specified by:
        `hasField` in interface `FieldProcessor`
      Parameters:
        `fieldBinding` - the binding of the `FieldDef` to check
      Returns:
        `true` if such a `FieldDef` exists, `false` otherwise.
      See Also:
        `FieldProcessor.getField(String)`

    - #### getReference

          public String getReference()

      Description copied from interface: `FieldProcessor`
      Returns the id of the `Action` or `Datasource` this `FieldProcessor` was created for.
      Specified by:
        `getReference` in interface `FieldProcessor`
      Returns:
        the reference id

    - #### getMetaData

          public MetaData getMetaData()

      Description copied from interface: `FieldProcessor`
      Returns the `MetaData` of this `FieldProcessor`.
      Specified by:
        `getMetaData` in interface `FieldProcessor`
      Returns:
        the `MetaData`

    - #### hasErrors

          public boolean hasErrors()

      Description copied from interface: `FieldProcessor`
      Checks whether this `FieldProcessor` or one of its fields has a `Message` of type `MessageType.ERROR`.
      Specified by:
        `hasErrors` in interface `FieldProcessor`
      Returns:
        `true` if there are any `Message`s of `MessageType.ERROR`, `false` otherwise
      See Also:
        `FieldProcessor.addErrorMessage(String)`, `FieldProcessor.addErrorMessage(FieldDef, String)`

    - #### hasFieldErrors

          public boolean hasFieldErrors()

      Description copied from interface: `FieldProcessor`
      Checks whether one of the fields has a `Message` of type `MessageType.ERROR`.
      Specified by:
        `hasFieldErrors` in interface `FieldProcessor`
      Returns:
        `true` if any of the `FieldProcessor`s `FieldDef`s has a `Message` of type `MessageType.ERROR`, `false` otherwise
      See Also:
        `FieldProcessor.addErrorMessage(FieldDef, String)`

    - #### addOkMessage

          public void addOkMessage(String message)

      Description copied from interface: `FieldProcessor`
      Adds a `Message` of type `MessageType.OK`.
      Specified by:
        `addOkMessage` in interface `FieldProcessor`
      Parameters:
        `message` - the message to add

    - #### addOkMessage

          public void addOkMessage(FieldDef field,
                                   String message)

      Description copied from interface: `FieldProcessor`
      Adds a `Message` of type `MessageType.OK` to the given field.
      Specified by:
        `addOkMessage` in interface `FieldProcessor`
      Parameters:
        `field` - the `FieldDef` to add the `Message` to
        `message` - the message to add

    - #### addErrorMessage

          public void addErrorMessage(String message)

      Description copied from interface: `FieldProcessor`
      Adds a `Message` of type `MessageType.ERROR`.
      Specified by:
        `addErrorMessage` in interface `FieldProcessor`
      Parameters:
        `message` - the message to add
      See Also:
        `FieldProcessor.hasErrors()`

    - #### addErrorMessage

          public void addErrorMessage(FieldDef field,
                                      String message)

      Description copied from interface: `FieldProcessor`
      Adds a `Message` of type `MessageType.ERROR` to the given field.
      Specified by:
        `addErrorMessage` in interface `FieldProcessor`
      Parameters:
        `field` - the `FieldDef` to add the `Message` to
        `message` - the message to add
      See Also:
        `FieldProcessor.hasErrors()`, `FieldProcessor.hasFieldErrors()`

    - #### addInvalidMessage

          public void addInvalidMessage(String message)

      Description copied from interface: `FieldProcessor`
      Adds a `Message` of type `MessageType.INVALID`.
      Specified by:
        `addInvalidMessage` in interface `FieldProcessor`
      Parameters:
        `message` - the message to add

    - #### addInvalidMessage

          public void addInvalidMessage(FieldDef field,
                                        String message)

      Description copied from interface: `FieldProcessor`
      Adds a `Message` of type `MessageType.INVALID` to the given field.
      Specified by:
        `addInvalidMessage` in interface `FieldProcessor`
      Parameters:
        `field` - the `FieldDef` to add the `Message` to
        `message` - the message to add

    - #### addNoticeMessage

          public void addNoticeMessage(String message)

      Description copied from interface: `FieldProcessor`
      Adds a `Message` of type `MessageType.INVALID`.
      Specified by:
        `addNoticeMessage` in interface `FieldProcessor`
      Parameters:
        `message` - the message to add

    - #### addNoticeMessage

          public void addNoticeMessage(FieldDef field,
                                       String message)

      Description copied from interface: `FieldProcessor`
      Adds a `Message` of type `MessageType.NOTICE` to the given field.
      Specified by:
        `addNoticeMessage` in interface `FieldProcessor`
      Parameters:
        `field` - the `FieldDef` to add the `Message` to
        `message` - the message to add

    - #### getMessages

          public Messages getMessages()

      Description copied from interface: `FieldProcessor`
      Returns a new `Messages`-object containing all `Message`s previously added using `addXXMessage(String message)`.
      Specified by:
        `getMessages` in interface `FieldProcessor`
      Returns:
        a new `Messages` instance containing the previously added `Message`s
      See Also:
        `FieldProcessor.addOkMessage(String)`, `FieldProcessor.addNoticeMessage(String)`, `FieldProcessor.addInvalidMessage(String)`, `FieldProcessor.addErrorMessage(String)`

    - #### clearMessages

          public void clearMessages()

      Description copied from interface: `FieldProcessor`
      Clears all `Message`s which were previously added using `addXXMessage(String message)`.
      Specified by:
        `clearMessages` in interface `FieldProcessor`
      See Also:
        `FieldProcessor.addOkMessage(String)`, `FieldProcessor.addNoticeMessage(String)`, `FieldProcessor.addInvalidMessage(String)`, `FieldProcessor.addErrorMessage(String)`

    - #### clearFieldMessages

          public void clearFieldMessages()

      Description copied from interface: `FieldProcessor`
      Clears all `Message`s which were previously added using `addXXMessage(FieldDef field, String message)`.
      Specified by:
        `clearFieldMessages` in interface `FieldProcessor`
      See Also:
        `FieldProcessor.addOkMessage(FieldDef, String)`, `FieldProcessor.addNoticeMessage(FieldDef, String)`, `FieldProcessor.addInvalidMessage(FieldDef, String)`, `FieldProcessor.addErrorMessage(FieldDef, String)`

    - #### clearFieldMessages

          public void clearFieldMessages(String... fieldBindings)

      Description copied from interface: `FieldProcessor`
      Clears all `Message`s for the `FieldDef`initions with the given bindings.
      Specified by:
        `clearFieldMessages` in interface `FieldProcessor`
      Parameters:
        `fieldBindings` - the bindings of the fields to clear the messages for
      See Also:
        `FieldProcessor.addOkMessage(FieldDef, String)`, `FieldProcessor.addNoticeMessage(FieldDef, String)`, `FieldProcessor.addInvalidMessage(FieldDef, String)`, `FieldProcessor.addErrorMessage(FieldDef, String)`, `FieldDef.getBinding()`

    - #### setPageable

          public void setPageable(org.springframework.data.domain.Pageable pageable)

    - #### getPageable

          public org.springframework.data.domain.Pageable getPageable()

      Description copied from interface: `FieldProcessor`
      Returns the `Pageable` for this `FieldProcessor`.
      Specified by:
        `getPageable` in interface `FieldProcessor`
      Returns:
        the `Pageable`

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