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