Package org.silverpeas.components.suggestionbox.model

## Interface SuggestionCriteriaProcessor

- All Known Implementing Classes:
    `JPQLQueryBuilder`

      public interface SuggestionCriteriaProcessor

  A processor of a suggestion criteria. The aim of a such processor is to process each criterion of the criteria in the order expected by the caller in order to perform some specific works.
  Author:
    mmoquillon

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `endProcessing()` | Informs the processor the process is ended.
    `SuggestionCriteriaProcessor` | `processCreator​(org.silverpeas.core.admin.user.model.User creator)` | Processes the criterion on the creator of the suggestions.
    `SuggestionCriteriaProcessor` | `processIdentifiers​(List<String> identifiers)` | Processes the criterion on the suggestion identifiers.
    `SuggestionCriteriaProcessor` | `processJoinDataApply​(List<SuggestionCriteria.JOIN_DATA_APPLY> joinDataApplies)` | Processes the criterion on data joins of the suggestions matching the criteria.
    `SuggestionCriteriaProcessor` | `processOrdering​(List<SuggestionCriteria.QUERY_ORDER_BY> orderings)` | Processes the criterion on orderings of the suggestions matching the criteria.
    `SuggestionCriteriaProcessor` | `processPagination​(org.silverpeas.core.admin.PaginationPage pagination)` | Processes the criterion on the pagination to apply on the suggestions to return.
    `SuggestionCriteriaProcessor` | `processStatus​(List<org.silverpeas.core.contribution.ContributionStatus> status)` | Processes the criterion on suggestion status.
    `SuggestionCriteriaProcessor` | `processSuggestionBox​(SuggestionBox box)` | Processes the criterion on the suggestion box.
    `<T> T` | `result()` | Gets the result of the processing.
    `void` | `startProcessing()` | Informs the processor the start of the process.
    `SuggestionCriteriaProcessor` | `then()` | Informs the processor that there is a new criterion to process.

- - ### Method Detail

    - #### startProcessing

          void startProcessing()

      Informs the processor the start of the process. The processor use this method to allocate all the resources required by the processing here. It uses it to initialize the processor state machine.

    - #### endProcessing

          void endProcessing()

      Informs the processor the process is ended. The processor use this method to deallocate all the resources that were used during the processing. It uses it to tear down the processor state machine or to finalize some treatments.

      The processing has to stop once this method is called. Hence, the call of process methods should result to nothing or to an exception.

    - #### then

          SuggestionCriteriaProcessor then()

      Informs the processor that there is a new criterion to process. This method must be used by the caller to chain the different criterion processings.
      Returns:
        the processor itself.

    - #### processSuggestionBox

          SuggestionCriteriaProcessor processSuggestionBox​(SuggestionBox box)

      Processes the criterion on the suggestion box.
      Parameters:
        `box` - the suggestion box concerned by the criterion.
      Returns:
        the processor itself.

    - #### processCreator

          SuggestionCriteriaProcessor processCreator​(org.silverpeas.core.admin.user.model.User creator)

      Processes the criterion on the creator of the suggestions.
      Parameters:
        `creator` - the user concerned by the criterion.
      Returns:
        the processor itself.

    - #### processStatus

          SuggestionCriteriaProcessor processStatus​(List<org.silverpeas.core.contribution.ContributionStatus> status)

      Processes the criterion on suggestion status.
      Parameters:
        `status` - the suggestion status concerned by the criterion.
      Returns:
        the processor itself.

    - #### processJoinDataApply

          SuggestionCriteriaProcessor processJoinDataApply​(List<SuggestionCriteria.JOIN_DATA_APPLY> joinDataApplies)

      Processes the criterion on data joins of the suggestions matching the criteria.
      Parameters:
        `joinDataApplies` - the result data joins concerned by the criterion.
      Returns:
        the processor itself.

    - #### processOrdering

          SuggestionCriteriaProcessor processOrdering​(List<SuggestionCriteria.QUERY_ORDER_BY> orderings)

      Processes the criterion on orderings of the suggestions matching the criteria.
      Parameters:
        `orderings` - the result orderings concerned by the criterion.
      Returns:
        the processor itself.

    - #### processIdentifiers

          SuggestionCriteriaProcessor processIdentifiers​(List<String> identifiers)

      Processes the criterion on the suggestion identifiers.
      Parameters:
        `identifiers` - the suggestion identifiers concerned by the criterion.
      Returns:
        the processor itself.

    - #### processPagination

          SuggestionCriteriaProcessor processPagination​(org.silverpeas.core.admin.PaginationPage pagination)

      Processes the criterion on the pagination to apply on the suggestions to return.
      Parameters:
        `pagination` - a pagination definition.
      Returns:
        the processor itself.

    - #### result

          <T> T result()

      Gets the result of the processing. Warning, the result can be incomplete if called before the processing ending (triggered with the call of `endProcessing()` method).
      Type Parameters:
        `T` - the type of the result.
      Returns:
        the processing result.