Package org.silverpeas.components.gallery.control

# Class GallerySessionController

java.lang.Object
org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
org.silverpeas.components.gallery.control.GallerySessionController

All Implemented Interfaces:
  `Serializable`, `org.silverpeas.core.web.mvc.controller.ComponentSessionController`, `org.silverpeas.core.web.session.SessionCloseable`

public final class GallerySessionController extends org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController

See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController

  `context`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GallerySessionController(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl, org.silverpeas.core.web.mvc.controller.ComponentContext componentContext)`
  Standard Session Controller Constructeur

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addMediaToAlbums(String mediaId, String[] albums)`
  `void`
  `addMediaToBasket(String mediaId)`
  Add media identifier given in parameter in basket
  `Collection<AlbumDetail>`
  `addNbMedia(Collection<AlbumDetail> albums)`
  `String`
  `addOrder()`
  `boolean`
  `addToBasket()`
  Add only photo media inside basket
  `static GalleryExporter`
  `aGalleryExporter()`
  Gets a new exporter of gallery media.
  `Boolean`
  `areCommentsEnabled()`
  `void`
  `clearBasket()`
  Clear basket
  `void`
  `clearListSelected()`
  `void`
  `clearSearchContext()`
  `void`
  `copyAlbum(String albumId)`
  `void`
  `copyMedia(String mediaId)`
  `void`
  `copySelectedMedia(Collection<String> mediaIds)`
  `long`
  `countAllMediaOf(AlbumDetail album)`
  `void`
  `createAlbum(AlbumDetail album)`
  `String`
  `createMedia(MediaDataCreateDelegate delegate)`
  Creating one media (just only one)
  `void`
  `cutAlbum(String albumId)`
  `void`
  `cutMedia(String mediaId)`
  `void`
  `cutSelectedMedia(Collection<String> mediaIds)`
  `void`
  `deleteAlbum(String albumId)`
  `void`
  `deleteMedia(String mediaId)`
  `void`
  `deleteMedia(Collection<String> mediaIds)`
  `void`
  `deletePhotoFromBasket(String mediaId)`
  `void`
  `deleteSelectedPhotosFromBasket()`
  Only remove selected photo from basket
  `org.silverpeas.core.importexport.report.ExportReport`
  `exportAlbum(String albumId, MediaResolution mediaResolution)`
  Export all the pictures in the given album, with the specified resolution
  `org.silverpeas.core.importexport.report.ExportReport`
  `exportSelection(MediaResolution mediaResolution)`
  Export all the selected images in the basket with the given resolution
  `AlbumDetail`
  `getAlbum(String albumId)`
  `Collection<String>`
  `getAlbumIdsOf(String mediaId)`
  `AlbumDetail`
  `getAlbumLight(String albumId)`
  `Collection<AlbumDetail>`
  `getAllAlbums()`
  `List<org.silverpeas.core.comment.model.Comment>`
  `getAllComments(Media media)`
  `List<Order>`
  `getAllOrders()`
  `List<Media>`
  `getBasketMedias()`
  `String`
  `getCharteUrl()`
  `String`
  `getCurrentAlbumId()`
  `String`
  `getCurrentOrderId()`
  `MediaResolution`
  `getDisplayedMediaResolution()`
  `MediaResolution`
  `getImagePreviewSize()`
  Get the resolution preview of images
  `MediaResolution`
  `getImageResolutionPreview(Media media)`
  Get the resolution preview of the images
  `int`
  `getIndexOfCurrentPage()`
  `List<Media>`
  `getLastRegisteredMedia()`
  `Collection<String>`
  `getListSelected()`
  `Media`
  `getMedia(String mediaId)`
  `List<MetaData>`
  `getMetaDataKeys()`
  `org.silverpeas.kernel.bundle.LocalizationBundle`
  `getMetadataResources()`
  `int`
  `getNbMediaPerPage()`
  `Media`
  `getNext()`
  `Collection<Media>`
  `getNotVisible()`
  `Order`
  `getOrder(String orderId)`
  `String`
  `getOrderForm()`
  `List<Order>`
  `getOrdersByUser()`
  `org.silverpeas.core.contribution.template.publication.PublicationTemplate`
  `getOrderTemplate()`
  `Collection<org.silverpeas.core.node.model.NodeDetail>`
  `getPath()`
  `List<org.silverpeas.core.node.model.NodeDetail>`
  `getPath(org.silverpeas.core.node.model.NodePK nodePK)`
  `org.silverpeas.core.pdc.pdc.model.SearchContext`
  `getPDCSearchContext()`
  `Media`
  `getPrevious()`
  `org.silverpeas.core.index.search.model.QueryDescription`
  `getQuery()`
  `int`
  `getRang()`
  `List<Media>`
  `getRestrictedListMedia()`
  `String`
  `getSearchKeyWord()`
  `List<Media>`
  `getSearchResultListMedia()`
  `boolean`
  `getSelect()`
  `int`
  `getSilverObjectId(String objectId)`
  `Integer`
  `getSlideshowWait()`
  `MediaSort`
  `getSort()`
  `org.silverpeas.core.contribution.template.publication.PublicationTemplate`
  `getTemplate()`
  `String`
  `getUrl(String orderId, String mediaId)`
  `Watermark`
  `getWatermark()`
  `String`
  `getXMLFormName()`
  `org.silverpeas.core.contribution.content.form.DataRecord`
  `getXMLSearchContext()`
  `AlbumDetail`
  `goToAlbum()`
  `AlbumDetail`
  `goToAlbum(String albumId)`
  `void`
  `initIndex()`
  `boolean`
  `isAccessAuthorized(String orderId)`
  `boolean`
  `isAlbumAdmin(org.silverpeas.core.admin.user.model.SilverpeasRole userRole, String albumId, String userId)`
  `Boolean`
  `isAnonymous()`
  `Boolean`
  `isBasket()`
  `Boolean`
  `isDragAndDropEnabled()`
  `boolean`
  `isExportEnable()`
  `Boolean`
  `isGuest()`
  `Boolean`
  `isMakeWatermark()`
  `boolean`
  `isMediaAdmin(org.silverpeas.core.admin.user.model.SilverpeasRole userRole, String mediaId, String userId)`
  `Boolean`
  `isOrder()`
  `Boolean`
  `isPrivateSearch()`
  `boolean`
  `isSearchResult()`
  `Boolean`
  `isUsePdc()`
  `Boolean`
  `isViewList()`
  `Boolean`
  `isViewMetadata()`
  `boolean`
  `isViewNotVisible()`
  `AlbumDetail`
  `loadCurrentAlbum()`
  `String`
  `manageAlbumSubscriptions()`
  `String`
  `manageComponentSubscriptions()`
  `void`
  `notifyUsers(org.silverpeas.core.notification.user.client.NotificationMetaData notifMetaData)`
  `void`
  `paste()`
  `Collection<Media>`
  `search(org.silverpeas.core.index.search.model.QueryDescription query)`
  `void`
  `sendAskMedia(String asking)`
  `void`
  `sendAskOrder(String orderId)`
  `void`
  `sendAskOrderUser(String orderId)`
  Send notification to reader to alert him that his order has been processed
  `void`
  `setCurrentAlbumId(String currentAlbumId)`
  `void`
  `setCurrentOrderId(String orderId)`
  `void`
  `setDisplayedMediaResolution(MediaResolution displayedMediaResolution)`
  `void`
  `setIndexOfCurrentPage(String index)`
  `void`
  `setMediaToAlbums(String mediaId, String[] albums)`
  `void`
  `setNbMediasPerPage(int nb)`
  `void`
  `setPDCSearchContext(org.silverpeas.core.pdc.pdc.model.SearchContext context)`
  `void`
  `setQuery(org.silverpeas.core.index.search.model.QueryDescription query)`
  `void`
  `setRestrictedListMedia(Collection<Media> restrictedListMedia)`
  `void`
  `setSearchKeyWord(String searchKeyWord)`
  `void`
  `setSearchResult(boolean isSearchResult)`
  `void`
  `setSearchResultListMedia(Collection<Media> searchResultListMedia)`
  `void`
  `setSelect(boolean select)`
  `void`
  `setSort(MediaSort sort)`
  `void`
  `setSortSearch(MediaSort sort)`
  `void`
  `setViewNotVisible(boolean isViewNotVisible)`
  `void`
  `setXMLSearchContext(org.silverpeas.core.contribution.content.form.DataRecord data)`
  `static void`
  `sortAlbums(List<org.silverpeas.core.node.model.NodePK> albumPKs)`
  `void`
  `updateAlbum(AlbumDetail album)`
  `void`
  `updateMediaByUser(String mediaId, MediaDataUpdateDelegate delegate)`
  Updating one media (just only one)
  `void`
  `updateMediaByUser(Collection<String> mediaIds, MediaDataUpdateDelegate delegate)`
  Updating several media (no file have to be handled)
  `void`
  `updateOrder(Order order)`
  `void`
  `updateOrderRow(String orderId, String mediaId)`

  ### Methods inherited from class org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController

  `addClipboardSelection, clipboardPasteDone, close, getClipboardErrorMessage, getClipboardExceptionError, getClipboardObjects, getClipboardSelectedObjects, getClipboardSize, getComponentAccessController, getComponentId, getComponentLabel, getComponentName, getComponentParameterValue, getComponentParameterValue, getComponentRootName, getComponentUrl, getHighestSilverpeasUserRole, getIcon, getLanguage, getLook, getMultilang, getOrganisationController, getPersonalization, getRSSUrl, getSelection, getSettings, getSilverpeasUserRoles, getSpaceId, getSpaceLabel, getString, getSubscriptionContext, getUrlEncodedParameter, getUserAccessLevel, getUserAvailComponentIds, getUserDetail, getUserDetail, getUserId, getUserManageableGroupIds, getUserManageableSpaceIds, getUserRoles, getZoneId, isAppInMaintenance, isGroupManager, isPasswordChangeAllowed, isSpaceInMaintenance, removeClipboardElement, setAppModeMaintenance, setClipboardSelectedElement, setComponentRootName, setSpaceModeMaintenance`

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

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

