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.SystemException,
79 com.liferay.portal.PortalException {
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.SystemException) {
106 throw (com.liferay.portal.SystemException)e;
107 }
108
109 if (e instanceof com.liferay.portal.PortalException) {
110 throw (com.liferay.portal.PortalException)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.SystemException,
129 com.liferay.portal.PortalException {
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.SystemException) {
160 throw (com.liferay.portal.SystemException)e;
161 }
162
163 if (e instanceof com.liferay.portal.PortalException) {
164 throw (com.liferay.portal.PortalException)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.SystemException,
182 com.liferay.portal.PortalException {
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.SystemException) {
194 throw (com.liferay.portal.SystemException)e;
195 }
196
197 if (e instanceof com.liferay.portal.PortalException) {
198 throw (com.liferay.portal.PortalException)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 getProperties(HttpPrincipal httpPrincipal,
212 long entryId) throws com.liferay.portal.SystemException {
213 try {
214 Object paramObj0 = new LongWrapper(entryId);
215
216 MethodWrapper methodWrapper = new MethodWrapper(TagsPropertyServiceUtil.class.getName(),
217 "getProperties", new Object[] { paramObj0 });
218
219 Object returnObj = null;
220
221 try {
222 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
223 }
224 catch (Exception e) {
225 if (e instanceof com.liferay.portal.SystemException) {
226 throw (com.liferay.portal.SystemException)e;
227 }
228
229 throw new com.liferay.portal.SystemException(e);
230 }
231
232 return (java.util.List)returnObj;
233 }
234 catch (com.liferay.portal.SystemException se) {
235 _log.error(se, se);
236
237 throw se;
238 }
239 }
240
241 public static java.util.List getPropertyValues(
242 HttpPrincipal httpPrincipal, long companyId, java.lang.String key)
243 throws com.liferay.portal.SystemException {
244 try {
245 Object paramObj0 = new LongWrapper(companyId);
246
247 Object paramObj1 = key;
248
249 if (key == null) {
250 paramObj1 = new NullWrapper("java.lang.String");
251 }
252
253 MethodWrapper methodWrapper = new MethodWrapper(TagsPropertyServiceUtil.class.getName(),
254 "getPropertyValues", new Object[] { paramObj0, paramObj1 });
255
256 Object returnObj = null;
257
258 try {
259 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
260 }
261 catch (Exception e) {
262 if (e instanceof com.liferay.portal.SystemException) {
263 throw (com.liferay.portal.SystemException)e;
264 }
265
266 throw new com.liferay.portal.SystemException(e);
267 }
268
269 return (java.util.List)returnObj;
270 }
271 catch (com.liferay.portal.SystemException se) {
272 _log.error(se, se);
273
274 throw se;
275 }
276 }
277
278 public static com.liferay.portlet.tags.model.TagsProperty updateProperty(
279 HttpPrincipal httpPrincipal, long propertyId, java.lang.String key,
280 java.lang.String value)
281 throws com.liferay.portal.SystemException,
282 com.liferay.portal.PortalException {
283 try {
284 Object paramObj0 = new LongWrapper(propertyId);
285
286 Object paramObj1 = key;
287
288 if (key == null) {
289 paramObj1 = new NullWrapper("java.lang.String");
290 }
291
292 Object paramObj2 = value;
293
294 if (value == null) {
295 paramObj2 = new NullWrapper("java.lang.String");
296 }
297
298 MethodWrapper methodWrapper = new MethodWrapper(TagsPropertyServiceUtil.class.getName(),
299 "updateProperty",
300 new Object[] { paramObj0, paramObj1, paramObj2 });
301
302 Object returnObj = null;
303
304 try {
305 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
306 }
307 catch (Exception e) {
308 if (e instanceof com.liferay.portal.SystemException) {
309 throw (com.liferay.portal.SystemException)e;
310 }
311
312 if (e instanceof com.liferay.portal.PortalException) {
313 throw (com.liferay.portal.PortalException)e;
314 }
315
316 throw new com.liferay.portal.SystemException(e);
317 }
318
319 return (com.liferay.portlet.tags.model.TagsProperty)returnObj;
320 }
321 catch (com.liferay.portal.SystemException se) {
322 _log.error(se, se);
323
324 throw se;
325 }
326 }
327
328 private static Log _log = LogFactoryUtil.getLog(TagsPropertyServiceHttp.class);
329 }