1
22
23 package com.liferay.portal.service.http;
24
25 import com.liferay.portal.kernel.log.Log;
26 import com.liferay.portal.kernel.log.LogFactoryUtil;
27 import com.liferay.portal.kernel.util.IntegerWrapper;
28 import com.liferay.portal.kernel.util.LongWrapper;
29 import com.liferay.portal.kernel.util.MethodWrapper;
30 import com.liferay.portal.kernel.util.NullWrapper;
31 import com.liferay.portal.security.auth.HttpPrincipal;
32 import com.liferay.portal.service.ListTypeServiceUtil;
33
34
71 public class ListTypeServiceHttp {
72 public static com.liferay.portal.model.ListType getListType(
73 HttpPrincipal httpPrincipal, int listTypeId)
74 throws com.liferay.portal.PortalException,
75 com.liferay.portal.SystemException {
76 try {
77 Object paramObj0 = new IntegerWrapper(listTypeId);
78
79 MethodWrapper methodWrapper = new MethodWrapper(ListTypeServiceUtil.class.getName(),
80 "getListType", new Object[] { paramObj0 });
81
82 Object returnObj = null;
83
84 try {
85 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
86 }
87 catch (Exception e) {
88 if (e instanceof com.liferay.portal.PortalException) {
89 throw (com.liferay.portal.PortalException)e;
90 }
91
92 if (e instanceof com.liferay.portal.SystemException) {
93 throw (com.liferay.portal.SystemException)e;
94 }
95
96 throw new com.liferay.portal.SystemException(e);
97 }
98
99 return (com.liferay.portal.model.ListType)returnObj;
100 }
101 catch (com.liferay.portal.SystemException se) {
102 _log.error(se, se);
103
104 throw se;
105 }
106 }
107
108 public static java.util.List<com.liferay.portal.model.ListType> getListTypes(
109 HttpPrincipal httpPrincipal, java.lang.String type)
110 throws com.liferay.portal.SystemException {
111 try {
112 Object paramObj0 = type;
113
114 if (type == null) {
115 paramObj0 = new NullWrapper("java.lang.String");
116 }
117
118 MethodWrapper methodWrapper = new MethodWrapper(ListTypeServiceUtil.class.getName(),
119 "getListTypes", new Object[] { paramObj0 });
120
121 Object returnObj = null;
122
123 try {
124 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
125 }
126 catch (Exception e) {
127 if (e instanceof com.liferay.portal.SystemException) {
128 throw (com.liferay.portal.SystemException)e;
129 }
130
131 throw new com.liferay.portal.SystemException(e);
132 }
133
134 return (java.util.List<com.liferay.portal.model.ListType>)returnObj;
135 }
136 catch (com.liferay.portal.SystemException se) {
137 _log.error(se, se);
138
139 throw se;
140 }
141 }
142
143 public static void validate(HttpPrincipal httpPrincipal, int listTypeId,
144 java.lang.String type)
145 throws com.liferay.portal.PortalException,
146 com.liferay.portal.SystemException {
147 try {
148 Object paramObj0 = new IntegerWrapper(listTypeId);
149
150 Object paramObj1 = type;
151
152 if (type == null) {
153 paramObj1 = new NullWrapper("java.lang.String");
154 }
155
156 MethodWrapper methodWrapper = new MethodWrapper(ListTypeServiceUtil.class.getName(),
157 "validate", new Object[] { paramObj0, paramObj1 });
158
159 try {
160 TunnelUtil.invoke(httpPrincipal, methodWrapper);
161 }
162 catch (Exception e) {
163 if (e instanceof com.liferay.portal.PortalException) {
164 throw (com.liferay.portal.PortalException)e;
165 }
166
167 if (e instanceof com.liferay.portal.SystemException) {
168 throw (com.liferay.portal.SystemException)e;
169 }
170
171 throw new com.liferay.portal.SystemException(e);
172 }
173 }
174 catch (com.liferay.portal.SystemException se) {
175 _log.error(se, se);
176
177 throw se;
178 }
179 }
180
181 public static void validate(HttpPrincipal httpPrincipal, int listTypeId,
182 long classNameId, java.lang.String type)
183 throws com.liferay.portal.PortalException,
184 com.liferay.portal.SystemException {
185 try {
186 Object paramObj0 = new IntegerWrapper(listTypeId);
187
188 Object paramObj1 = new LongWrapper(classNameId);
189
190 Object paramObj2 = type;
191
192 if (type == null) {
193 paramObj2 = new NullWrapper("java.lang.String");
194 }
195
196 MethodWrapper methodWrapper = new MethodWrapper(ListTypeServiceUtil.class.getName(),
197 "validate", new Object[] { paramObj0, paramObj1, paramObj2 });
198
199 try {
200 TunnelUtil.invoke(httpPrincipal, methodWrapper);
201 }
202 catch (Exception e) {
203 if (e instanceof com.liferay.portal.PortalException) {
204 throw (com.liferay.portal.PortalException)e;
205 }
206
207 if (e instanceof com.liferay.portal.SystemException) {
208 throw (com.liferay.portal.SystemException)e;
209 }
210
211 throw new com.liferay.portal.SystemException(e);
212 }
213 }
214 catch (com.liferay.portal.SystemException se) {
215 _log.error(se, se);
216
217 throw se;
218 }
219 }
220
221 private static Log _log = LogFactoryUtil.getLog(ListTypeServiceHttp.class);
222 }