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