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, long groupId,
165         java.lang.String portletId,
166         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
167         java.util.Date endDate)
168         throws com.liferay.portal.PortalException,
169             com.liferay.portal.SystemException;
170 
171     public com.liferay.portal.kernel.io.FileCacheOutputStream exportPortletInfoAsStream(
172         long plid, long groupId, java.lang.String portletId,
173         java.util.Map<String, String[]> parameterMap, java.util.Date startDate,
174         java.util.Date endDate)
175         throws com.liferay.portal.PortalException,
176             com.liferay.portal.SystemException;
177 
178     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
179     public long getDefaultPlid(long groupId)
180         throws com.liferay.portal.SystemException;
181 
182     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
183     public long getDefaultPlid(long groupId, boolean privateLayout)
184         throws com.liferay.portal.SystemException;
185 
186     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
187     public long getDefaultPlid(long groupId, boolean privateLayout,
188         java.lang.String portletId) throws com.liferay.portal.SystemException;
189 
190     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
191     public com.liferay.portal.model.Layout getDLFolderLayout(long dlFolderId)
192         throws com.liferay.portal.PortalException,
193             com.liferay.portal.SystemException;
194 
195     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196     public com.liferay.portal.model.Layout getFriendlyURLLayout(long groupId,
197         boolean privateLayout, java.lang.String friendlyURL)
198         throws com.liferay.portal.PortalException,
199             com.liferay.portal.SystemException;
200 
201     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
202     public com.liferay.portal.model.Layout getLayout(long groupId,
203         boolean privateLayout, long layoutId)
204         throws com.liferay.portal.PortalException,
205             com.liferay.portal.SystemException;
206 
207     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208     public com.liferay.portal.model.Layout getLayoutByIconImageId(
209         long iconImageId)
210         throws com.liferay.portal.PortalException,
211             com.liferay.portal.SystemException;
212 
213     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214     public java.util.List<com.liferay.portal.model.Layout> getLayouts(
215         long groupId, boolean privateLayout)
216         throws com.liferay.portal.SystemException;
217 
218     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
219     public java.util.List<com.liferay.portal.model.Layout> getLayouts(
220         long groupId, boolean privateLayout, long parentLayoutId)
221         throws com.liferay.portal.SystemException;
222 
223     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224     public java.util.List<com.liferay.portal.model.Layout> getLayouts(
225         long groupId, boolean privateLayout, java.lang.String type)
226         throws com.liferay.portal.SystemException;
227 
228     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
229     public java.util.List<com.liferay.portal.model.Layout> getLayouts(
230         long groupId, boolean privateLayout, long parentLayoutId, int start,
231         int end) throws com.liferay.portal.SystemException;
232 
233     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234     public java.util.List<com.liferay.portal.model.Layout> getLayouts(
235         long groupId, boolean privateLayout, long[] layoutIds)
236         throws com.liferay.portal.PortalException,
237             com.liferay.portal.SystemException;
238 
239     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
240     public com.liferay.portal.model.LayoutReference[] getLayouts(
241         long companyId, java.lang.String portletId,
242         java.lang.String preferencesKey, java.lang.String preferencesValue)
243         throws com.liferay.portal.SystemException;
244 
245     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
246     public long getNextLayoutId(long groupId, boolean privateLayout)
247         throws com.liferay.portal.SystemException;
248 
249     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250     public java.util.List<com.liferay.portal.model.Layout> getNullFriendlyURLLayouts()
251         throws com.liferay.portal.SystemException;
252 
253     public void importLayouts(long userId, long groupId, boolean privateLayout,
254         java.util.Map<String, String[]> parameterMap, java.io.File file)
255         throws com.liferay.portal.PortalException,
256             com.liferay.portal.SystemException;
257 
258     public void importLayouts(long userId, long groupId, boolean privateLayout,
259         java.util.Map<String, String[]> parameterMap, byte[] bytes)
260         throws com.liferay.portal.PortalException,
261             com.liferay.portal.SystemException;
262 
263     public void importLayouts(long userId, long groupId, boolean privateLayout,
264         java.util.Map<String, String[]> parameterMap, java.io.InputStream is)
265         throws com.liferay.portal.PortalException,
266             com.liferay.portal.SystemException;
267 
268     public void importPortletInfo(long userId, long plid, long groupId,
269         java.lang.String portletId,
270         java.util.Map<String, String[]> parameterMap, java.io.File file)
271         throws com.liferay.portal.PortalException,
272             com.liferay.portal.SystemException;
273 
274     public void importPortletInfo(long userId, long plid, long groupId,
275         java.lang.String portletId,
276         java.util.Map<String, String[]> parameterMap, java.io.InputStream is)
277         throws com.liferay.portal.PortalException,
278             com.liferay.portal.SystemException;
279 
280     public void setLayouts(long groupId, boolean privateLayout,
281         long parentLayoutId, long[] layoutIds)
282         throws com.liferay.portal.PortalException,
283             com.liferay.portal.SystemException;
284 
285     public com.liferay.portal.model.Layout updateFriendlyURL(long plid,
286         java.lang.String friendlyURL)
287         throws com.liferay.portal.PortalException,
288             com.liferay.portal.SystemException;
289 
290     public com.liferay.portal.model.Layout updateLayout(long groupId,
291         boolean privateLayout, long layoutId, long parentLayoutId,
292         java.util.Map<java.util.Locale, String> localeNamesMap,
293         java.util.Map<java.util.Locale, String> localeTitlesMap,
294         java.lang.String description, java.lang.String type, boolean hidden,
295         java.lang.String friendlyURL)
296         throws com.liferay.portal.PortalException,
297             com.liferay.portal.SystemException;
298 
299     public com.liferay.portal.model.Layout updateLayout(long groupId,
300         boolean privateLayout, long layoutId, long parentLayoutId,
301         java.util.Map<java.util.Locale, String> localeNamesMap,
302         java.util.Map<java.util.Locale, String> localeTitlesMap,
303         java.lang.String description, java.lang.String type, boolean hidden,
304         java.lang.String friendlyURL, java.lang.Boolean iconImage,
305         byte[] iconBytes)
306         throws com.liferay.portal.PortalException,
307             com.liferay.portal.SystemException;
308 
309     public com.liferay.portal.model.Layout updateLayout(long groupId,
310         boolean privateLayout, long layoutId, java.lang.String typeSettings)
311         throws com.liferay.portal.PortalException,
312             com.liferay.portal.SystemException;
313 
314     public com.liferay.portal.model.Layout updateLookAndFeel(long groupId,
315         boolean privateLayout, long layoutId, java.lang.String themeId,
316         java.lang.String colorSchemeId, java.lang.String css, boolean wapTheme)
317         throws com.liferay.portal.PortalException,
318             com.liferay.portal.SystemException;
319 
320     public com.liferay.portal.model.Layout updateName(long plid,
321         java.lang.String name, java.lang.String languageId)
322         throws com.liferay.portal.PortalException,
323             com.liferay.portal.SystemException;
324 
325     public com.liferay.portal.model.Layout updateName(long groupId,
326         boolean privateLayout, long layoutId, java.lang.String name,
327         java.lang.String languageId)
328         throws com.liferay.portal.PortalException,
329             com.liferay.portal.SystemException;
330 
331     public com.liferay.portal.model.Layout updateName(
332         com.liferay.portal.model.Layout layout, java.lang.String name,
333         java.lang.String languageId)
334         throws com.liferay.portal.PortalException,
335             com.liferay.portal.SystemException;
336 
337     public com.liferay.portal.model.Layout updateParentLayoutId(long plid,
338         long parentPlid)
339         throws com.liferay.portal.PortalException,
340             com.liferay.portal.SystemException;
341 
342     public com.liferay.portal.model.Layout updateParentLayoutId(long groupId,
343         boolean privateLayout, long layoutId, long parentLayoutId)
344         throws com.liferay.portal.PortalException,
345             com.liferay.portal.SystemException;
346 
347     public com.liferay.portal.model.Layout updatePriority(long plid,
348         int priority)
349         throws com.liferay.portal.PortalException,
350             com.liferay.portal.SystemException;
351 
352     public com.liferay.portal.model.Layout updatePriority(long groupId,
353         boolean privateLayout, long layoutId, int priority)
354         throws com.liferay.portal.PortalException,
355             com.liferay.portal.SystemException;
356 
357     public com.liferay.portal.model.Layout updatePriority(
358         com.liferay.portal.model.Layout layout, int priority)
359         throws com.liferay.portal.SystemException;
360 }