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