Class DefaultGalleryService
java.lang.Object
org.silverpeas.components.gallery.service.DefaultGalleryService
- All Implemented Interfaces:
GalleryService,org.silverpeas.core.ApplicationService
@Service
@Named("galleryService")
public class DefaultGalleryService
extends Object
implements GalleryService
DefaultGalleryService is the service layer which manage a media gallery
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMediaToAlbums(Media media, String... albums) longcountAllMedia(org.silverpeas.core.node.model.NodePK nodePK) longcountAllMedia(org.silverpeas.core.node.model.NodePK nodePK, MediaCriteria.VISIBILITY visibility) createAlbum(AlbumDetail album, org.silverpeas.core.node.model.NodePK nodePK) createMedia(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, Watermark watermark, MediaDataCreateDelegate delegate) createOrder(Collection<String> basket, String userId, String componentId) voiddeleteAlbum(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, org.silverpeas.core.node.model.NodePK nodePK) voiddeleteMedia(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, Collection<String> mediaIds) voiddeleteOrders(List<Order> orders) getAlbum(org.silverpeas.core.node.model.NodePK nodePK) getAlbum(org.silverpeas.core.node.model.NodePK nodePK, MediaCriteria.VISIBILITY visibility) getAlbumIdsOf(Media media) getAllAlbums(String instanceId) getAllMedia(String instanceId, MediaCriteria.VISIBILITY visibility) 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) get my list of SocialInformationGallery according to options and number of Item and the first Index.getAllMediaThatWillBeNotVisible(int nbDays) getAllOrders(String userId, String instanceId) getAllOrderToDelete(int nbDays) getAllPhotos(org.silverpeas.core.node.model.NodePK nodePK) getAllPhotos(org.silverpeas.core.node.model.NodePK nodePK, MediaCriteria.VISIBILITY visibility) org.silverpeas.kernel.bundle.LocalizationBundlegetComponentMessages(String language) org.silverpeas.kernel.bundle.SettingBundlegetContributionById(org.silverpeas.core.contribution.model.ContributionIdentifier contributionId) getLastRegisteredMedia(String instanceId) getMedia(List<String> mediaIds, String componentInstanceId, MediaCriteria.VISIBILITY visibility) getMedia(MediaPK mediaPK, MediaCriteria.VISIBILITY visibility) getNotVisible(String instanceId) Collection<org.silverpeas.core.node.model.NodeDetail>getPath(org.silverpeas.core.node.model.NodePK nodePK) intgetSilverObjectId(MediaPK mediaPK) List<org.silverpeas.core.socialnetwork.model.SocialInformation>getSocialInformationListOfMyContacts(List<String> listOfUserId, List<String> availableComponent, org.silverpeas.core.date.period.Period period) get list of SocialInformationGallery of my contacts according to options and number of Item and the first Index.voidimportFromRepository(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, File repository, MediaDataCreateDelegate delegate) voidindexGallery(org.silverpeas.core.admin.user.model.UserDetail user, String instanceId) booleanisRelatedTo(String instanceId) voidpaste(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, GalleryPasteDelegate delegate) voidremoveMediaFromAllAlbums(Media media) search(org.silverpeas.core.index.search.model.QueryDescription query) voidsortAlbums(List<org.silverpeas.core.node.model.NodePK> nodePKs) voidupdateAlbum(AlbumDetail album) voidupdateMedia(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, Collection<String> mediaIds, String albumId, MediaDataUpdateDelegate delegate) voidupdateMedia(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, Media media, Watermark watermark, MediaDataUpdateDelegate delegate) voidupdateOrder(Order order) voidupdateOrderRow(OrderRow row)
-
Constructor Details
-
DefaultGalleryService
public DefaultGalleryService()
-
-
Method Details
-
getContributionById
public Optional<Media> getContributionById(org.silverpeas.core.contribution.model.ContributionIdentifier contributionId) - Specified by:
getContributionByIdin interfaceorg.silverpeas.core.ApplicationService- Specified by:
getContributionByIdin interfaceGalleryService
-
getComponentSettings
public org.silverpeas.kernel.bundle.SettingBundle getComponentSettings()- Specified by:
getComponentSettingsin interfaceorg.silverpeas.core.ApplicationService
-
getComponentMessages
- Specified by:
getComponentMessagesin interfaceorg.silverpeas.core.ApplicationService
-
isRelatedTo
- Specified by:
isRelatedToin interfaceorg.silverpeas.core.ApplicationService
-
getAlbum
- Specified by:
getAlbumin interfaceGalleryService
-
getAlbum
public AlbumDetail getAlbum(org.silverpeas.core.node.model.NodePK nodePK, MediaCriteria.VISIBILITY visibility) - Specified by:
getAlbumin interfaceGalleryService
-
getAllAlbums
- Specified by:
getAllAlbumsin interfaceGalleryService
-
createAlbum
- Specified by:
createAlbumin interfaceGalleryService
-
updateAlbum
- Specified by:
updateAlbumin interfaceGalleryService
-
deleteAlbum
public void deleteAlbum(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, org.silverpeas.core.node.model.NodePK nodePK) - Specified by:
deleteAlbumin interfaceGalleryService
-
getPhoto
- Specified by:
getPhotoin interfaceGalleryService
-
getMedia
- Specified by:
getMediain interfaceGalleryService
-
getMedia
- Specified by:
getMediain interfaceGalleryService
-
getMedia
- Specified by:
getMediain interfaceGalleryService
-
getMedia
public List<Media> getMedia(List<String> mediaIds, String componentInstanceId, MediaCriteria.VISIBILITY visibility) - Specified by:
getMediain interfaceGalleryService
-
getAllMedia
- Specified by:
getAllMediain interfaceGalleryService
-
getAllMedia
public Collection<Media> getAllMedia(org.silverpeas.core.node.model.NodePK nodePK, MediaCriteria.VISIBILITY visibility) - Specified by:
getAllMediain interfaceGalleryService
-
countAllMedia
public long countAllMedia(org.silverpeas.core.node.model.NodePK nodePK) - Specified by:
countAllMediain interfaceGalleryService
-
countAllMedia
public long countAllMedia(org.silverpeas.core.node.model.NodePK nodePK, MediaCriteria.VISIBILITY visibility) - Specified by:
countAllMediain interfaceGalleryService
-
getAllPhotos
- Specified by:
getAllPhotosin interfaceGalleryService
-
getAllPhotos
public Collection<Photo> getAllPhotos(org.silverpeas.core.node.model.NodePK nodePK, MediaCriteria.VISIBILITY visibility) - Specified by:
getAllPhotosin interfaceGalleryService
-
getNotVisible
- Specified by:
getNotVisiblein interfaceGalleryService
-
paste
public void paste(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, GalleryPasteDelegate delegate) - Specified by:
pastein interfaceGalleryService
-
importFromRepository
public void importFromRepository(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, File repository, MediaDataCreateDelegate delegate) - Specified by:
importFromRepositoryin interfaceGalleryService
-
createMedia
public Media createMedia(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, Watermark watermark, MediaDataCreateDelegate delegate) - Specified by:
createMediain interfaceGalleryService
-
updateMedia
public void updateMedia(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, Collection<String> mediaIds, String albumId, MediaDataUpdateDelegate delegate) - Specified by:
updateMediain interfaceGalleryService
-
updateMedia
public void updateMedia(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, Media media, Watermark watermark, MediaDataUpdateDelegate delegate) - Specified by:
updateMediain interfaceGalleryService
-
deleteMedia
public void deleteMedia(org.silverpeas.core.admin.user.model.UserDetail user, String componentInstanceId, Collection<String> mediaIds) - Specified by:
deleteMediain interfaceGalleryService
-
getLastRegisteredMedia
- Specified by:
getLastRegisteredMediain interfaceGalleryService
-
getPath
public Collection<org.silverpeas.core.node.model.NodeDetail> getPath(org.silverpeas.core.node.model.NodePK nodePK) - Specified by:
getPathin interfaceGalleryService
-
getAlbumIdsOf
- Specified by:
getAlbumIdsOfin interfaceGalleryService
-
removeMediaFromAllAlbums
- Specified by:
removeMediaFromAllAlbumsin interfaceGalleryService
-
addMediaToAlbums
- Specified by:
addMediaToAlbumsin interfaceGalleryService
-
indexGallery
- Specified by:
indexGalleryin interfaceGalleryService
-
getSilverObjectId
- Specified by:
getSilverObjectIdin interfaceGalleryService
-
search
- Specified by:
searchin interfaceGalleryService
-
getAllMediaThatWillBeNotVisible
- Specified by:
getAllMediaThatWillBeNotVisiblein interfaceGalleryService
-
createOrder
- Specified by:
createOrderin interfaceGalleryService
-
getAllOrders
- Specified by:
getAllOrdersin interfaceGalleryService
-
updateOrder
- Specified by:
updateOrderin interfaceGalleryService
-
updateOrderRow
- Specified by:
updateOrderRowin interfaceGalleryService
-
getOrder
- Specified by:
getOrderin interfaceGalleryService
-
getAllOrderToDelete
- Specified by:
getAllOrderToDeletein interfaceGalleryService
-
deleteOrders
- Specified by:
deleteOrdersin interfaceGalleryService
-
getAllMediaByUserId
public List<org.silverpeas.core.socialnetwork.model.SocialInformation> getAllMediaByUserId(String userId, org.silverpeas.core.date.period.Period period) get my list of SocialInformationGallery according to options and number of Item and the first Index.- Specified by:
getAllMediaByUserIdin interfaceGalleryService- Parameters:
period- the period on which the data are requested.userId- the unique identifier of a user- Returns:
- a
List<SocialInformation>
-
getSocialInformationListOfMyContacts
public List<org.silverpeas.core.socialnetwork.model.SocialInformation> getSocialInformationListOfMyContacts(List<String> listOfUserId, List<String> availableComponent, org.silverpeas.core.date.period.Period period) get list of SocialInformationGallery of my contacts according to options and number of Item and the first Index.- Specified by:
getSocialInformationListOfMyContactsin interfaceGalleryService- Parameters:
period- the period on which the data are requested.listOfUserId- a list of unique identifier of users.availableComponent- a list of unique identifier of component instances.- Returns:
- a
List<SocialInformation>
-
sortAlbums
- Specified by:
sortAlbumsin interfaceGalleryService
-