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