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.MethodHandler;
20 import com.liferay.portal.kernel.util.MethodKey;
21 import com.liferay.portal.security.auth.HttpPrincipal;
22 import com.liferay.portal.service.http.TunnelUtil;
23
24 import com.liferay.portlet.expando.service.ExpandoValueServiceUtil;
25
26
63 public class ExpandoValueServiceHttp {
64 public static com.liferay.portlet.expando.model.ExpandoValue addValue(
65 HttpPrincipal httpPrincipal, java.lang.String className,
66 java.lang.String tableName, java.lang.String columnName, long classPK,
67 java.lang.Object data)
68 throws com.liferay.portal.PortalException,
69 com.liferay.portal.SystemException {
70 try {
71 MethodKey methodKey = new MethodKey(ExpandoValueServiceUtil.class.getName(),
72 "addValue", _addValueParameterTypes0);
73
74 MethodHandler methodHandler = new MethodHandler(methodKey,
75 className, tableName, columnName, classPK, data);
76
77 Object returnObj = null;
78
79 try {
80 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
81 }
82 catch (Exception e) {
83 if (e instanceof com.liferay.portal.PortalException) {
84 throw (com.liferay.portal.PortalException)e;
85 }
86
87 if (e instanceof com.liferay.portal.SystemException) {
88 throw (com.liferay.portal.SystemException)e;
89 }
90
91 throw new com.liferay.portal.SystemException(e);
92 }
93
94 return (com.liferay.portlet.expando.model.ExpandoValue)returnObj;
95 }
96 catch (com.liferay.portal.SystemException se) {
97 _log.error(se, se);
98
99 throw se;
100 }
101 }
102
103 public static java.io.Serializable getData(HttpPrincipal httpPrincipal,
104 java.lang.String className, java.lang.String tableName,
105 java.lang.String columnName, long classPK)
106 throws com.liferay.portal.PortalException,
107 com.liferay.portal.SystemException {
108 try {
109 MethodKey methodKey = new MethodKey(ExpandoValueServiceUtil.class.getName(),
110 "getData", _getDataParameterTypes1);
111
112 MethodHandler methodHandler = new MethodHandler(methodKey,
113 className, tableName, columnName, classPK);
114
115 Object returnObj = null;
116
117 try {
118 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
119 }
120 catch (Exception e) {
121 if (e instanceof com.liferay.portal.PortalException) {
122 throw (com.liferay.portal.PortalException)e;
123 }
124
125 if (e instanceof com.liferay.portal.SystemException) {
126 throw (com.liferay.portal.SystemException)e;
127 }
128
129 throw new com.liferay.portal.SystemException(e);
130 }
131
132 return (java.io.Serializable)returnObj;
133 }
134 catch (com.liferay.portal.SystemException se) {
135 _log.error(se, se);
136
137 throw se;
138 }
139 }
140
141 private static Log _log = LogFactoryUtil.getLog(ExpandoValueServiceHttp.class);
142 private static final Class<?>[] _addValueParameterTypes0 = new Class[] {
143 java.lang.String.class, java.lang.String.class,
144 java.lang.String.class, long.class, java.lang.Object.class
145 };
146 private static final Class<?>[] _getDataParameterTypes1 = new Class[] {
147 java.lang.String.class, java.lang.String.class,
148 java.lang.String.class, long.class
149 };
150 }