001
014
015 package com.liferay.portlet.imagegallery.service;
016
017 import com.liferay.portal.kernel.annotation.Isolation;
018 import com.liferay.portal.kernel.annotation.Propagation;
019 import com.liferay.portal.kernel.annotation.Transactional;
020 import com.liferay.portal.kernel.exception.PortalException;
021 import com.liferay.portal.kernel.exception.SystemException;
022
023
040 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
041 PortalException.class, SystemException.class})
042 public interface IGImageService {
043 public com.liferay.portlet.imagegallery.model.IGImage addImage(
044 long groupId, long folderId, java.lang.String name,
045 java.lang.String description, java.io.File file,
046 java.lang.String contentType,
047 com.liferay.portal.service.ServiceContext serviceContext)
048 throws com.liferay.portal.kernel.exception.PortalException,
049 com.liferay.portal.kernel.exception.SystemException;
050
051 public void deleteImage(long imageId)
052 throws com.liferay.portal.kernel.exception.PortalException,
053 com.liferay.portal.kernel.exception.SystemException;
054
055 public void deleteImageByFolderIdAndNameWithExtension(long groupId,
056 long folderId, java.lang.String nameWithExtension)
057 throws com.liferay.portal.kernel.exception.PortalException,
058 com.liferay.portal.kernel.exception.SystemException;
059
060 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
061 public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
062 long groupId, long userId, int start, int end)
063 throws com.liferay.portal.kernel.exception.SystemException;
064
065 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
066 public int getGroupImagesCount(long groupId, long userId)
067 throws com.liferay.portal.kernel.exception.SystemException;
068
069 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
070 public com.liferay.portlet.imagegallery.model.IGImage getImage(long imageId)
071 throws com.liferay.portal.kernel.exception.PortalException,
072 com.liferay.portal.kernel.exception.SystemException;
073
074 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
075 public com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(
076 long groupId, long folderId, java.lang.String nameWithExtension)
077 throws com.liferay.portal.kernel.exception.PortalException,
078 com.liferay.portal.kernel.exception.SystemException;
079
080 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
081 public com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(
082 long largeImageId)
083 throws com.liferay.portal.kernel.exception.PortalException,
084 com.liferay.portal.kernel.exception.SystemException;
085
086 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
087 public com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(
088 long smallImageId)
089 throws com.liferay.portal.kernel.exception.PortalException,
090 com.liferay.portal.kernel.exception.SystemException;
091
092 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
093 public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
094 long groupId, long folderId)
095 throws com.liferay.portal.kernel.exception.SystemException;
096
097 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
098 public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
099 long groupId, long folderId, int start, int end)
100 throws com.liferay.portal.kernel.exception.SystemException;
101
102 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
103 public int getImagesCount(long groupId, long folderId)
104 throws com.liferay.portal.kernel.exception.SystemException;
105
106 public com.liferay.portlet.imagegallery.model.IGImage updateImage(
107 long imageId, long groupId, long folderId, java.lang.String name,
108 java.lang.String description, java.io.File file,
109 java.lang.String contentType,
110 com.liferay.portal.service.ServiceContext serviceContext)
111 throws com.liferay.portal.kernel.exception.PortalException,
112 com.liferay.portal.kernel.exception.SystemException;
113 }