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.ListTypeServiceUtil;
23
24
61 public class ListTypeServiceHttp {
62 public static com.liferay.portal.model.ListType getListType(
63 HttpPrincipal httpPrincipal, int listTypeId)
64 throws com.liferay.portal.PortalException,
65 com.liferay.portal.SystemException {
66 try {
67 MethodKey methodKey = new MethodKey(ListTypeServiceUtil.class.getName(),
68 "getListType", _getListTypeParameterTypes0);
69
70 MethodHandler methodHandler = new MethodHandler(methodKey,
71 listTypeId);
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.ListType)returnObj;
91 }
92 catch (com.liferay.portal.SystemException se) {
93 _log.error(se, se);
94
95 throw se;
96 }
97 }
98
99 public static java.util.List<com.liferay.portal.model.ListType> getListTypes(
100 HttpPrincipal httpPrincipal, java.lang.String type)
101 throws com.liferay.portal.SystemException {
102 try {
103 MethodKey methodKey = new MethodKey(ListTypeServiceUtil.class.getName(),
104 "getListTypes", _getListTypesParameterTypes1);
105
106 MethodHandler methodHandler = new MethodHandler(methodKey, type);
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 (java.util.List<com.liferay.portal.model.ListType>)returnObj;
122 }
123 catch (com.liferay.portal.SystemException se) {
124 _log.error(se, se);
125
126 throw se;
127 }
128 }
129
130 public static void validate(HttpPrincipal httpPrincipal, int listTypeId,
131 java.lang.String type)
132 throws com.liferay.portal.PortalException,
133 com.liferay.portal.SystemException {
134 try {
135 MethodKey methodKey = new MethodKey(ListTypeServiceUtil.class.getName(),
136 "validate", _validateParameterTypes2);
137
138 MethodHandler methodHandler = new MethodHandler(methodKey,
139 listTypeId, type);
140
141 try {
142 TunnelUtil.invoke(httpPrincipal, methodHandler);
143 }
144 catch (Exception e) {
145 if (e instanceof com.liferay.portal.PortalException) {
146 throw (com.liferay.portal.PortalException)e;
147 }
148
149 if (e instanceof com.liferay.portal.SystemException) {
150 throw (com.liferay.portal.SystemException)e;
151 }
152
153 throw new com.liferay.portal.SystemException(e);
154 }
155 }
156 catch (com.liferay.portal.SystemException se) {
157 _log.error(se, se);
158
159 throw se;
160 }
161 }
162
163 public static void validate(HttpPrincipal httpPrincipal, int listTypeId,
164 long classNameId, java.lang.String type)
165 throws com.liferay.portal.PortalException,
166 com.liferay.portal.SystemException {
167 try {
168 MethodKey methodKey = new MethodKey(ListTypeServiceUtil.class.getName(),
169 "validate", _validateParameterTypes3);
170
171 MethodHandler methodHandler = new MethodHandler(methodKey,
172 listTypeId, classNameId, type);
173
174 try {
175 TunnelUtil.invoke(httpPrincipal, methodHandler);
176 }
177 catch (Exception e) {
178 if (e instanceof com.liferay.portal.PortalException) {
179 throw (com.liferay.portal.PortalException)e;
180 }
181
182 if (e instanceof com.liferay.portal.SystemException) {
183 throw (com.liferay.portal.SystemException)e;
184 }
185
186 throw new com.liferay.portal.SystemException(e);
187 }
188 }
189 catch (com.liferay.portal.SystemException se) {
190 _log.error(se, se);
191
192 throw se;
193 }
194 }
195
196 private static Log _log = LogFactoryUtil.getLog(ListTypeServiceHttp.class);
197 private static final Class<?>[] _getListTypeParameterTypes0 = new Class[] {
198 int.class
199 };
200 private static final Class<?>[] _getListTypesParameterTypes1 = new Class[] {
201 java.lang.String.class
202 };
203 private static final Class<?>[] _validateParameterTypes2 = new Class[] {
204 int.class, java.lang.String.class
205 };
206 private static final Class<?>[] _validateParameterTypes3 = new Class[] {
207 int.class, long.class, java.lang.String.class
208 };
209 }