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