1
22
23 package com.liferay.portlet.expando.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.expando.service.ExpandoValueServiceUtil;
34
35
72 public class ExpandoValueServiceHttp {
73 public static com.liferay.portlet.expando.model.ExpandoValue addValue(
74 HttpPrincipal httpPrincipal, java.lang.String className,
75 java.lang.String tableName, java.lang.String columnName, long classPK,
76 java.lang.Object data)
77 throws com.liferay.portal.PortalException,
78 com.liferay.portal.SystemException {
79 try {
80 Object paramObj0 = className;
81
82 if (className == null) {
83 paramObj0 = new NullWrapper("java.lang.String");
84 }
85
86 Object paramObj1 = tableName;
87
88 if (tableName == null) {
89 paramObj1 = new NullWrapper("java.lang.String");
90 }
91
92 Object paramObj2 = columnName;
93
94 if (columnName == null) {
95 paramObj2 = new NullWrapper("java.lang.String");
96 }
97
98 Object paramObj3 = new LongWrapper(classPK);
99
100 Object paramObj4 = data;
101
102 if (data == null) {
103 paramObj4 = new NullWrapper("java.lang.Object");
104 }
105
106 MethodWrapper methodWrapper = new MethodWrapper(ExpandoValueServiceUtil.class.getName(),
107 "addValue",
108 new Object[] {
109 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
110 });
111
112 Object returnObj = null;
113
114 try {
115 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
116 }
117 catch (Exception e) {
118 if (e instanceof com.liferay.portal.PortalException) {
119 throw (com.liferay.portal.PortalException)e;
120 }
121
122 if (e instanceof com.liferay.portal.SystemException) {
123 throw (com.liferay.portal.SystemException)e;
124 }
125
126 throw new com.liferay.portal.SystemException(e);
127 }
128
129 return (com.liferay.portlet.expando.model.ExpandoValue)returnObj;
130 }
131 catch (com.liferay.portal.SystemException se) {
132 _log.error(se, se);
133
134 throw se;
135 }
136 }
137
138 public static java.io.Serializable getData(HttpPrincipal httpPrincipal,
139 java.lang.String className, java.lang.String tableName,
140 java.lang.String columnName, long classPK)
141 throws com.liferay.portal.PortalException,
142 com.liferay.portal.SystemException {
143 try {
144 Object paramObj0 = className;
145
146 if (className == null) {
147 paramObj0 = new NullWrapper("java.lang.String");
148 }
149
150 Object paramObj1 = tableName;
151
152 if (tableName == null) {
153 paramObj1 = new NullWrapper("java.lang.String");
154 }
155
156 Object paramObj2 = columnName;
157
158 if (columnName == null) {
159 paramObj2 = new NullWrapper("java.lang.String");
160 }
161
162 Object paramObj3 = new LongWrapper(classPK);
163
164 MethodWrapper methodWrapper = new MethodWrapper(ExpandoValueServiceUtil.class.getName(),
165 "getData",
166 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
167
168 Object returnObj = null;
169
170 try {
171 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
172 }
173 catch (Exception e) {
174 if (e instanceof com.liferay.portal.PortalException) {
175 throw (com.liferay.portal.PortalException)e;
176 }
177
178 if (e instanceof com.liferay.portal.SystemException) {
179 throw (com.liferay.portal.SystemException)e;
180 }
181
182 throw new com.liferay.portal.SystemException(e);
183 }
184
185 return (java.io.Serializable)returnObj;
186 }
187 catch (com.liferay.portal.SystemException se) {
188 _log.error(se, se);
189
190 throw se;
191 }
192 }
193
194 private static Log _log = LogFactoryUtil.getLog(ExpandoValueServiceHttp.class);
195 }