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.ListTypeServiceUtil;
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 ListTypeServiceHttp {
057 public static com.liferay.portal.kernel.model.ListType getListType(
058 HttpPrincipal httpPrincipal, long listTypeId)
059 throws com.liferay.portal.kernel.exception.PortalException {
060 try {
061 MethodKey methodKey = new MethodKey(ListTypeServiceUtil.class,
062 "getListType", _getListTypeParameterTypes0);
063
064 MethodHandler methodHandler = new MethodHandler(methodKey,
065 listTypeId);
066
067 Object returnObj = null;
068
069 try {
070 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
071 }
072 catch (Exception e) {
073 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
074 throw (com.liferay.portal.kernel.exception.PortalException)e;
075 }
076
077 throw new com.liferay.portal.kernel.exception.SystemException(e);
078 }
079
080 return (com.liferay.portal.kernel.model.ListType)returnObj;
081 }
082 catch (com.liferay.portal.kernel.exception.SystemException se) {
083 _log.error(se, se);
084
085 throw se;
086 }
087 }
088
089 public static java.util.List<com.liferay.portal.kernel.model.ListType> getListTypes(
090 HttpPrincipal httpPrincipal, java.lang.String type) {
091 try {
092 MethodKey methodKey = new MethodKey(ListTypeServiceUtil.class,
093 "getListTypes", _getListTypesParameterTypes1);
094
095 MethodHandler methodHandler = new MethodHandler(methodKey, type);
096
097 Object returnObj = null;
098
099 try {
100 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
101 }
102 catch (Exception e) {
103 throw new com.liferay.portal.kernel.exception.SystemException(e);
104 }
105
106 return (java.util.List<com.liferay.portal.kernel.model.ListType>)returnObj;
107 }
108 catch (com.liferay.portal.kernel.exception.SystemException se) {
109 _log.error(se, se);
110
111 throw se;
112 }
113 }
114
115 public static void validate(HttpPrincipal httpPrincipal, long listTypeId,
116 long classNameId, java.lang.String type)
117 throws com.liferay.portal.kernel.exception.PortalException {
118 try {
119 MethodKey methodKey = new MethodKey(ListTypeServiceUtil.class,
120 "validate", _validateParameterTypes2);
121
122 MethodHandler methodHandler = new MethodHandler(methodKey,
123 listTypeId, classNameId, type);
124
125 try {
126 TunnelUtil.invoke(httpPrincipal, methodHandler);
127 }
128 catch (Exception e) {
129 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
130 throw (com.liferay.portal.kernel.exception.PortalException)e;
131 }
132
133 throw new com.liferay.portal.kernel.exception.SystemException(e);
134 }
135 }
136 catch (com.liferay.portal.kernel.exception.SystemException se) {
137 _log.error(se, se);
138
139 throw se;
140 }
141 }
142
143 public static void validate(HttpPrincipal httpPrincipal, long listTypeId,
144 java.lang.String type)
145 throws com.liferay.portal.kernel.exception.PortalException {
146 try {
147 MethodKey methodKey = new MethodKey(ListTypeServiceUtil.class,
148 "validate", _validateParameterTypes3);
149
150 MethodHandler methodHandler = new MethodHandler(methodKey,
151 listTypeId, type);
152
153 try {
154 TunnelUtil.invoke(httpPrincipal, methodHandler);
155 }
156 catch (Exception e) {
157 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
158 throw (com.liferay.portal.kernel.exception.PortalException)e;
159 }
160
161 throw new com.liferay.portal.kernel.exception.SystemException(e);
162 }
163 }
164 catch (com.liferay.portal.kernel.exception.SystemException se) {
165 _log.error(se, se);
166
167 throw se;
168 }
169 }
170
171 private static Log _log = LogFactoryUtil.getLog(ListTypeServiceHttp.class);
172 private static final Class<?>[] _getListTypeParameterTypes0 = new Class[] {
173 long.class
174 };
175 private static final Class<?>[] _getListTypesParameterTypes1 = new Class[] {
176 java.lang.String.class
177 };
178 private static final Class<?>[] _validateParameterTypes2 = new Class[] {
179 long.class, long.class, java.lang.String.class
180 };
181 private static final Class<?>[] _validateParameterTypes3 = new Class[] {
182 long.class, java.lang.String.class
183 };
184 }