Package org.silverpeas.components.suggestionbox.model

## Class DefaultSuggestionBoxService

- java.lang.Object
- - org.silverpeas.components.suggestionbox.model.DefaultSuggestionBoxService

- All Implemented Interfaces:
    `SuggestionBoxService`, `org.silverpeas.core.ApplicationService`

      @Service
      @Named("suggestionBoxService")
      public class DefaultSuggestionBoxService
      extends Object
      implements SuggestionBoxService

  The default implementation of the `SuggestionBoxService` interface and of the `ApplicationService` interface.
  Author:
    mmoquillon

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DefaultSuggestionBoxService()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `deleteSuggestionBox​(SuggestionBox box)` | Deletes the specified suggestion box.
    `SuggestionBox` | `getByComponentInstanceId​(String componentInstanceId)` |
    `org.silverpeas.kernel.bundle.LocalizationBundle` | `getComponentMessages​(String language)` |
    `org.silverpeas.kernel.bundle.SettingBundle` | `getComponentSettings()` |
    `Optional<Suggestion>` | `getContributionById​(org.silverpeas.core.contribution.model.ContributionIdentifier contributionId)` |
    `void` | `indexSuggestionBox​(SuggestionBox suggestionBox)` | Indexes all the validated suggestions of the specified suggestion box.
    `boolean` | `isRelatedTo​(String instanceId)` |
    `void` | `saveSuggestionBox​(SuggestionBox box)` | Saves the specified suggestion box.

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

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

- - ### Constructor Detail

    - #### DefaultSuggestionBoxService

          public DefaultSuggestionBoxService()

  - ### Method Detail

    - #### getByComponentInstanceId

          public SuggestionBox getByComponentInstanceId​(String componentInstanceId)

      Specified by:
        `getByComponentInstanceId` in interface `SuggestionBoxService`
      Parameters:
        `componentInstanceId` - the identifier of a suggestion box instance.
      Returns:
        the suggestion box belonging to the specified component instance.
      See Also:
        `(String)`

    - #### indexSuggestionBox

          public void indexSuggestionBox​(SuggestionBox suggestionBox)

      Description copied from interface: `SuggestionBoxService`
      Indexes all the validated suggestions of the specified suggestion box.
      Specified by:
        `indexSuggestionBox` in interface `SuggestionBoxService`
      Parameters:
        `suggestionBox` - the suggestion box on which the indexation is performed.

    - #### saveSuggestionBox

          public void saveSuggestionBox​(SuggestionBox box)

      Saves the specified suggestion box.
      Specified by:
        `saveSuggestionBox` in interface `SuggestionBoxService`
      Parameters:
        `box` - the box to save in Silverpeas.

    - #### deleteSuggestionBox

          public void deleteSuggestionBox​(SuggestionBox box)

      Deletes the specified suggestion box.
      Specified by:
        `deleteSuggestionBox` in interface `SuggestionBoxService`
      Parameters:
        `box` - the box to delete from Silverpeas.

    - #### getContributionById

          public Optional<Suggestion> getContributionById​(org.silverpeas.core.contribution.model.ContributionIdentifier contributionId)

      Specified by:
        `getContributionById` in interface `org.silverpeas.core.ApplicationService`
      Specified by:
        `getContributionById` in interface `SuggestionBoxService`

    - #### getComponentSettings

          public org.silverpeas.kernel.bundle.SettingBundle getComponentSettings()

      Specified by:
        `getComponentSettings` in interface `org.silverpeas.core.ApplicationService`

    - #### getComponentMessages

          public org.silverpeas.kernel.bundle.LocalizationBundle getComponentMessages​(String language)

      Specified by:
        `getComponentMessages` in interface `org.silverpeas.core.ApplicationService`

    - #### isRelatedTo

          public boolean isRelatedTo​(String instanceId)

      Specified by:
        `isRelatedTo` in interface `org.silverpeas.core.ApplicationService`