1   /**
2    * Copyright (c) 2000-2009 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.portal.service;
24  
25  import com.liferay.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.Isolation;
28  import com.liferay.portal.kernel.annotation.Propagation;
29  import com.liferay.portal.kernel.annotation.Transactional;
30  
31  /**
32   * <a href="LayoutLocalService.java.html"><b><i>View Source</i></b></a>
33   *
34   * <p>
35   * ServiceBuilder generated this class. Modifications in this class will be
36   * overwritten the next time is generated.
37   * </p>
38   *
39   * <p>
40   * This interface defines the service. The default implementation is
41   * <code>com.liferay.portal.service.impl.LayoutLocalServiceImpl</code>.
42   * Modify methods in that class and rerun ServiceBuilder to populate this class
43   * and all other generated classes.
44   * </p>
45   *
46   * <p>
47   * 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.
48   * </p>
49   *
50   * @author Brian Wing Shun Chan
51   *
52   * @see com.liferay.portal.service.LayoutLocalServiceUtil
53   *
54   */
55  @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
56      PortalException.class, SystemException.class})
57  public interface LayoutLocalService {
58      public com.liferay.portal.model.Layout addLayout(
59          com.liferay.portal.model.Layout layout)
60          throws com.liferay.portal.SystemException;
61  
62      public com.liferay.portal.model.Layout createLayout(long plid);
63  
64      public void deleteLayout(long plid)
65          throws com.liferay.portal.SystemException,
66              com.liferay.portal.PortalException;
67  
68      public void deleteLayout(com.liferay.portal.model.Layout layout)
69          throws com.liferay.portal.SystemException;
70  
71      public java.util.List<Object> dynamicQuery(
72          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
73          throws com.liferay.portal.SystemException;
74  
75      public java.util.List<Object> dynamicQuery(
76          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
77          int end) throws com.liferay.portal.SystemException;
78  
79      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
80      public com.liferay.portal.model.Layout getLayout(long plid)
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.portal.model.Layout> getLayouts(
86          int start, int end) throws com.liferay.portal.SystemException;
87  
88      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
89      public int getLayoutsCount() throws com.liferay.portal.SystemException;
90  
91      public com.liferay.portal.model.Layout updateLayout(
92          com.liferay.portal.model.Layout layout)
93          throws com.liferay.portal.SystemException;
94  
95      public com.liferay.portal.model.Layout updateLayout(
96          com.liferay.portal.model.Layout layout, boolean merge)
97          throws com.liferay.portal.SystemException;
98  
99      public com.liferay.portal.model.Layout addLayout(long userId, long groupId,
100         boolean privateLayout, long parentLayoutId, java.lang.String name,
101         java.lang.String title, java.lang.String description,
102         java.lang.String type, boolean hidden, java.lang.String friendlyURL)
103         throws com.liferay.portal.PortalException,
104             com.liferay.portal.SystemException;
105 
106     public com.liferay.portal.model.Layout addLayout(long userId, long groupId,
107         boolean privateLayout, long parentLayoutId,
108         java.util.Map<java.util.Locale, String> localeNamesMap,
109         java.util.Map<java.util.Locale, String> localeTitlesMap,
110         java.lang.String description, java.lang.String type, boolean hidden,
111         java.lang.String friendlyURL)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException;
114 
115     public com.liferay.portal.model.Layout addLayout(long userId, long groupId,
116         boolean privateLayout, long parentLayoutId, java.lang.String name,
117         java.lang.String title, java.lang.String description,
118         java.lang.String type, boolean hidden, java.lang.String friendlyURL,
119         long dlFolderId)
120         throws com.liferay.portal.PortalException,
121             com.liferay.portal.SystemException;
122 
123     public com.liferay.portal.model.Layout addLayout(long userId, long groupId,
124         boolean privateLayout, long parentLayoutId,
125         java.util.Map<java.util.Locale, String> localeNamesMap,
126         java.util.Map<java.util.Locale, String> localeTitlesMap,
127         java.lang.String description, java.lang.String type, boolean hidden,
128         java.lang.String friendlyURL, long dlFolderId)
129         throws com.liferay.portal.PortalException,
130             com.liferay.portal.SystemException;
131 
132     public void deleteLayout(long groupId, boolean privateLayout, long layoutId)
133         throws com.liferay.portal.PortalException,
134             com.liferay.portal.SystemException;
135 
136     public void deleteLayout(com.liferay.portal.model.Layout layout,
137         boolean updateLayoutSet)
138         throws com.liferay.portal.PortalException,
139             com.liferay.portal.SystemException;
140 
141     public void deleteLayouts(long groupId, boolean privateLayout)
142         throws com.liferay.portal.PortalException,
143             com.liferay.portal.SystemException;
144 
145     public byte[] exportLayouts(long groupId, boolean privateLayout,
146         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
147         java.util.Date endDate)
148         throws com.liferay.portal.PortalException,
149             com.liferay.portal.SystemException;
150 
151     public byte[] exportLayouts(long groupId, boolean privateLayout,
152         long[] layoutIds, java.util.Map<String, String[]> parameterMap,
153         java.util.Date startDate, java.util.Date endDate)
154         throws com.liferay.portal.PortalException,
155             com.liferay.portal.SystemException;
156 
157     public com.liferay.portal.kernel.io.FileCacheOutputStream exportLayoutsAsStream(
158         long groupId, boolean privateLayout, long[] layoutIds,
159         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
160         java.util.Date endDate)
161         throws com.liferay.portal.PortalException,
162             com.liferay.portal.SystemException;
163 
164     public byte[] exportPortletInfo(long plid, java.lang.String portletId,
165         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
166         java.util.Date endDate)
167         throws com.liferay.portal.PortalException,
168             com.liferay.portal.SystemException;
169 
170     public com.liferay.portal.kernel.io.FileCacheOutputStream exportPortletInfoAsStream(
171         long plid, java.lang.String portletId,
172         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
173         java.util.Date endDate)
174         throws com.liferay.portal.PortalException,
175             com.liferay.portal.SystemException;
176 
177     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
178     public long getDefaultPlid(long groupId)
179         throws com.liferay.portal.SystemException;
180 
181     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
182     public long getDefaultPlid(long groupId, boolean privateLayout)
183         throws com.liferay.portal.SystemException;
184 
185     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186     public long getDefaultPlid(long groupId, boolean privateLayout,
187         java.lang.String portletId) throws com.liferay.portal.SystemException;
188 
189     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
190     public com.liferay.portal.model.Layout getDLFolderLayout(long dlFolderId)
191         throws com.liferay.portal.PortalException,
192             com.liferay.portal.SystemException;
193 
194     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
195     public com.liferay.portal.model.Layout getFriendlyURLLayout(long groupId,
196         boolean privateLayout, java.lang.String friendlyURL)
197         throws com.liferay.portal.PortalException,
198             com.liferay.portal.SystemException;
199 
200     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
201     public com.liferay.portal.model.Layout getLayout(long groupId,
202         boolean privateLayout, long layoutId)
203         throws com.liferay.portal.PortalException,
204             com.liferay.portal.SystemException;
205 
206     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207     public com.liferay.portal.model.Layout getLayoutByIconImageId(
208         long iconImageId)
209         throws com.liferay.portal.PortalException,
210             com.liferay.portal.SystemException;
211 
212     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213     public java.util.List<com.liferay.portal.model.Layout> getLayouts(
214         long groupId, boolean privateLayout)
215         throws com.liferay.portal.SystemException;
216 
217     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
218     public java.util.List<com.liferay.portal.model.Layout> getLayouts(
219         long groupId, boolean privateLayout, long parentLayoutId)
220         throws com.liferay.portal.SystemException;
221 
222     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
223     public java.util.List<com.liferay.portal.model.Layout> getLayouts(
224         long groupId, boolean privateLayout, java.lang.String type)
225         throws com.liferay.portal.SystemException;
226 
227     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
228     public java.util.List<com.liferay.portal.model.Layout> getLayouts(
229         long groupId, boolean privateLayout, long parentLayoutId, int start,
230         int end) throws com.liferay.portal.SystemException;
231 
232     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
233     public java.util.List<com.liferay.portal.model.Layout> getLayouts(
234         long groupId, boolean privateLayout, long[] layoutIds)
235         throws com.liferay.portal.PortalException,
236             com.liferay.portal.SystemException;
237 
238     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239     public com.liferay.portal.model.LayoutReference[] getLayouts(
240         long companyId, java.lang.String portletId, java.lang.String prefsKey,
241         java.lang.String prefsValue) throws com.liferay.portal.SystemException;
242 
243     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
244     public long getNextLayoutId(long groupId, boolean privateLayout)
245         throws com.liferay.portal.SystemException;
246 
247     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248     public java.util.List<com.liferay.portal.model.Layout> getNullFriendlyURLLayouts()
249         throws com.liferay.portal.SystemException;
250 
251     public void importLayouts(long userId, long groupId, boolean privateLayout,
252         java.util.Map<String, String[]> parameterMap, java.io.File file)
253         throws com.liferay.portal.PortalException,
254             com.liferay.portal.SystemException;
255 
256     public void importLayouts(long userId, long groupId, boolean privateLayout,
257         java.util.Map<String, String[]> parameterMap, byte[] bytes)
258         throws com.liferay.portal.PortalException,
259             com.liferay.portal.SystemException;
260 
261     public void importLayouts(long userId, long groupId, boolean privateLayout,
262         java.util.Map<String, String[]> parameterMap, java.io.InputStream is)
263         throws com.liferay.portal.PortalException,
264             com.liferay.portal.SystemException;
265 
266     public void importPortletInfo(long userId, long plid,
267         java.lang.String portletId,
268         java.util.Map<String, String[]> parameterMap, java.io.File file)
269         throws com.liferay.portal.PortalException,
270             com.liferay.portal.SystemException;
271 
272     public void importPortletInfo(long userId, long plid,
273         java.lang.String portletId,
274         java.util.Map<String, String[]> parameterMap, java.io.InputStream is)
275         throws com.liferay.portal.PortalException,
276             com.liferay.portal.SystemException;
277 
278     public void setLayouts(long groupId, boolean privateLayout,
279         long parentLayoutId, long[] layoutIds)
280         throws com.liferay.portal.PortalException,
281             com.liferay.portal.SystemException;
282 
283     public com.liferay.portal.model.Layout updateFriendlyURL(long plid,
284         java.lang.String friendlyURL)
285         throws com.liferay.portal.PortalException,
286             com.liferay.portal.SystemException;
287 
288     public com.liferay.portal.model.Layout updateLayout(long groupId,
289         boolean privateLayout, long layoutId, long parentLayoutId,
290         java.util.Map<java.util.Locale, String> localeNamesMap,
291         java.util.Map<java.util.Locale, String> localeTitlesMap,
292         java.lang.String description, java.lang.String type, boolean hidden,
293         java.lang.String friendlyURL)
294         throws com.liferay.portal.PortalException,
295             com.liferay.portal.SystemException;
296 
297     public com.liferay.portal.model.Layout updateLayout(long groupId,
298         boolean privateLayout, long layoutId, long parentLayoutId,
299         java.util.Map<java.util.Locale, String> localeNamesMap,
300         java.util.Map<java.util.Locale, String> localeTitlesMap,
301         java.lang.String description, java.lang.String type, boolean hidden,
302         java.lang.String friendlyURL, java.lang.Boolean iconImage,
303         byte[] iconBytes)
304         throws com.liferay.portal.PortalException,
305             com.liferay.portal.SystemException;
306 
307     public com.liferay.portal.model.Layout updateLayout(long groupId,
308         boolean privateLayout, long layoutId, java.lang.String typeSettings)
309         throws com.liferay.portal.PortalException,
310             com.liferay.portal.SystemException;
311 
312     public com.liferay.portal.model.Layout updateLookAndFeel(long groupId,
313         boolean privateLayout, long layoutId, java.lang.String themeId,
314         java.lang.String colorSchemeId, java.lang.String css, boolean wapTheme)
315         throws com.liferay.portal.PortalException,
316             com.liferay.portal.SystemException;
317 
318     public com.liferay.portal.model.Layout updateName(long plid,
319         java.lang.String name, java.lang.String languageId)
320         throws com.liferay.portal.PortalException,
321             com.liferay.portal.SystemException;
322 
323     public com.liferay.portal.model.Layout updateName(long groupId,
324         boolean privateLayout, long layoutId, java.lang.String name,
325         java.lang.String languageId)
326         throws com.liferay.portal.PortalException,
327             com.liferay.portal.SystemException;
328 
329     public com.liferay.portal.model.Layout updateName(
330         com.liferay.portal.model.Layout layout, java.lang.String name,
331         java.lang.String languageId)
332         throws com.liferay.portal.PortalException,
333             com.liferay.portal.SystemException;
334 
335     public com.liferay.portal.model.Layout updateParentLayoutId(long plid,
336         long parentPlid)
337         throws com.liferay.portal.PortalException,
338             com.liferay.portal.SystemException;
339 
340     public com.liferay.portal.model.Layout updateParentLayoutId(long groupId,
341         boolean privateLayout, long layoutId, long parentLayoutId)
342         throws com.liferay.portal.PortalException,
343             com.liferay.portal.SystemException;
344 
345     public com.liferay.portal.model.Layout updatePriority(long plid,
346         int priority)
347         throws com.liferay.portal.PortalException,
348             com.liferay.portal.SystemException;
349 
350     public com.liferay.portal.model.Layout updatePriority(long groupId,
351         boolean privateLayout, long layoutId, int priority)
352         throws com.liferay.portal.PortalException,
353             com.liferay.portal.SystemException;
354 
355     public com.liferay.portal.model.Layout updatePriority(
356         com.liferay.portal.model.Layout layout, int priority)
357         throws com.liferay.portal.SystemException;
358 }