001
014
015 package com.liferay.portlet.imagegallery.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
036 public class IGImageServiceUtil {
037 public static com.liferay.portlet.imagegallery.model.IGImage addImage(
038 long groupId, long folderId, java.lang.String name,
039 java.lang.String description, java.io.File file,
040 java.lang.String contentType,
041 com.liferay.portal.service.ServiceContext serviceContext)
042 throws com.liferay.portal.kernel.exception.PortalException,
043 com.liferay.portal.kernel.exception.SystemException {
044 return getService()
045 .addImage(groupId, folderId, name, description, file,
046 contentType, serviceContext);
047 }
048
049 public static void deleteImage(long imageId)
050 throws com.liferay.portal.kernel.exception.PortalException,
051 com.liferay.portal.kernel.exception.SystemException {
052 getService().deleteImage(imageId);
053 }
054
055 public static 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 getService()
060 .deleteImageByFolderIdAndNameWithExtension(groupId, folderId,
061 nameWithExtension);
062 }
063
064 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
065 long groupId, long userId, int start, int end)
066 throws com.liferay.portal.kernel.exception.SystemException {
067 return getService().getGroupImages(groupId, userId, start, end);
068 }
069
070 public static int getGroupImagesCount(long groupId, long userId)
071 throws com.liferay.portal.kernel.exception.SystemException {
072 return getService().getGroupImagesCount(groupId, userId);
073 }
074
075 public static com.liferay.portlet.imagegallery.model.IGImage getImage(
076 long imageId)
077 throws com.liferay.portal.kernel.exception.PortalException,
078 com.liferay.portal.kernel.exception.SystemException {
079 return getService().getImage(imageId);
080 }
081
082 public static com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(
083 long groupId, long folderId, java.lang.String nameWithExtension)
084 throws com.liferay.portal.kernel.exception.PortalException,
085 com.liferay.portal.kernel.exception.SystemException {
086 return getService()
087 .getImageByFolderIdAndNameWithExtension(groupId, folderId,
088 nameWithExtension);
089 }
090
091 public static com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(
092 long largeImageId)
093 throws com.liferay.portal.kernel.exception.PortalException,
094 com.liferay.portal.kernel.exception.SystemException {
095 return getService().getImageByLargeImageId(largeImageId);
096 }
097
098 public static com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(
099 long smallImageId)
100 throws com.liferay.portal.kernel.exception.PortalException,
101 com.liferay.portal.kernel.exception.SystemException {
102 return getService().getImageBySmallImageId(smallImageId);
103 }
104
105 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
106 long groupId, long folderId)
107 throws com.liferay.portal.kernel.exception.SystemException {
108 return getService().getImages(groupId, folderId);
109 }
110
111 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
112 long groupId, long folderId, int start, int end)
113 throws com.liferay.portal.kernel.exception.SystemException {
114 return getService().getImages(groupId, folderId, start, end);
115 }
116
117 public static int getImagesCount(long groupId, long folderId)
118 throws com.liferay.portal.kernel.exception.SystemException {
119 return getService().getImagesCount(groupId, folderId);
120 }
121
122 public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
123 long imageId, long groupId, long folderId, java.lang.String name,
124 java.lang.String description, java.io.File file,
125 java.lang.String contentType,
126 com.liferay.portal.service.ServiceContext serviceContext)
127 throws com.liferay.portal.kernel.exception.PortalException,
128 com.liferay.portal.kernel.exception.SystemException {
129 return getService()
130 .updateImage(imageId, groupId, folderId, name, description,
131 file, contentType, serviceContext);
132 }
133
134 public static IGImageService getService() {
135 if (_service == null) {
136 _service = (IGImageService)PortalBeanLocatorUtil.locate(IGImageService.class.getName());
137 }
138
139 return _service;
140 }
141
142 public void setService(IGImageService service) {
143 _service = service;
144 }
145
146 private static IGImageService _service;
147 }