1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.imagegallery.service;
24  
25  import com.liferay.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.Propagation;
28  import com.liferay.portal.kernel.annotation.Transactional;
29  
30  /**
31   * <a href="IGImageLocalService.java.html"><b><i>View Source</i></b></a>
32   *
33   * <p>
34   * ServiceBuilder generated this class. Modifications in this class will be
35   * overwritten the next time is generated.
36   * </p>
37   *
38   * <p>
39   * This interface defines the service. The default implementation is
40   * <code>com.liferay.portlet.imagegallery.service.impl.IGImageLocalServiceImpl</code>.
41   * Modify methods in that class and rerun ServiceBuilder to populate this class
42   * and all other generated classes.
43   * </p>
44   *
45   * <p>
46   * 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.
47   * </p>
48   *
49   * @author Brian Wing Shun Chan
50   *
51   * @see com.liferay.portlet.imagegallery.service.IGImageLocalServiceUtil
52   *
53   */
54  @Transactional(rollbackFor =  {
55      PortalException.class, SystemException.class})
56  public interface IGImageLocalService {
57      public com.liferay.portlet.imagegallery.model.IGImage addIGImage(
58          com.liferay.portlet.imagegallery.model.IGImage igImage)
59          throws com.liferay.portal.SystemException;
60  
61      public com.liferay.portlet.imagegallery.model.IGImage createIGImage(
62          long imageId);
63  
64      public void deleteIGImage(long imageId)
65          throws com.liferay.portal.SystemException,
66              com.liferay.portal.PortalException;
67  
68      public void deleteIGImage(
69          com.liferay.portlet.imagegallery.model.IGImage igImage)
70          throws com.liferay.portal.SystemException;
71  
72      public java.util.List<Object> dynamicQuery(
73          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
74          throws com.liferay.portal.SystemException;
75  
76      public java.util.List<Object> dynamicQuery(
77          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
78          int end) throws com.liferay.portal.SystemException;
79  
80      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
81      public com.liferay.portlet.imagegallery.model.IGImage getIGImage(
82          long imageId)
83          throws com.liferay.portal.SystemException,
84              com.liferay.portal.PortalException;
85  
86      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
87      public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getIGImages(
88          int start, int end) throws com.liferay.portal.SystemException;
89  
90      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
91      public int getIGImagesCount() throws com.liferay.portal.SystemException;
92  
93      public com.liferay.portlet.imagegallery.model.IGImage updateIGImage(
94          com.liferay.portlet.imagegallery.model.IGImage igImage)
95          throws com.liferay.portal.SystemException;
96  
97      public com.liferay.portlet.imagegallery.model.IGImage addImage(
98          long userId, long folderId, java.lang.String name,
99          java.lang.String description, java.io.File file,
100         java.lang.String contentType, java.lang.String[] tagsEntries,
101         boolean addCommunityPermissions, boolean addGuestPermissions)
102         throws com.liferay.portal.PortalException,
103             com.liferay.portal.SystemException;
104 
105     public com.liferay.portlet.imagegallery.model.IGImage addImage(
106         java.lang.String uuid, long userId, long folderId,
107         java.lang.String name, java.lang.String description, java.io.File file,
108         java.lang.String contentType, java.lang.String[] tagsEntries,
109         boolean addCommunityPermissions, boolean addGuestPermissions)
110         throws com.liferay.portal.PortalException,
111             com.liferay.portal.SystemException;
112 
113     public com.liferay.portlet.imagegallery.model.IGImage addImage(
114         long userId, long folderId, java.lang.String name,
115         java.lang.String description, java.io.File file,
116         java.lang.String contentType, java.lang.String[] tagsEntries,
117         java.lang.String[] communityPermissions,
118         java.lang.String[] guestPermissions)
119         throws com.liferay.portal.PortalException,
120             com.liferay.portal.SystemException;
121 
122     public com.liferay.portlet.imagegallery.model.IGImage addImage(
123         java.lang.String uuid, long userId, long folderId,
124         java.lang.String name, java.lang.String description, java.io.File file,
125         java.lang.String contentType, java.lang.String[] tagsEntries,
126         java.lang.Boolean addCommunityPermissions,
127         java.lang.Boolean addGuestPermissions,
128         java.lang.String[] communityPermissions,
129         java.lang.String[] guestPermissions)
130         throws com.liferay.portal.PortalException,
131             com.liferay.portal.SystemException;
132 
133     public void addImageResources(long folderId, long imageId,
134         boolean addCommunityPermissions, boolean addGuestPermissions)
135         throws com.liferay.portal.PortalException,
136             com.liferay.portal.SystemException;
137 
138     public void addImageResources(
139         com.liferay.portlet.imagegallery.model.IGFolder folder,
140         com.liferay.portlet.imagegallery.model.IGImage image,
141         boolean addCommunityPermissions, boolean addGuestPermissions)
142         throws com.liferay.portal.PortalException,
143             com.liferay.portal.SystemException;
144 
145     public void addImageResources(long folderId, long imageId,
146         java.lang.String[] communityPermissions,
147         java.lang.String[] guestPermissions)
148         throws com.liferay.portal.PortalException,
149             com.liferay.portal.SystemException;
150 
151     public void addImageResources(
152         com.liferay.portlet.imagegallery.model.IGFolder folder,
153         com.liferay.portlet.imagegallery.model.IGImage image,
154         java.lang.String[] communityPermissions,
155         java.lang.String[] guestPermissions)
156         throws com.liferay.portal.PortalException,
157             com.liferay.portal.SystemException;
158 
159     public void deleteImage(long imageId)
160         throws com.liferay.portal.PortalException,
161             com.liferay.portal.SystemException;
162 
163     public void deleteImage(
164         com.liferay.portlet.imagegallery.model.IGImage image)
165         throws com.liferay.portal.PortalException,
166             com.liferay.portal.SystemException;
167 
168     public void deleteImages(long folderId)
169         throws com.liferay.portal.PortalException,
170             com.liferay.portal.SystemException;
171 
172     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
173     public int getFoldersImagesCount(java.util.List<Long> folderIds)
174         throws com.liferay.portal.SystemException;
175 
176     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
177     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
178         long groupId, int start, int end)
179         throws com.liferay.portal.SystemException;
180 
181     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
182     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getGroupImages(
183         long groupId, long userId, int start, int end)
184         throws com.liferay.portal.SystemException;
185 
186     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
187     public int getGroupImagesCount(long groupId)
188         throws com.liferay.portal.SystemException;
189 
190     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
191     public int getGroupImagesCount(long groupId, long userId)
192         throws com.liferay.portal.SystemException;
193 
194     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
195     public com.liferay.portlet.imagegallery.model.IGImage getImage(long imageId)
196         throws com.liferay.portal.PortalException,
197             com.liferay.portal.SystemException;
198 
199     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200     public com.liferay.portlet.imagegallery.model.IGImage getImageByCustom1ImageId(
201         long custom1ImageId)
202         throws com.liferay.portal.PortalException,
203             com.liferay.portal.SystemException;
204 
205     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
206     public com.liferay.portlet.imagegallery.model.IGImage getImageByCustom2ImageId(
207         long custom2ImageId)
208         throws com.liferay.portal.PortalException,
209             com.liferay.portal.SystemException;
210 
211     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
212     public com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(
213         long folderId, java.lang.String nameWithExtension)
214         throws com.liferay.portal.PortalException,
215             com.liferay.portal.SystemException;
216 
217     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
218     public com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(
219         long largeImageId)
220         throws com.liferay.portal.PortalException,
221             com.liferay.portal.SystemException;
222 
223     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224     public com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(
225         long smallImageId)
226         throws com.liferay.portal.PortalException,
227             com.liferay.portal.SystemException;
228 
229     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230     public com.liferay.portlet.imagegallery.model.IGImage getImageByUuidAndGroupId(
231         java.lang.String uuid, long groupId)
232         throws com.liferay.portal.PortalException,
233             com.liferay.portal.SystemException;
234 
235     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
236     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
237         long folderId) throws com.liferay.portal.SystemException;
238 
239     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
240     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
241         long folderId, int start, int end)
242         throws com.liferay.portal.SystemException;
243 
244     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
245     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
246         long folderId, int start, int end,
247         com.liferay.portal.kernel.util.OrderByComparator obc)
248         throws com.liferay.portal.SystemException;
249 
250     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
251     public int getImagesCount(long folderId)
252         throws com.liferay.portal.SystemException;
253 
254     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
255     public java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getNoAssetImages()
256         throws com.liferay.portal.SystemException;
257 
258     public com.liferay.portlet.imagegallery.model.IGImage updateImage(
259         long userId, long imageId, long folderId, java.lang.String name,
260         java.lang.String description, java.io.File file,
261         java.lang.String contentType, java.lang.String[] tagsEntries)
262         throws com.liferay.portal.PortalException,
263             com.liferay.portal.SystemException;
264 
265     public void updateTagsAsset(long userId,
266         com.liferay.portlet.imagegallery.model.IGImage image,
267         java.lang.String[] tagsEntries)
268         throws com.liferay.portal.PortalException,
269             com.liferay.portal.SystemException;
270 }