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