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