Package org.silverpeas.components.gallery.service

## Interface GalleryService

- All Superinterfaces:
    `org.silverpeas.core.ApplicationService`
  All Known Implementing Classes:
    `DefaultGalleryService`

      public interface GalleryService
      extends org.silverpeas.core.ApplicationService

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addMediaToAlbums​(Media media, String... albums)` |
    `long` | `countAllMedia​(org.silverpeas.core.node.model.NodePK nodePK)` |
    `long` | `countAllMedia​(org.silverpeas.core.node.model.NodePK nodePK, MediaCriteria.VISIBILITY visibility)` |
    `org.silverpeas.core.node.model.NodePK` | `createAlbum​(AlbumDetail album, org.silverpeas.core.node.model.NodePK nodePK)` |
    `Media` | `createMedia​(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, Watermark watermark, MediaDataCreateDelegate delegate)` |
    `String` | `createOrder​(Collection<String> basket, String userId, String instanceId)` |
    `void` | `deleteAlbum​(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, org.silverpeas.core.node.model.NodePK nodePK)` |
    `void` | `deleteMedia​(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, Collection<String> mediaIds)` |
    `void` | `deleteOrders​(List<Order> orders)` |
    `AlbumDetail` | `getAlbum​(org.silverpeas.core.node.model.NodePK nodePK)` |
    `AlbumDetail` | `getAlbum​(org.silverpeas.core.node.model.NodePK nodePK, MediaCriteria.VISIBILITY visibility)` |
    `Collection<String>` | `getAlbumIdsOf​(Media media)` |
    `Collection<AlbumDetail>` | `getAllAlbums​(String instanceId)` |
    `Collection<Media>` | `getAllMedia​(String instanceId, MediaCriteria.VISIBILITY visibility)` |
    `Collection<Media>` | `getAllMedia​(org.silverpeas.core.node.model.NodePK nodePK, MediaCriteria.VISIBILITY visibility)` |
    `List<org.silverpeas.core.socialnetwork.model.SocialInformation>` | `getAllMediaByUserId​(String userId, org.silverpeas.core.date.period.Period period)` | Gets the list of social information about the media for the specified user and in the given period of time.
    `Collection<Media>` | `getAllMediaThatWillBeNotVisible​(int nbDays)` |
    `List<Order>` | `getAllOrders​(String userId, String instanceId)` |
    `List<Order>` | `getAllOrderToDelete​(int nbDays)` |
    `Collection<Photo>` | `getAllPhotos​(org.silverpeas.core.node.model.NodePK nodePK)` |
    `Collection<Photo>` | `getAllPhotos​(org.silverpeas.core.node.model.NodePK nodePK, MediaCriteria.VISIBILITY visibility)` |
    `Optional<Media>` | `getContributionById​(org.silverpeas.core.contribution.model.ContributionIdentifier contributionId)` |
    `List<Media>` | `getLastRegisteredMedia​(String instanceId)` |
    `List<Media>` | `getMedia​(List<String> mediaIds, String componentInstanceId)` |
    `List<Media>` | `getMedia​(List<String> mediaIds, String componentInstanceId, MediaCriteria.VISIBILITY visibility)` |
    `Media` | `getMedia​(MediaPK mediaPK)` |
    `Media` | `getMedia​(MediaPK mediaPK, MediaCriteria.VISIBILITY visibility)` |
    `Collection<Media>` | `getNotVisible​(String instanceId)` |
    `Order` | `getOrder​(String orderId, String instanceId)` |
    `Collection<org.silverpeas.core.node.model.NodeDetail>` | `getPath​(org.silverpeas.core.node.model.NodePK nodePK)` |
    `Photo` | `getPhoto​(MediaPK mediaPK)` |
    `int` | `getSilverObjectId​(MediaPK mediaPK)` |
    `List<org.silverpeas.core.socialnetwork.model.SocialInformation>` | `getSocialInformationListOfMyContacts​(List<String> listOfUserId, List<String> availableComponent, org.silverpeas.core.date.period.Period period)` | Gets the list of social information of the specified users about all the media in the given component instances and in the specified period of time.
    `void` | `importFromRepository​(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, File repository, MediaDataCreateDelegate delegate)` |
    `void` | `indexGallery​(org.silverpeas.core.admin.user.model.UserDetail user, String instanceId)` |
    `void` | `paste​(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, GalleryPasteDelegate delegate)` |
    `void` | `removeMediaFromAllAlbums​(Media media)` |
    `Collection<Media>` | `search​(org.silverpeas.core.index.search.model.QueryDescription query)` |
    `void` | `sortAlbums​(List<org.silverpeas.core.node.model.NodePK> albumIds)` |
    `void` | `updateAlbum​(AlbumDetail album)` |
    `void` | `updateMedia​(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, Collection<String> mediaIds, String albumId, MediaDataUpdateDelegate delegate)` |
    `void` | `updateMedia​(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, Media media, Watermark watermark, MediaDataUpdateDelegate delegate)` |
    `void` | `updateOrder​(Order order)` |
    `void` | `updateOrderRow​(OrderRow row)` |

    - ### Methods inherited from interface org.silverpeas.core.ApplicationService

      `getComponentMessages, getComponentSettings, isRelatedTo`

- - ### Method Detail

    - #### getContributionById

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

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

    - #### getAlbum

          AlbumDetail getAlbum​(org.silverpeas.core.node.model.NodePK nodePK)

    - #### getAlbum

          AlbumDetail getAlbum​(org.silverpeas.core.node.model.NodePK nodePK,
                               MediaCriteria.VISIBILITY visibility)

    - #### createAlbum

          org.silverpeas.core.node.model.NodePK createAlbum​(AlbumDetail album,
                                                            org.silverpeas.core.node.model.NodePK nodePK)

    - #### updateAlbum

          void updateAlbum​(AlbumDetail album)

    - #### deleteAlbum

          void deleteAlbum​(org.silverpeas.core.admin.user.model.UserDetail user,
                           String componentInstanceId,
                           org.silverpeas.core.node.model.NodePK nodePK)

    - #### getAllAlbums

          Collection<AlbumDetail> getAllAlbums​(String instanceId)

    - #### removeMediaFromAllAlbums

          void removeMediaFromAllAlbums​(Media media)

    - #### addMediaToAlbums

          void addMediaToAlbums​(Media media,
                                String... albums)

    - #### getPhoto

          Photo getPhoto​(MediaPK mediaPK)

    - #### getMedia

          Media getMedia​(MediaPK mediaPK)

    - #### getMedia

          Media getMedia​(MediaPK mediaPK,
                         MediaCriteria.VISIBILITY visibility)

    - #### getMedia

          List<Media> getMedia​(List<String> mediaIds,
                               String componentInstanceId)

    - #### getMedia

          List<Media> getMedia​(List<String> mediaIds,
                               String componentInstanceId,
                               MediaCriteria.VISIBILITY visibility)

    - #### getAllPhotos

          Collection<Photo> getAllPhotos​(org.silverpeas.core.node.model.NodePK nodePK)

    - #### getAllPhotos

          Collection<Photo> getAllPhotos​(org.silverpeas.core.node.model.NodePK nodePK,
                                         MediaCriteria.VISIBILITY visibility)

    - #### countAllMedia

          long countAllMedia​(org.silverpeas.core.node.model.NodePK nodePK)

    - #### countAllMedia

          long countAllMedia​(org.silverpeas.core.node.model.NodePK nodePK,
                             MediaCriteria.VISIBILITY visibility)

    - #### getAllMedia

          Collection<Media> getAllMedia​(org.silverpeas.core.node.model.NodePK nodePK,
                                        MediaCriteria.VISIBILITY visibility)

    - #### getAllMedia

          Collection<Media> getAllMedia​(String instanceId,
                                        MediaCriteria.VISIBILITY visibility)

    - #### paste

          void paste​(org.silverpeas.core.admin.user.model.UserDetail user,
                     String componentInstanceId,
                     GalleryPasteDelegate delegate)

    - #### importFromRepository

          void importFromRepository​(org.silverpeas.core.admin.user.model.UserDetail user,
                                    String componentInstanceId,
                                    File repository,
                                    MediaDataCreateDelegate delegate)

    - #### createMedia

          Media createMedia​(org.silverpeas.core.admin.user.model.UserDetail user,
                            String componentInstanceId,
                            Watermark watermark,
                            MediaDataCreateDelegate delegate)

    - #### updateMedia

          void updateMedia​(org.silverpeas.core.admin.user.model.UserDetail user,
                           String componentInstanceId,
                           Collection<String> mediaIds,
                           String albumId,
                           MediaDataUpdateDelegate delegate)

    - #### updateMedia

          void updateMedia​(org.silverpeas.core.admin.user.model.UserDetail user,
                           String componentInstanceId,
                           Media media,
                           Watermark watermark,
                           MediaDataUpdateDelegate delegate)

    - #### deleteMedia

          void deleteMedia​(org.silverpeas.core.admin.user.model.UserDetail user,
                           String componentInstanceId,
                           Collection<String> mediaIds)

    - #### getLastRegisteredMedia

          List<Media> getLastRegisteredMedia​(String instanceId)

    - #### getAllMediaThatWillBeNotVisible

          Collection<Media> getAllMediaThatWillBeNotVisible​(int nbDays)

    - #### getNotVisible

          Collection<Media> getNotVisible​(String instanceId)

    - #### getPath

          Collection<org.silverpeas.core.node.model.NodeDetail> getPath​(org.silverpeas.core.node.model.NodePK nodePK)

    - #### getAlbumIdsOf

          Collection<String> getAlbumIdsOf​(Media media)

    - #### indexGallery

          void indexGallery​(org.silverpeas.core.admin.user.model.UserDetail user,
                            String instanceId)

    - #### getSilverObjectId

          int getSilverObjectId​(MediaPK mediaPK)

    - #### search

          Collection<Media> search​(org.silverpeas.core.index.search.model.QueryDescription query)

    - #### createOrder

          String createOrder​(Collection<String> basket,
                             String userId,
                             String instanceId)

    - #### getOrder

          Order getOrder​(String orderId,
                         String instanceId)

    - #### getAllOrders

          List<Order> getAllOrders​(String userId,
                                   String instanceId)

    - #### updateOrderRow

          void updateOrderRow​(OrderRow row)

    - #### updateOrder

          void updateOrder​(Order order)

    - #### getAllOrderToDelete

          List<Order> getAllOrderToDelete​(int nbDays)

    - #### deleteOrders

          void deleteOrders​(List<Order> orders)

    - #### getAllMediaByUserId

          List<org.silverpeas.core.socialnetwork.model.SocialInformation> getAllMediaByUserId​(String userId,
                                                                                              org.silverpeas.core.date.period.Period period)

      Gets the list of social information about the media for the specified user and in the given period of time.
      Parameters:
        `userId` - the unique identifier of a user
        `period` - interval of time in which the media were created or updated.
      Returns:
        a list of `SocialInformation` objects.

    - #### getSocialInformationListOfMyContacts

          List<org.silverpeas.core.socialnetwork.model.SocialInformation> getSocialInformationListOfMyContacts​(List<String> listOfUserId,
                                                                                                               List<String> availableComponent,
                                                                                                               org.silverpeas.core.date.period.Period period)

      Gets the list of social information of the specified users about all the media in the given component instances and in the specified period of time.
      Parameters:
        `listOfUserId` - a list of unique identifier of users.
        `availableComponent` - a list of unique identifier of component instances.
        `period` - interval of time in which the media were created or updated.
      Returns:
        a list of `SocialInformation` objects.

    - #### sortAlbums

          void sortAlbums​(List<org.silverpeas.core.node.model.NodePK> albumIds)