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