001
014
015 package com.liferay.portlet.imagegallery.service.http;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019
020 import com.liferay.portlet.imagegallery.service.IGImageServiceUtil;
021
022 import java.rmi.RemoteException;
023
024
067 public class IGImageServiceSoap {
068 public static void deleteImage(long imageId) throws RemoteException {
069 try {
070 IGImageServiceUtil.deleteImage(imageId);
071 }
072 catch (Exception e) {
073 _log.error(e, e);
074
075 throw new RemoteException(e.getMessage());
076 }
077 }
078
079 public static void deleteImageByFolderIdAndNameWithExtension(long groupId,
080 long folderId, java.lang.String nameWithExtension)
081 throws RemoteException {
082 try {
083 IGImageServiceUtil.deleteImageByFolderIdAndNameWithExtension(groupId,
084 folderId, nameWithExtension);
085 }
086 catch (Exception e) {
087 _log.error(e, e);
088
089 throw new RemoteException(e.getMessage());
090 }
091 }
092
093 public static com.liferay.portlet.imagegallery.model.IGImageSoap[] getGroupImages(
094 long groupId, long userId, int start, int end)
095 throws RemoteException {
096 try {
097 java.util.List<com.liferay.portlet.imagegallery.model.IGImage> returnValue =
098 IGImageServiceUtil.getGroupImages(groupId, userId, start, end);
099
100 return com.liferay.portlet.imagegallery.model.IGImageSoap.toSoapModels(returnValue);
101 }
102 catch (Exception e) {
103 _log.error(e, e);
104
105 throw new RemoteException(e.getMessage());
106 }
107 }
108
109 public static int getGroupImagesCount(long groupId, long userId)
110 throws RemoteException {
111 try {
112 int returnValue = IGImageServiceUtil.getGroupImagesCount(groupId,
113 userId);
114
115 return returnValue;
116 }
117 catch (Exception e) {
118 _log.error(e, e);
119
120 throw new RemoteException(e.getMessage());
121 }
122 }
123
124 public static com.liferay.portlet.imagegallery.model.IGImageSoap getImage(
125 long imageId) throws RemoteException {
126 try {
127 com.liferay.portlet.imagegallery.model.IGImage returnValue = IGImageServiceUtil.getImage(imageId);
128
129 return com.liferay.portlet.imagegallery.model.IGImageSoap.toSoapModel(returnValue);
130 }
131 catch (Exception e) {
132 _log.error(e, e);
133
134 throw new RemoteException(e.getMessage());
135 }
136 }
137
138 public static com.liferay.portlet.imagegallery.model.IGImageSoap getImageByFolderIdAndNameWithExtension(
139 long groupId, long folderId, java.lang.String nameWithExtension)
140 throws RemoteException {
141 try {
142 com.liferay.portlet.imagegallery.model.IGImage returnValue = IGImageServiceUtil.getImageByFolderIdAndNameWithExtension(groupId,
143 folderId, nameWithExtension);
144
145 return com.liferay.portlet.imagegallery.model.IGImageSoap.toSoapModel(returnValue);
146 }
147 catch (Exception e) {
148 _log.error(e, e);
149
150 throw new RemoteException(e.getMessage());
151 }
152 }
153
154 public static com.liferay.portlet.imagegallery.model.IGImageSoap getImageByLargeImageId(
155 long largeImageId) throws RemoteException {
156 try {
157 com.liferay.portlet.imagegallery.model.IGImage returnValue = IGImageServiceUtil.getImageByLargeImageId(largeImageId);
158
159 return com.liferay.portlet.imagegallery.model.IGImageSoap.toSoapModel(returnValue);
160 }
161 catch (Exception e) {
162 _log.error(e, e);
163
164 throw new RemoteException(e.getMessage());
165 }
166 }
167
168 public static com.liferay.portlet.imagegallery.model.IGImageSoap getImageBySmallImageId(
169 long smallImageId) throws RemoteException {
170 try {
171 com.liferay.portlet.imagegallery.model.IGImage returnValue = IGImageServiceUtil.getImageBySmallImageId(smallImageId);
172
173 return com.liferay.portlet.imagegallery.model.IGImageSoap.toSoapModel(returnValue);
174 }
175 catch (Exception e) {
176 _log.error(e, e);
177
178 throw new RemoteException(e.getMessage());
179 }
180 }
181
182 public static com.liferay.portlet.imagegallery.model.IGImageSoap[] getImages(
183 long groupId, long folderId) throws RemoteException {
184 try {
185 java.util.List<com.liferay.portlet.imagegallery.model.IGImage> returnValue =
186 IGImageServiceUtil.getImages(groupId, folderId);
187
188 return com.liferay.portlet.imagegallery.model.IGImageSoap.toSoapModels(returnValue);
189 }
190 catch (Exception e) {
191 _log.error(e, e);
192
193 throw new RemoteException(e.getMessage());
194 }
195 }
196
197 public static com.liferay.portlet.imagegallery.model.IGImageSoap[] getImages(
198 long groupId, long folderId, int start, int end)
199 throws RemoteException {
200 try {
201 java.util.List<com.liferay.portlet.imagegallery.model.IGImage> returnValue =
202 IGImageServiceUtil.getImages(groupId, folderId, start, end);
203
204 return com.liferay.portlet.imagegallery.model.IGImageSoap.toSoapModels(returnValue);
205 }
206 catch (Exception e) {
207 _log.error(e, e);
208
209 throw new RemoteException(e.getMessage());
210 }
211 }
212
213 public static int getImagesCount(long groupId, long folderId)
214 throws RemoteException {
215 try {
216 int returnValue = IGImageServiceUtil.getImagesCount(groupId,
217 folderId);
218
219 return returnValue;
220 }
221 catch (Exception e) {
222 _log.error(e, e);
223
224 throw new RemoteException(e.getMessage());
225 }
226 }
227
228 private static Log _log = LogFactoryUtil.getLog(IGImageServiceSoap.class);
229 }