1
14
15 package com.liferay.portal.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.ClassNameServiceUtil;
23
24
61 public class ClassNameServiceHttp {
62 public static com.liferay.portal.model.ClassName getClassName(
63 HttpPrincipal httpPrincipal, long classNameId)
64 throws com.liferay.portal.PortalException,
65 com.liferay.portal.SystemException {
66 try {
67 MethodKey methodKey = new MethodKey(ClassNameServiceUtil.class.getName(),
68 "getClassName", _getClassNameParameterTypes0);
69
70 MethodHandler methodHandler = new MethodHandler(methodKey,
71 classNameId);
72
73 Object returnObj = null;
74
75 try {
76 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
77 }
78 catch (Exception e) {
79 if (e instanceof com.liferay.portal.PortalException) {
80 throw (com.liferay.portal.PortalException)e;
81 }
82
83 if (e instanceof com.liferay.portal.SystemException) {
84 throw (com.liferay.portal.SystemException)e;
85 }
86
87 throw new com.liferay.portal.SystemException(e);
88 }
89
90 return (com.liferay.portal.model.ClassName)returnObj;
91 }
92 catch (com.liferay.portal.SystemException se) {
93 _log.error(se, se);
94
95 throw se;
96 }
97 }
98
99 public static com.liferay.portal.model.ClassName getClassName(
100 HttpPrincipal httpPrincipal, java.lang.String value)
101 throws com.liferay.portal.SystemException {
102 try {
103 MethodKey methodKey = new MethodKey(ClassNameServiceUtil.class.getName(),
104 "getClassName", _getClassNameParameterTypes1);
105
106 MethodHandler methodHandler = new MethodHandler(methodKey, value);
107
108 Object returnObj = null;
109
110 try {
111 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
112 }
113 catch (Exception e) {
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.portal.model.ClassName)returnObj;
122 }
123 catch (com.liferay.portal.SystemException se) {
124 _log.error(se, se);
125
126 throw se;
127 }
128 }
129
130 public static long getClassNameId(HttpPrincipal httpPrincipal,
131 java.lang.Class<?> classObj) throws com.liferay.portal.SystemException {
132 try {
133 MethodKey methodKey = new MethodKey(ClassNameServiceUtil.class.getName(),
134 "getClassNameId", _getClassNameIdParameterTypes2);
135
136 MethodHandler methodHandler = new MethodHandler(methodKey, classObj);
137
138 Object returnObj = null;
139
140 try {
141 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
142 }
143 catch (Exception e) {
144 throw new com.liferay.portal.SystemException(e);
145 }
146
147 return ((Long)returnObj).longValue();
148 }
149 catch (com.liferay.portal.SystemException se) {
150 _log.error(se, se);
151
152 throw se;
153 }
154 }
155
156 public static long getClassNameId(HttpPrincipal httpPrincipal,
157 java.lang.String value) throws com.liferay.portal.SystemException {
158 try {
159 MethodKey methodKey = new MethodKey(ClassNameServiceUtil.class.getName(),
160 "getClassNameId", _getClassNameIdParameterTypes3);
161
162 MethodHandler methodHandler = new MethodHandler(methodKey, value);
163
164 Object returnObj = null;
165
166 try {
167 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
168 }
169 catch (Exception e) {
170 throw new com.liferay.portal.SystemException(e);
171 }
172
173 return ((Long)returnObj).longValue();
174 }
175 catch (com.liferay.portal.SystemException se) {
176 _log.error(se, se);
177
178 throw se;
179 }
180 }
181
182 private static Log _log = LogFactoryUtil.getLog(ClassNameServiceHttp.class);
183 private static final Class<?>[] _getClassNameParameterTypes0 = new Class[] {
184 long.class
185 };
186 private static final Class<?>[] _getClassNameParameterTypes1 = new Class[] {
187 java.lang.String.class
188 };
189 private static final Class<?>[] _getClassNameIdParameterTypes2 = new Class[] {
190 java.lang.Class.class
191 };
192 private static final Class<?>[] _getClassNameIdParameterTypes3 = new Class[] {
193 java.lang.String.class
194 };
195 }