Package org.silverpeas.components.gallery.process

# Class GalleryProcessManagement

java.lang.Object
org.silverpeas.components.gallery.process.GalleryProcessManagement

public class GalleryProcessManagement extends Object

Author:
  Yohann Chastagnier

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GalleryProcessManagement(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId)`
  Default constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addCreateMediaProcesses(Media media, String albumId, Object file, Watermark watermark, MediaDataCreateDelegate delegate)`
  `void`
  `addDeleteAlbumProcesses(org.silverpeas.core.node.model.NodePK albumPk)`
  Recursive method to add media delete processes for the given album (because of sub album)
  `void`
  `addDeleteMediaProcesses(Media media)`
  Adds processes to delete the given media
  `void`
  `addIndexMediaProcesses(Media media)`
  Adds processes to index the given media
  `void`
  `addPasteAlbumProcesses(AlbumDetail fromAlbum, AlbumDetail toAlbum, boolean isCut)`
  Recursive method to add media paste processes for given albums (because of sub album)
  `void`
  `addPasteMediaProcesses(Media mediaToPaste, org.silverpeas.core.node.model.NodePK toAlbum, boolean isCut)`
  `void`
  `addUpdateMediaProcesses(Media media, Watermark watermark, MediaDataUpdateDelegate delegate)`
  `void`
  `execute()`
  Execute the transactional processing
  `static void`
  `importFromRepositoryProcesses(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, File repository, String albumId, MediaDataCreateDelegate delegate)`
  Recursive method to add processes to create albums from a file repository.

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

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

- ## Constructor Details

  - ### GalleryProcessManagement

    public GalleryProcessManagement(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId)
    Default constructor

- ## Method Details

  - ### execute

    public void execute()
    Execute the transactional processing

  - ### addCreateMediaProcesses

    public void addCreateMediaProcesses(Media media, String albumId, Object file, Watermark watermark, MediaDataCreateDelegate delegate)

  - ### addUpdateMediaProcesses

    public void addUpdateMediaProcesses(Media media, Watermark watermark, MediaDataUpdateDelegate delegate)

  - ### addIndexMediaProcesses

    public void addIndexMediaProcesses(Media media)
    Adds processes to index the given media
    Parameters:
      `media` - the media to index

  - ### addDeleteMediaProcesses

    public void addDeleteMediaProcesses(Media media)
    Adds processes to delete the given media
    Parameters:
      `media` - the media to delete

  - ### addPasteMediaProcesses

    public void addPasteMediaProcesses(Media mediaToPaste, org.silverpeas.core.node.model.NodePK toAlbum, boolean isCut)

  - ### importFromRepositoryProcesses

    public static void importFromRepositoryProcesses(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, File repository, String albumId, MediaDataCreateDelegate delegate)
    Recursive method to add processes to create albums from a file repository. This method performs a transaction between each file to save.
    It could happen, in the very particular case of space memory quota exception, that an album is created with no media inside.
    Parameters:
      `user` - the user invoking the import.
      `componentInstanceId` - the unique identifier of a Gallery instance.
      `repository` - the repository in the filesystem into which the album will be imported.
      `albumId` - the unique identifier of the father album.
      `delegate` - media data

  - ### addPasteAlbumProcesses

    public void addPasteAlbumProcesses(AlbumDetail fromAlbum, AlbumDetail toAlbum, boolean isCut)
    Recursive method to add media paste processes for given albums (because of sub album)
    Parameters:
      `fromAlbum` - the album to paste.
      `toAlbum` - the destination album.
      `isCut` - is the album to paste has been cut or copied.

  - ### addDeleteAlbumProcesses

    public void addDeleteAlbumProcesses(org.silverpeas.core.node.model.NodePK albumPk)
    Recursive method to add media delete processes for the given album (because of sub album)
    Parameters:
      `albumPk` - the unique identifier of an album.