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:
  • 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()