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