- ## Constructor Details

  - ### GallerySessionController

    public GallerySessionController(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl, org.silverpeas.core.web.mvc.controller.ComponentContext componentContext)
    Standard Session Controller Constructeur
    Parameters:
      `mainSessionCtrl` - The user's profile
      `componentContext` - The component's profile

- ## Method Details

  - ### getLastRegisteredMedia

    public List<Media> getLastRegisteredMedia()

  - ### getAllComments

    public List<org.silverpeas.core.comment.model.Comment> getAllComments(Media media)

  - ### getSilverObjectId

    public int getSilverObjectId(String objectId)

  - ### goToAlbum

    public AlbumDetail goToAlbum()

  - ### goToAlbum

    public AlbumDetail goToAlbum(String albumId)

  - ### loadCurrentAlbum

    public AlbumDetail loadCurrentAlbum()

  - ### getAlbum

    public AlbumDetail getAlbum(String albumId)

  - ### getAlbumLight

    public AlbumDetail getAlbumLight(String albumId)

  - ### getNotVisible

    public Collection<Media> getNotVisible()

  - ### getAllAlbums

    public Collection<AlbumDetail> getAllAlbums()

  - ### setMediaToAlbums

    public void setMediaToAlbums(String mediaId, String[] albums)

  - ### addMediaToAlbums

    public void addMediaToAlbums(String mediaId, String[] albums)

  - ### createAlbum

    public void createAlbum(AlbumDetail album)

  - ### updateAlbum

    public void updateAlbum(AlbumDetail album)

  - ### deleteAlbum

    public void deleteAlbum(String albumId)

  - ### getMetadataResources

    public org.silverpeas.kernel.bundle.LocalizationBundle getMetadataResources()

  - ### getMedia

    public Media getMedia(String mediaId)

  - ### getPrevious

    public Media getPrevious()

  - ### getNext

    public Media getNext()

  - ### createMedia

    public String createMedia(MediaDataCreateDelegate delegate)
    Creating one media (just only one)
    Parameters:
      `delegate` - the object to whom the creation is delegated
    Returns:
      the unique identifier of the new media.

  - ### updateMediaByUser

    public void updateMediaByUser(String mediaId, MediaDataUpdateDelegate delegate)
    Updating one media (just only one)
    Parameters:
      `mediaId` - the unique identifier of the media to update.
      `delegate` - the object to whom the effective update is delegated

  - ### updateMediaByUser

    public void updateMediaByUser(Collection<String> mediaIds, MediaDataUpdateDelegate delegate)
    Updating several media (no file have to be handled)
    Parameters:
      `mediaIds` - a collection of unique identifiers of media
      `delegate` - the object to whom the update of the media is delegated.

  - ### deleteMedia

    public void deleteMedia(String mediaId)

  - ### deleteMedia

    public void deleteMedia(Collection<String> mediaIds)

  - ### getPath

    public List<org.silverpeas.core.node.model.NodeDetail> getPath(org.silverpeas.core.node.model.NodePK nodePK)

  - ### getPath

    public Collection<org.silverpeas.core.node.model.NodeDetail> getPath()

  - ### getAlbumIdsOf

    public Collection<String> getAlbumIdsOf(String mediaId)

  - ### getNbMediaPerPage

    public int getNbMediaPerPage()

  - ### setNbMediasPerPage

    public void setNbMediasPerPage(int nb)

  - ### getDisplayedMediaResolution

    public MediaResolution getDisplayedMediaResolution()

  - ### setDisplayedMediaResolution

    public void setDisplayedMediaResolution(MediaResolution displayedMediaResolution)

  - ### getSort

    public MediaSort getSort()

  - ### setSort

    public void setSort(MediaSort sort)

  - ### setSortSearch

    public void setSortSearch(MediaSort sort)

  - ### setIndexOfCurrentPage

    public void setIndexOfCurrentPage(String index)

  - ### getIndexOfCurrentPage

    public int getIndexOfCurrentPage()

  - ### getCurrentAlbumId

    public String getCurrentAlbumId()

  - ### setCurrentAlbumId

    public void setCurrentAlbumId(String currentAlbumId)

  - ### getRang

    public int getRang()

  - ### isDragAndDropEnabled

    public Boolean isDragAndDropEnabled()

  - ### isUsePdc

    public Boolean isUsePdc()

  - ### isViewMetadata

    public Boolean isViewMetadata()

  - ### getWatermark

    public Watermark getWatermark()

  - ### isMakeWatermark

    public Boolean isMakeWatermark()

  - ### isViewList

    public Boolean isViewList()

  - ### areCommentsEnabled

    public Boolean areCommentsEnabled()

  - ### getSlideshowWait

    public Integer getSlideshowWait()

  - ### getXMLFormName

    public String getXMLFormName()

  - ### initIndex

    public void initIndex()

  - ### search

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

  - ### sendAskMedia

    public void sendAskMedia(String asking)

  - ### getListSelected

    public Collection<String> getListSelected()

  - ### clearListSelected

    public void clearListSelected()

  - ### getRestrictedListMedia

    public List<Media> getRestrictedListMedia()

  - ### setRestrictedListMedia

    public void setRestrictedListMedia(Collection<Media> restrictedListMedia)

  - ### getSearchResultListMedia

    public List<Media> getSearchResultListMedia()

  - ### setSearchResultListMedia

    public void setSearchResultListMedia(Collection<Media> searchResultListMedia)

  - ### getSearchKeyWord

    public String getSearchKeyWord()

  - ### setSearchKeyWord

    public void setSearchKeyWord(String searchKeyWord)

  - ### getSelect

    public boolean getSelect()

  - ### setSelect

    public void setSelect(boolean select)

  - ### isPrivateSearch

    public Boolean isPrivateSearch()

  - ### isAlbumAdmin

    public boolean isAlbumAdmin(org.silverpeas.core.admin.user.model.SilverpeasRole userRole, String albumId, String userId)

  - ### isMediaAdmin

    public boolean isMediaAdmin(org.silverpeas.core.admin.user.model.SilverpeasRole userRole, String mediaId, String userId)

  - ### copySelectedMedia

    public void copySelectedMedia(Collection<String> mediaIds) throws org.silverpeas.core.clipboard.ClipboardException
    Throws:
      `org.silverpeas.core.clipboard.ClipboardException`

  - ### cutSelectedMedia

    public void cutSelectedMedia(Collection<String> mediaIds) throws org.silverpeas.core.clipboard.ClipboardException
    Throws:
      `org.silverpeas.core.clipboard.ClipboardException`

  - ### copyMedia

    public void copyMedia(String mediaId) throws org.silverpeas.core.clipboard.ClipboardException
    Throws:
      `org.silverpeas.core.clipboard.ClipboardException`

  - ### cutMedia

    public void cutMedia(String mediaId) throws org.silverpeas.core.clipboard.ClipboardException
    Throws:
      `org.silverpeas.core.clipboard.ClipboardException`

  - ### copyAlbum

    public void copyAlbum(String albumId) throws org.silverpeas.core.clipboard.ClipboardException
    Throws:
      `org.silverpeas.core.clipboard.ClipboardException`

  - ### cutAlbum

    public void cutAlbum(String albumId) throws org.silverpeas.core.clipboard.ClipboardException
    Throws:
      `org.silverpeas.core.clipboard.ClipboardException`

  - ### paste

    public void paste() throws org.silverpeas.core.clipboard.ClipboardException
    Throws:
      `org.silverpeas.core.clipboard.ClipboardException`

  - ### countAllMediaOf

    public long countAllMediaOf(AlbumDetail album)

  - ### sendAskOrder

    public void sendAskOrder(String orderId)

  - ### sendAskOrderUser

    public void sendAskOrderUser(String orderId)
    Send notification to reader to alert him that his order has been processed
    Parameters:
      `orderId` - the order identifier

  - ### addToBasket

    public boolean addToBasket()
    Add only photo media inside basket
    Returns:
      true if selection contains only photo, false else if

  - ### addMediaToBasket

    public void addMediaToBasket(String mediaId)
    Add media identifier given in parameter in basket
    Parameters:
      `mediaId` - the media identifier to add

  - ### deleteSelectedPhotosFromBasket

    public void deleteSelectedPhotosFromBasket()
    Only remove selected photo from basket

  - ### deletePhotoFromBasket

    public void deletePhotoFromBasket(String mediaId)

  - ### clearBasket

    public void clearBasket()
    Clear basket

  - ### getBasketMedias

    public List<Media> getBasketMedias()

  - ### getOrder

    public Order getOrder(String orderId)

  - ### getCurrentOrderId

    public String getCurrentOrderId()

  - ### setCurrentOrderId

    public void setCurrentOrderId(String orderId)

  - ### addOrder

    public String addOrder()

  - ### updateOrderRow

    public void updateOrderRow(String orderId, String mediaId)

  - ### getUrl

    public String getUrl(String orderId, String mediaId)

  - ### isAccessAuthorized

    public boolean isAccessAuthorized(String orderId)

  - ### getMetaDataKeys

    public List<MetaData> getMetaDataKeys()

  - ### updateOrder

    public void updateOrder(Order order)

  - ### getAllOrders

    public List<Order> getAllOrders()

  - ### getOrdersByUser

    public List<Order> getOrdersByUser()

  - ### getOrderForm

    public String getOrderForm()

  - ### getCharteUrl

    public String getCharteUrl()

  - ### isBasket

    public Boolean isBasket()

  - ### isGuest

    public Boolean isGuest()

  - ### isAnonymous

    public Boolean isAnonymous()

  - ### isOrder

    public Boolean isOrder()

  - ### isViewNotVisible

    public boolean isViewNotVisible()

  - ### isExportEnable

    public boolean isExportEnable()

  - ### setViewNotVisible

    public void setViewNotVisible(boolean isViewNotVisible)

  - ### isSearchResult

    public boolean isSearchResult()

  - ### setSearchResult

    public void setSearchResult(boolean isSearchResult)

  - ### getQuery

    public org.silverpeas.core.index.search.model.QueryDescription getQuery()

  - ### setQuery

    public void setQuery(org.silverpeas.core.index.search.model.QueryDescription query)

  - ### setPDCSearchContext

    public void setPDCSearchContext(org.silverpeas.core.pdc.pdc.model.SearchContext context)

  - ### getPDCSearchContext

    public org.silverpeas.core.pdc.pdc.model.SearchContext getPDCSearchContext()

  - ### setXMLSearchContext

    public void setXMLSearchContext(org.silverpeas.core.contribution.content.form.DataRecord data)

  - ### getXMLSearchContext

    public org.silverpeas.core.contribution.content.form.DataRecord getXMLSearchContext()

  - ### clearSearchContext

    public void clearSearchContext()

  - ### sortAlbums

    public static void sortAlbums(List<org.silverpeas.core.node.model.NodePK> albumPKs)

  - ### addNbMedia

    public Collection<AlbumDetail> addNbMedia(Collection<AlbumDetail> albums)

  - ### notifyUsers

    public void notifyUsers(org.silverpeas.core.notification.user.client.NotificationMetaData notifMetaData)

  - ### exportAlbum

    public org.silverpeas.core.importexport.report.ExportReport exportAlbum(String albumId, MediaResolution mediaResolution) throws org.silverpeas.core.importexport.ExportException
    Export all the pictures in the given album, with the specified resolution
    Parameters:
      `albumId` - the unique identifier of an album.
      `mediaResolution` - the resolution to which the media has to be exported
    Throws:
      `org.silverpeas.core.importexport.ExportException`

  - ### aGalleryExporter

    public static GalleryExporter aGalleryExporter()
    Gets a new exporter of gallery media.
    Returns:
      a gallery exporter instance.

  - ### exportSelection

    public org.silverpeas.core.importexport.report.ExportReport exportSelection(MediaResolution mediaResolution) throws org.silverpeas.core.importexport.ExportException
    Export all the selected images in the basket with the given resolution
    Parameters:
      `mediaResolution` - the resolution to which the media has to be exported
    Throws:
      `org.silverpeas.core.importexport.ExportException`

  - ### getImagePreviewSize

    public MediaResolution getImagePreviewSize()
    Get the resolution preview of images
    Returns:
      the image resolution on preview

  - ### getImageResolutionPreview

    public MediaResolution getImageResolutionPreview(Media media)
    Get the resolution preview of the images
    Parameters:
      `media` - a media.
    Returns:
      the media resolution on preview

  - ### getTemplate

    public org.silverpeas.core.contribution.template.publication.PublicationTemplate getTemplate() throws org.silverpeas.core.contribution.template.publication.PublicationTemplateException
    Throws:
      `org.silverpeas.core.contribution.template.publication.PublicationTemplateException`

  - ### getOrderTemplate

    public org.silverpeas.core.contribution.template.publication.PublicationTemplate getOrderTemplate() throws org.silverpeas.core.contribution.template.publication.PublicationTemplateException
    Throws:
      `org.silverpeas.core.contribution.template.publication.PublicationTemplateException`

  - ### manageComponentSubscriptions

    public String manageComponentSubscriptions()

  - ### manageAlbumSubscriptions

    public String manageAlbumSubscriptions()