001
014
015 package com.liferay.portal.service.http;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.log.Log;
020 import com.liferay.portal.kernel.log.LogFactoryUtil;
021 import com.liferay.portal.kernel.security.auth.HttpPrincipal;
022 import com.liferay.portal.kernel.service.ClassNameServiceUtil;
023 import com.liferay.portal.kernel.service.http.TunnelUtil;
024 import com.liferay.portal.kernel.util.MethodHandler;
025 import com.liferay.portal.kernel.util.MethodKey;
026
027
055 @ProviderType
056 public class ClassNameServiceHttp {
057 public static com.liferay.portal.kernel.model.ClassName fetchByClassNameId(
058 HttpPrincipal httpPrincipal, long classNameId) {
059 try {
060 MethodKey methodKey = new MethodKey(ClassNameServiceUtil.class,
061 "fetchByClassNameId", _fetchByClassNameIdParameterTypes0);
062
063 MethodHandler methodHandler = new MethodHandler(methodKey,
064 classNameId);
065
066 Object returnObj = null;
067
068 try {
069 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
070 }
071 catch (Exception e) {
072 throw new com.liferay.portal.kernel.exception.SystemException(e);
073 }
074
075 return (com.liferay.portal.kernel.model.ClassName)returnObj;
076 }
077 catch (com.liferay.portal.kernel.exception.SystemException se) {
078 _log.error(se, se);
079
080 throw se;
081 }
082 }
083
084 public static com.liferay.portal.kernel.model.ClassName fetchClassName(
085 HttpPrincipal httpPrincipal, java.lang.String value) {
086 try {
087 MethodKey methodKey = new MethodKey(ClassNameServiceUtil.class,
088 "fetchClassName", _fetchClassNameParameterTypes1);
089
090 MethodHandler methodHandler = new MethodHandler(methodKey, value);
091
092 Object returnObj = null;
093
094 try {
095 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
096 }
097 catch (Exception e) {
098 throw new com.liferay.portal.kernel.exception.SystemException(e);
099 }
100
101 return (com.liferay.portal.kernel.model.ClassName)returnObj;
102 }
103 catch (com.liferay.portal.kernel.exception.SystemException se) {
104 _log.error(se, se);
105
106 throw se;
107 }
108 }
109
110 private static Log _log = LogFactoryUtil.getLog(ClassNameServiceHttp.class);
111 private static final Class<?>[] _fetchByClassNameIdParameterTypes0 = new Class[] {
112 long.class
113 };
114 private static final Class<?>[] _fetchClassNameParameterTypes1 = new Class[] {
115 java.lang.String.class
116 };
117 }