1
22
23 package com.liferay.portlet.tags.service.http;
24
25 import com.liferay.portal.kernel.log.Log;
26 import com.liferay.portal.kernel.log.LogFactoryUtil;
27 import com.liferay.portal.kernel.util.LongWrapper;
28 import com.liferay.portal.kernel.util.MethodWrapper;
29 import com.liferay.portal.kernel.util.NullWrapper;
30 import com.liferay.portal.security.auth.HttpPrincipal;
31 import com.liferay.portal.service.http.TunnelUtil;
32
33 import com.liferay.portlet.tags.service.TagsPropertyServiceUtil;
34
35
74 public class TagsPropertyServiceHttp {
75 public static com.liferay.portlet.tags.model.TagsProperty addProperty(
76 HttpPrincipal httpPrincipal, long entryId, java.lang.String key,
77 java.lang.String value)
78 throws com.liferay.portal.PortalException,
79 com.liferay.portal.SystemException {
80 try {
81 Object paramObj0 = new LongWrapper(entryId);
82
83 Object paramObj1 = key;
84
85 if (key == null) {
86 paramObj1 = new NullWrapper("java.lang.String");
87 }
88
89 Object paramObj2 = value;
90
91 if (value == null) {
92 paramObj2 = new NullWrapper("java.lang.String");
93 }
94
95 MethodWrapper methodWrapper = new MethodWrapper(TagsPropertyServiceUtil.class.getName(),
96 "addProperty",
97 new Object[] { paramObj0, paramObj1, paramObj2 });
98
99 Object returnObj = null;
100
101 try {
102 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
103 }
104 catch (Exception e) {
105 if (e instanceof com.liferay.portal.PortalException) {
106 throw (com.liferay.portal.PortalException)e;
107 }
108
109 if (e instanceof com.liferay.portal.SystemException) {
110 throw (com.liferay.portal.SystemException)e;
111 }
112
113 throw new com.liferay.portal.SystemException(e);
114 }
115
116 return (com.liferay.portlet.tags.model.TagsProperty)returnObj;
117 }
118 catch (com.liferay.portal.SystemException se) {
119 _log.error(se, se);
120
121 throw se;
122 }
123 }
124
125 public static com.liferay.portlet.tags.model.TagsProperty addProperty(
126 HttpPrincipal httpPrincipal, java.lang.String entryName,
127 java.lang.String key, java.lang.String value)
128 throws com.liferay.portal.PortalException,
129 com.liferay.portal.SystemException {
130 try {
131 Object paramObj0 = entryName;
132
133 if (entryName == null) {
134 paramObj0 = new NullWrapper("java.lang.String");
135 }
136
137 Object paramObj1 = key;
138
139 if (key == null) {
140 paramObj1 = new NullWrapper("java.lang.String");
141 }
142
143 Object paramObj2 = value;
144
145 if (value == null) {
146 paramObj2 = new NullWrapper("java.lang.String");
147 }
148
149 MethodWrapper methodWrapper = new MethodWrapper(TagsPropertyServiceUtil.class.getName(),
150 "addProperty",
151 new Object[] { paramObj0, paramObj1, paramObj2 });
152
153 Object returnObj = null;
154
155 try {
156 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
157 }
158 catch (Exception e) {
159 if (e instanceof com.liferay.portal.PortalException) {
160 throw (com.liferay.portal.PortalException)e;
161 }
162
163 if (e instanceof com.liferay.portal.SystemException) {
164 throw (com.liferay.portal.SystemException)e;
165 }
166
167 throw new com.liferay.portal.SystemException(e);
168 }
169
170 return (com.liferay.portlet.tags.model.TagsProperty)returnObj;
171 }
172 catch (com.liferay.portal.SystemException se) {
173 _log.error(se, se);
174
175 throw se;
176 }
177 }
178
179 public static void deleteProperty(HttpPrincipal httpPrincipal,
180 long propertyId)
181 throws com.liferay.portal.PortalException,
182 com.liferay.portal.SystemException {
183 try {
184 Object paramObj0 = new LongWrapper(propertyId);
185
186 MethodWrapper methodWrapper = new MethodWrapper(TagsPropertyServiceUtil.class.getName(),
187 "deleteProperty", new Object[] { paramObj0 });
188
189 try {
190 TunnelUtil.invoke(httpPrincipal, methodWrapper);
191 }
192 catch (Exception e) {
193 if (e instanceof com.liferay.portal.PortalException) {
194 throw (com.liferay.portal.PortalException)e;
195 }
196
197 if (e instanceof com.liferay.portal.SystemException) {
198 throw (com.liferay.portal.SystemException)e;
199 }
200
201 throw new com.liferay.portal.SystemException(e);
202 }
203 }
204 catch (com.liferay.portal.SystemException se) {
205 _log.error(se, se);
206
207 throw se;
208 }
209 }
210
211 public static java.util.List<com.liferay.portlet.tags.model.TagsProperty> getProperties(
212 HttpPrincipal httpPrincipal, long entryId)
213 throws com.liferay.portal.SystemException {
214 try {
215 Object paramObj0 = new LongWrapper(entryId);
216
217 MethodWrapper methodWrapper = new MethodWrapper(TagsPropertyServiceUtil.class.getName(),
218 "getProperties", new Object[] { paramObj0 });
219
220 Object returnObj = null;
221
222 try {
223 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
224 }
225 catch (Exception e) {
226 if (e instanceof com.liferay.portal.SystemException) {
227 throw (com.liferay.portal.SystemException)e;
228 }
229
230 throw new com.liferay.portal.SystemException(e);
231 }
232
233 return (java.util.List<com.liferay.portlet.tags.model.TagsProperty>)returnObj;
234 }
235 catch (com.liferay.portal.SystemException se) {
236 _log.error(se, se);
237
238 throw se;
239 }
240 }
241
242 public static java.util.List<com.liferay.portlet.tags.model.TagsProperty> getPropertyValues(
243 HttpPrincipal httpPrincipal, long companyId, java.lang.String key)
244 throws com.liferay.portal.SystemException {
245 try {
246 Object paramObj0 = new LongWrapper(companyId);
247
248 Object paramObj1 = key;
249
250 if (key == null) {
251 paramObj1 = new NullWrapper("java.lang.String");
252 }
253
254 MethodWrapper methodWrapper = new MethodWrapper(TagsPropertyServiceUtil.class.getName(),
255 "getPropertyValues", new Object[] { paramObj0, paramObj1 });
256
257 Object returnObj = null;
258
259 try {
260 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
261 }
262 catch (Exception e) {
263 if (e instanceof com.liferay.portal.SystemException) {
264 throw (com.liferay.portal.SystemException)e;
265 }
266
267 throw new com.liferay.portal.SystemException(e);
268 }
269
270 return (java.util.List<com.liferay.portlet.tags.model.TagsProperty>)returnObj;
271 }
272 catch (com.liferay.portal.SystemException se) {
273 _log.error(se, se);
274
275 throw se;
276 }
277 }
278
279 public static com.liferay.portlet.tags.model.TagsProperty updateProperty(
280 HttpPrincipal httpPrincipal, long propertyId, java.lang.String key,
281 java.lang.String value)
282 throws com.liferay.portal.PortalException,
283 com.liferay.portal.SystemException {
284 try {
285 Object paramObj0 = new LongWrapper(propertyId);
286
287 Object paramObj1 = key;
288
289 if (key == null) {
290 paramObj1 = new NullWrapper("java.lang.String");
291 }
292
293 Object paramObj2 = value;
294
295 if (value == null) {
296 paramObj2 = new NullWrapper("java.lang.String");
297 }
298
299 MethodWrapper methodWrapper = new MethodWrapper(TagsPropertyServiceUtil.class.getName(),
300 "updateProperty",
301 new Object[] { paramObj0, paramObj1, paramObj2 });
302
303 Object returnObj = null;
304
305 try {
306 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
307 }
308 catch (Exception e) {
309 if (e instanceof com.liferay.portal.PortalException) {
310 throw (com.liferay.portal.PortalException)e;
311 }
312
313 if (e instanceof com.liferay.portal.SystemException) {
314 throw (com.liferay.portal.SystemException)e;
315 }
316
317 throw new com.liferay.portal.SystemException(e);
318 }
319
320 return (com.liferay.portlet.tags.model.TagsProperty)returnObj;
321 }
322 catch (com.liferay.portal.SystemException se) {
323 _log.error(se, se);
324
325 throw se;
326 }
327 }
328
329 private static Log _log = LogFactoryUtil.getLog(TagsPropertyServiceHttp.class);
330 }