Package org.silverpeas.components.quickinfo.model

## Class DefaultQuickInfoService

- java.lang.Object
- - org.silverpeas.components.quickinfo.model.DefaultQuickInfoService

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

      @Service
      @Named("quickinfoService")
      public class DefaultQuickInfoService
      extends Object
      implements QuickInfoService

- - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `acknowledgeNews​(String id, String userId)` |
    `News` | `copyNews​(News newsToCopy, org.silverpeas.core.admin.component.model.PasteDetail pasteDetail)` | Creating new news from an existing one.
    `News` | `create​(News news)` |
    `List<News>` | `getAllNews​(String componentId)` |
    `NewsByStatus` | `getAllNewsByStatus​(String componentId, String userId)` |
    `org.silverpeas.kernel.bundle.LocalizationBundle` | `getComponentMessages​(String language)` |
    `org.silverpeas.kernel.bundle.SettingBundle` | `getComponentSettings()` |
    `Optional<News>` | `getContributionById​(org.silverpeas.core.contribution.model.ContributionIdentifier contributionId)` |
    `News` | `getNews​(String id)` |
    `News` | `getNewsByForeignId​(String foreignId)` |
    `List<News>` | `getNewsForTicker​(String userId)` |
    `List<News>` | `getPlatformNews​(String userId)` |
    `List<News>` | `getUnreadBlockingNews​(String userId)` |
    `List<News>` | `getVisibleNews​(String componentId)` |
    `boolean` | `isRelatedTo​(String instanceId)` |
    `void` | `performReminder​(org.silverpeas.core.reminder.Reminder reminder)` | Performs processes about news linked to given reminder. If news is not concerned, nothing is performed.
    `void` | `publish​(String id, String userId)` |
    `void` | `removeNews​(String id)` |
    `void` | `submitNewsOnHomepage​(String id, String userId)` |
    `void` | `update​(News news, List<org.silverpeas.core.pdc.pdc.model.PdcPosition> positions, Collection<org.silverpeas.core.io.upload.UploadedFile> uploadedFiles, boolean forcePublishing)` |

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

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

- - ### Constructor Detail

    - #### DefaultQuickInfoService

          public DefaultQuickInfoService()

  - ### Method Detail

    - #### getContributionById

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

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

    - #### getVisibleNews

          public List<News> getVisibleNews​(String componentId)

      Specified by:
        `getVisibleNews` in interface `QuickInfoService`

    - #### getAllNews

          public List<News> getAllNews​(String componentId)

      Specified by:
        `getAllNews` in interface `QuickInfoService`

    - #### getAllNewsByStatus

          public NewsByStatus getAllNewsByStatus​(String componentId,
                                                 String userId)

      Specified by:
        `getAllNewsByStatus` in interface `QuickInfoService`

    - #### getNews

          public News getNews​(String id)

      Specified by:
        `getNews` in interface `QuickInfoService`

    - #### getNewsByForeignId

          public News getNewsByForeignId​(String foreignId)

      Specified by:
        `getNewsByForeignId` in interface `QuickInfoService`

    - #### acknowledgeNews

          public void acknowledgeNews​(String id,
                                      String userId)

      Specified by:
        `acknowledgeNews` in interface `QuickInfoService`

    - #### 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`

    - #### create

          public News create​(News news)

      Specified by:
        `create` in interface `QuickInfoService`

    - #### copyNews

          public News copyNews​(News newsToCopy,
                               org.silverpeas.core.admin.component.model.PasteDetail pasteDetail)

      Description copied from interface: `QuickInfoService`
      Creating new news from an existing one.
      Specified by:
        `copyNews` in interface `QuickInfoService`
      Parameters:
        `newsToCopy` - news to copy.
        `pasteDetail` - the details about the copy (user identifier and component destination).
      Returns:
        a `News` instance representing the created news.

    - #### publish

          public void publish​(String id,
                              String userId)

      Specified by:
        `publish` in interface `QuickInfoService`

    - #### update

          public void update​(News news,
                             List<org.silverpeas.core.pdc.pdc.model.PdcPosition> positions,
                             Collection<org.silverpeas.core.io.upload.UploadedFile> uploadedFiles,
                             boolean forcePublishing)

      Specified by:
        `update` in interface `QuickInfoService`

    - #### removeNews

          public void removeNews​(String id)

      Specified by:
        `removeNews` in interface `QuickInfoService`

    - #### getPlatformNews

          public List<News> getPlatformNews​(String userId)

      Specified by:
        `getPlatformNews` in interface `QuickInfoService`

    - #### getNewsForTicker

          public List<News> getNewsForTicker​(String userId)

      Specified by:
        `getNewsForTicker` in interface `QuickInfoService`

    - #### getUnreadBlockingNews

          public List<News> getUnreadBlockingNews​(String userId)

      Specified by:
        `getUnreadBlockingNews` in interface `QuickInfoService`

    - #### submitNewsOnHomepage

          public void submitNewsOnHomepage​(String id,
                                           String userId)

      Specified by:
        `submitNewsOnHomepage` in interface `QuickInfoService`

    - #### performReminder

          public void performReminder​(org.silverpeas.core.reminder.Reminder reminder)

      Description copied from interface: `QuickInfoService`
      Performs processes about news linked to given reminder.
      If news is not concerned, nothing is performed.
      Specified by:
        `performReminder` in interface `QuickInfoService`
      Parameters:
        `reminder` - a `Reminder` instance.