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