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