1
22
23 package com.liferay.portal.service.http;
24
25 import com.liferay.portal.service.LayoutServiceUtil;
26
27 import org.json.JSONObject;
28
29
70 public class LayoutServiceJSON {
71 public static JSONObject addLayout(long groupId, boolean privateLayout,
72 long parentLayoutId, java.lang.String name, java.lang.String title,
73 java.lang.String description, java.lang.String type, boolean hidden,
74 java.lang.String friendlyURL)
75 throws com.liferay.portal.SystemException,
76 com.liferay.portal.PortalException, java.rmi.RemoteException {
77 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.addLayout(groupId,
78 privateLayout, parentLayoutId, name, title, description, type,
79 hidden, friendlyURL);
80
81 return LayoutJSONSerializer.toJSONObject(returnValue);
82 }
83
84 public static void deleteLayout(long plid)
85 throws com.liferay.portal.SystemException,
86 com.liferay.portal.PortalException, java.rmi.RemoteException {
87 LayoutServiceUtil.deleteLayout(plid);
88 }
89
90 public static void deleteLayout(long groupId, boolean privateLayout,
91 long layoutId)
92 throws com.liferay.portal.SystemException,
93 com.liferay.portal.PortalException, java.rmi.RemoteException {
94 LayoutServiceUtil.deleteLayout(groupId, privateLayout, layoutId);
95 }
96
97 public static java.lang.String getLayoutName(long groupId,
98 boolean privateLayout, long layoutId, java.lang.String languageId)
99 throws com.liferay.portal.SystemException,
100 com.liferay.portal.PortalException, java.rmi.RemoteException {
101 java.lang.String returnValue = LayoutServiceUtil.getLayoutName(groupId,
102 privateLayout, layoutId, languageId);
103
104 return returnValue;
105 }
106
107 public static com.liferay.portal.model.LayoutReference[] getLayoutReferences(
108 long companyId, java.lang.String portletId, java.lang.String prefsKey,
109 java.lang.String prefsValue)
110 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
111 com.liferay.portal.model.LayoutReference[] returnValue = LayoutServiceUtil.getLayoutReferences(companyId,
112 portletId, prefsKey, prefsValue);
113
114 return returnValue;
115 }
116
117 public static void setLayouts(long groupId, boolean privateLayout,
118 long parentLayoutId, long[] layoutIds)
119 throws com.liferay.portal.SystemException,
120 com.liferay.portal.PortalException, java.rmi.RemoteException {
121 LayoutServiceUtil.setLayouts(groupId, privateLayout, parentLayoutId,
122 layoutIds);
123 }
124
125 public static JSONObject updateLayout(long groupId, boolean privateLayout,
126 long layoutId, long parentLayoutId, java.lang.String name,
127 java.lang.String title, java.lang.String languageId,
128 java.lang.String description, java.lang.String type, boolean hidden,
129 java.lang.String friendlyURL)
130 throws com.liferay.portal.SystemException,
131 com.liferay.portal.PortalException, java.rmi.RemoteException {
132 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId,
133 privateLayout, layoutId, parentLayoutId, name, title,
134 languageId, description, type, hidden, friendlyURL);
135
136 return LayoutJSONSerializer.toJSONObject(returnValue);
137 }
138
139 public static JSONObject updateLayout(long groupId, boolean privateLayout,
140 long layoutId, long parentLayoutId, java.lang.String name,
141 java.lang.String title, java.lang.String languageId,
142 java.lang.String description, java.lang.String type, boolean hidden,
143 java.lang.String friendlyURL, java.lang.Boolean iconImage,
144 byte[] iconBytes)
145 throws com.liferay.portal.SystemException,
146 com.liferay.portal.PortalException, java.rmi.RemoteException {
147 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId,
148 privateLayout, layoutId, parentLayoutId, name, title,
149 languageId, description, type, hidden, friendlyURL, iconImage,
150 iconBytes);
151
152 return LayoutJSONSerializer.toJSONObject(returnValue);
153 }
154
155 public static JSONObject updateLayout(long groupId, boolean privateLayout,
156 long layoutId, java.lang.String typeSettings)
157 throws com.liferay.portal.SystemException,
158 com.liferay.portal.PortalException, java.rmi.RemoteException {
159 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLayout(groupId,
160 privateLayout, layoutId, typeSettings);
161
162 return LayoutJSONSerializer.toJSONObject(returnValue);
163 }
164
165 public static JSONObject updateLookAndFeel(long groupId,
166 boolean privateLayout, long layoutId, java.lang.String themeId,
167 java.lang.String colorSchemeId, java.lang.String css, boolean wapTheme)
168 throws com.liferay.portal.SystemException,
169 com.liferay.portal.PortalException, java.rmi.RemoteException {
170 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateLookAndFeel(groupId,
171 privateLayout, layoutId, themeId, colorSchemeId, css, wapTheme);
172
173 return LayoutJSONSerializer.toJSONObject(returnValue);
174 }
175
176 public static JSONObject updateName(long plid, java.lang.String name,
177 java.lang.String languageId)
178 throws com.liferay.portal.SystemException,
179 com.liferay.portal.PortalException, java.rmi.RemoteException {
180 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(plid,
181 name, languageId);
182
183 return LayoutJSONSerializer.toJSONObject(returnValue);
184 }
185
186 public static JSONObject updateName(long groupId, boolean privateLayout,
187 long layoutId, java.lang.String name, java.lang.String languageId)
188 throws com.liferay.portal.SystemException,
189 com.liferay.portal.PortalException, java.rmi.RemoteException {
190 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateName(groupId,
191 privateLayout, layoutId, name, languageId);
192
193 return LayoutJSONSerializer.toJSONObject(returnValue);
194 }
195
196 public static JSONObject updateParentLayoutId(long plid, long parentPlid)
197 throws com.liferay.portal.SystemException,
198 com.liferay.portal.PortalException, java.rmi.RemoteException {
199 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(plid,
200 parentPlid);
201
202 return LayoutJSONSerializer.toJSONObject(returnValue);
203 }
204
205 public static JSONObject updateParentLayoutId(long groupId,
206 boolean privateLayout, long layoutId, long parentLayoutId)
207 throws com.liferay.portal.SystemException,
208 com.liferay.portal.PortalException, java.rmi.RemoteException {
209 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updateParentLayoutId(groupId,
210 privateLayout, layoutId, parentLayoutId);
211
212 return LayoutJSONSerializer.toJSONObject(returnValue);
213 }
214
215 public static JSONObject updatePriority(long plid, int priority)
216 throws com.liferay.portal.SystemException,
217 com.liferay.portal.PortalException, java.rmi.RemoteException {
218 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(plid,
219 priority);
220
221 return LayoutJSONSerializer.toJSONObject(returnValue);
222 }
223
224 public static JSONObject updatePriority(long groupId,
225 boolean privateLayout, long layoutId, int priority)
226 throws com.liferay.portal.SystemException,
227 com.liferay.portal.PortalException, java.rmi.RemoteException {
228 com.liferay.portal.model.Layout returnValue = LayoutServiceUtil.updatePriority(groupId,
229 privateLayout, layoutId, priority);
230
231 return LayoutJSONSerializer.toJSONObject(returnValue);
232 }
233 }