1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.imagegallery.service;
21  
22  import com.liferay.portal.PortalException;
23  import com.liferay.portal.SystemException;
24  import com.liferay.portal.kernel.annotation.Isolation;
25  import com.liferay.portal.kernel.annotation.Propagation;
26  import com.liferay.portal.kernel.annotation.Transactional;
27  
28  /**
29   * <a href="IGImageLocalService.java.html"><b><i>View Source</i></b></a>
30   *
31   * <p>
32   * ServiceBuilder generated this class. Modifications in this class will be
33   * overwritten the next time is generated.
34   * </p>
35   *
36   * <p>
37   * This interface defines the service. The default implementation is
38   * <code>com.liferay.portlet.imagegallery.service.impl.IGImageLocalServiceImpl</code>.
39   * Modify methods in that class and rerun ServiceBuilder to populate this class
40   * and all other generated classes.
41   * </p>
42   *
43   * <p>
44   * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.imagegallery.service.IGImageLocalServiceUtil
50   *
51   */
52  @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
53      PortalException.class, SystemException.class})
54  public interface IGImageLocalService {
55      public com.liferay.portlet.imagegallery.model.IGImage addIGImage(
56          com.liferay.portlet.imagegallery.model.IGImage igImage)
57          throws com.liferay.portal.SystemException;
58  
59      public com.liferay.portlet.imagegallery.model.IGImage createIGImage(
60          long imageId);
61  
62      public void deleteIGImage(long imageId)
63          throws com.liferay.portal.SystemException,
64              com.liferay.portal.PortalException;
65  
66      public void deleteIGImage(
67          com.liferay.portlet.imagegallery.model.IGImage igImage)
68          throws com.liferay.portal.SystemException;
69  
70      public java.util.List<Object> dynamicQuery(
71          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
72          throws com.liferay.portal.SystemException;
73  
74      public java.util.List<Object> dynamicQuery(
75          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
76          int end) throws com.liferay.portal.SystemException;
77  
78      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
79      public com.liferay.portlet.imagegallery.model.IGImage getIGImage(
80          long imageId)
81          throws com.liferay.portal.SystemException,
82              com.liferay.portal.PortalException;
83  
84      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
85      public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getIGImages(
86          int start, int end) throws com.liferay.portal.SystemException;
87  
88      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
89      public int getIGImagesCount() throws com.liferay.portal.SystemException;
90  
91      public com.liferay.portlet.imagegallery.model.IGImage updateIGImage(
92          com.liferay.portlet.imagegallery.model.IGImage igImage)
93          throws com.liferay.portal.SystemException;
94  
95      public com.liferay.portlet.imagegallery.model.IGImage updateIGImage(
96          com.liferay.portlet.imagegallery.model.IGImage igImage, boolean merge)
97          throws com.liferay.portal.SystemException;
98  
99      public com.liferay.portlet.imagegallery.model.IGImage addImage(
100         long userId, long folderId, java.lang.String name,
101         java.lang.String description, java.io.File file,
102         java.lang.String contentType,
103         com.liferay.portal.service.ServiceContext serviceContext)
104         throws com.liferay.portal.PortalException,
105             com.liferay.portal.SystemException;
106 
107     public com.liferay.portlet.imagegallery.model.IGImage addImage(
108         long userId, long folderId, java.lang.String name,
109         java.lang.String description, java.lang.String fileName, byte[] bytes,
110         java.lang.String contentType,
111         com.liferay.portal.service.ServiceContext serviceContext)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException;
114 
115     public com.liferay.portlet.imagegallery.model.IGImage addImage(
116         long userId, long folderId, java.lang.String name,
117         java.lang.String description, java.lang.String fileName,
118         java.io.InputStream is, java.lang.String contentType,
119         com.liferay.portal.service.ServiceContext serviceContext)
120         throws com.liferay.portal.PortalException,
121             com.liferay.portal.SystemException;
122 
123     public com.liferay.portlet.imagegallery.model.IGImage addImage(
124         java.lang.String uuid, long userId, long folderId,
125         java.lang.String name, java.lang.String description, java.io.File file,
126         java.lang.String contentType,
127         com.liferay.portal.service.ServiceContext serviceContext)
128         throws com.liferay.portal.PortalException,
129             com.liferay.portal.SystemException;
130 
131     public com.liferay.portlet.imagegallery.model.IGImage addImage(
132         java.lang.String uuid, long userId, long folderId,
133         java.lang.String name, java.lang.String description,
134         java.lang.String fileName, byte[] bytes, java.lang.String contentType,
135         com.liferay.portal.service.ServiceContext serviceContext)
136         throws com.liferay.portal.PortalException,
137             com.liferay.portal.SystemException;
138 
139     public com.liferay.portlet.imagegallery.model.IGImage addImage(
140         java.lang.String uuid, long userId, long folderId,
141         java.lang.String name, java.lang.String description,
142         java.lang.String fileName, java.io.InputStream is,
143         java.lang.String contentType,
144         com.liferay.portal.service.ServiceContext serviceContext)
145         throws com.liferay.portal.PortalException,
146             com.liferay.portal.SystemException;
147 
148     public void addImageResources(long imageId,
149         boolean addCommunityPermissions, boolean addGuestPermissions)
150         throws com.liferay.portal.PortalException,
151             com.liferay.portal.SystemException;
152 
153     public void addImageResources(
154         com.liferay.portlet.imagegallery.model.IGImage image,
155         boolean addCommunityPermissions, boolean addGuestPermissions)
156         throws com.liferay.portal.PortalException,
157             com.liferay.portal.SystemException;
158 
159     public void addImageResources(long imageId,
160         java.lang.String[] communityPermissions,
161         java.lang.String[] guestPermissions)
162         throws com.liferay.portal.PortalException,
163             com.liferay.portal.SystemException;
164 
165     public void addImageResources(
166         com.liferay.portlet.imagegallery.model.IGImage image,
167         java.lang.String[] communityPermissions,
168         java.lang.String[] guestPermissions)
169         throws com.liferay.portal.PortalException,
170             com.liferay.portal.SystemException;
171 
172     public void deleteImage(long imageId)
173         throws com.liferay.portal.PortalException,
174             com.liferay.portal.SystemException;
175 
176     public void deleteImage(
177         com.liferay.portlet.imagegallery.model.IGImage image)
178         throws com.liferay.portal.PortalException,
179             com.liferay.portal.SystemException;
180 
181     public void deleteImages(long folderId)
182         throws com.liferay.portal.PortalException,
183             com.liferay.portal.SystemException;
184 
185     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186     public int getFoldersImagesCount(java.util.List<Long> folderIds)
187         throws com.liferay.portal.SystemException;
188 
189     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
190     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
191         long groupId, int start, int end)
192         throws com.liferay.portal.SystemException;
193 
194     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
195     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
196         long groupId, long userId, int start, int end)
197         throws com.liferay.portal.SystemException;
198 
199     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200     public int getGroupImagesCount(long groupId)
201         throws com.liferay.portal.SystemException;
202 
203     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204     public int getGroupImagesCount(long groupId, long userId)
205         throws com.liferay.portal.SystemException;
206 
207     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208     public com.liferay.portlet.imagegallery.model.IGImage getImage(long imageId)
209         throws com.liferay.portal.PortalException,
210             com.liferay.portal.SystemException;
211 
212     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213     public com.liferay.portlet.imagegallery.model.IGImage getImageByCustom1ImageId(
214         long custom1ImageId)
215         throws com.liferay.portal.PortalException,
216             com.liferay.portal.SystemException;
217 
218     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
219     public com.liferay.portlet.imagegallery.model.IGImage getImageByCustom2ImageId(
220         long custom2ImageId)
221         throws com.liferay.portal.PortalException,
222             com.liferay.portal.SystemException;
223 
224     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
225     public com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(
226         long folderId, java.lang.String nameWithExtension)
227         throws com.liferay.portal.PortalException,
228             com.liferay.portal.SystemException;
229 
230     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
231     public com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(
232         long largeImageId)
233         throws com.liferay.portal.PortalException,
234             com.liferay.portal.SystemException;
235 
236     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
237     public com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(
238         long smallImageId)
239         throws com.liferay.portal.PortalException,
240             com.liferay.portal.SystemException;
241 
242     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
243     public com.liferay.portlet.imagegallery.model.IGImage getImageByUuidAndGroupId(
244         java.lang.String uuid, long groupId)
245         throws com.liferay.portal.PortalException,
246             com.liferay.portal.SystemException;
247 
248     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
249     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
250         long folderId) throws com.liferay.portal.SystemException;
251 
252     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
253     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
254         long folderId, int start, int end)
255         throws com.liferay.portal.SystemException;
256 
257     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
258     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
259         long folderId, int start, int end,
260         com.liferay.portal.kernel.util.OrderByComparator obc)
261         throws com.liferay.portal.SystemException;
262 
263     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
264     public int getImagesCount(long folderId)
265         throws com.liferay.portal.SystemException;
266 
267     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
268     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getNoAssetImages()
269         throws com.liferay.portal.SystemException;
270 
271     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
272     public void reIndex(long imageId) throws com.liferay.portal.SystemException;
273 
274     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
275     public void reIndex(com.liferay.portlet.imagegallery.model.IGImage image)
276         throws com.liferay.portal.SystemException;
277 
278     public com.liferay.portlet.imagegallery.model.IGImage updateImage(
279         long userId, long imageId, long folderId, java.lang.String name,
280         java.lang.String description, byte[] bytes,
281         java.lang.String contentType,
282         com.liferay.portal.service.ServiceContext serviceContext)
283         throws com.liferay.portal.PortalException,
284             com.liferay.portal.SystemException;
285 
286     public com.liferay.portlet.imagegallery.model.IGImage updateImage(
287         long userId, long imageId, long folderId, java.lang.String name,
288         java.lang.String description, java.io.File file,
289         java.lang.String contentType,
290         com.liferay.portal.service.ServiceContext serviceContext)
291         throws com.liferay.portal.PortalException,
292             com.liferay.portal.SystemException;
293 
294     public com.liferay.portlet.imagegallery.model.IGImage updateImage(
295         long userId, long imageId, long folderId, java.lang.String name,
296         java.lang.String description, java.io.InputStream is,
297         java.lang.String contentType,
298         com.liferay.portal.service.ServiceContext serviceContext)
299         throws com.liferay.portal.PortalException,
300             com.liferay.portal.SystemException;
301 
302     public void updateTagsAsset(long userId,
303         com.liferay.portlet.imagegallery.model.IGImage image,
304         java.lang.String[] tagsCategories, java.lang.String[] tagsEntries)
305         throws com.liferay.portal.PortalException,
306             com.liferay.portal.SystemException;
307 }