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