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.service.RoleServiceUtil;
28
29 import java.rmi.RemoteException;
30
31
79 public class RoleServiceSoap {
80 public static com.liferay.portal.model.RoleSoap addRole(
81 java.lang.String name, int type) throws RemoteException {
82 try {
83 com.liferay.portal.model.Role returnValue = RoleServiceUtil.addRole(name,
84 type);
85
86 return com.liferay.portal.model.RoleSoap.toSoapModel(returnValue);
87 }
88 catch (Exception e) {
89 _log.error(e, e);
90 throw new RemoteException(e.getMessage());
91 }
92 }
93
94 public static void deleteRole(long roleId) throws RemoteException {
95 try {
96 RoleServiceUtil.deleteRole(roleId);
97 }
98 catch (Exception e) {
99 _log.error(e, e);
100 throw new RemoteException(e.getMessage());
101 }
102 }
103
104 public static com.liferay.portal.model.RoleSoap getGroupRole(
105 long companyId, long groupId) throws RemoteException {
106 try {
107 com.liferay.portal.model.Role returnValue = RoleServiceUtil.getGroupRole(companyId,
108 groupId);
109
110 return com.liferay.portal.model.RoleSoap.toSoapModel(returnValue);
111 }
112 catch (Exception e) {
113 _log.error(e, e);
114 throw new RemoteException(e.getMessage());
115 }
116 }
117
118 public static com.liferay.portal.model.RoleSoap[] getGroupRoles(
119 long groupId) throws RemoteException {
120 try {
121 java.util.List returnValue = RoleServiceUtil.getGroupRoles(groupId);
122
123 return com.liferay.portal.model.RoleSoap.toSoapModels(returnValue);
124 }
125 catch (Exception e) {
126 _log.error(e, e);
127 throw new RemoteException(e.getMessage());
128 }
129 }
130
131 public static com.liferay.portal.model.RoleSoap getRole(long roleId)
132 throws RemoteException {
133 try {
134 com.liferay.portal.model.Role returnValue = RoleServiceUtil.getRole(roleId);
135
136 return com.liferay.portal.model.RoleSoap.toSoapModel(returnValue);
137 }
138 catch (Exception e) {
139 _log.error(e, e);
140 throw new RemoteException(e.getMessage());
141 }
142 }
143
144 public static com.liferay.portal.model.RoleSoap getRole(long companyId,
145 java.lang.String name) throws RemoteException {
146 try {
147 com.liferay.portal.model.Role returnValue = RoleServiceUtil.getRole(companyId,
148 name);
149
150 return com.liferay.portal.model.RoleSoap.toSoapModel(returnValue);
151 }
152 catch (Exception e) {
153 _log.error(e, e);
154 throw new RemoteException(e.getMessage());
155 }
156 }
157
158 public static com.liferay.portal.model.RoleSoap[] getUserGroupRoles(
159 long userId, long groupId) throws RemoteException {
160 try {
161 java.util.List returnValue = RoleServiceUtil.getUserGroupRoles(userId,
162 groupId);
163
164 return com.liferay.portal.model.RoleSoap.toSoapModels(returnValue);
165 }
166 catch (Exception e) {
167 _log.error(e, e);
168 throw new RemoteException(e.getMessage());
169 }
170 }
171
172 public static com.liferay.portal.model.RoleSoap[] getUserRelatedRoles(
173 long userId, java.util.List groups) throws RemoteException {
174 try {
175 java.util.List returnValue = RoleServiceUtil.getUserRelatedRoles(userId,
176 groups);
177
178 return com.liferay.portal.model.RoleSoap.toSoapModels(returnValue);
179 }
180 catch (Exception e) {
181 _log.error(e, e);
182 throw new RemoteException(e.getMessage());
183 }
184 }
185
186 public static com.liferay.portal.model.RoleSoap[] getUserRoles(long userId)
187 throws RemoteException {
188 try {
189 java.util.List returnValue = RoleServiceUtil.getUserRoles(userId);
190
191 return com.liferay.portal.model.RoleSoap.toSoapModels(returnValue);
192 }
193 catch (Exception e) {
194 _log.error(e, e);
195 throw new RemoteException(e.getMessage());
196 }
197 }
198
199 public static boolean hasUserRole(long userId, long companyId,
200 java.lang.String name, boolean inherited) throws RemoteException {
201 try {
202 boolean returnValue = RoleServiceUtil.hasUserRole(userId,
203 companyId, name, inherited);
204
205 return returnValue;
206 }
207 catch (Exception e) {
208 _log.error(e, e);
209 throw new RemoteException(e.getMessage());
210 }
211 }
212
213 public static boolean hasUserRoles(long userId, long companyId,
214 java.lang.String[] names, boolean inherited) throws RemoteException {
215 try {
216 boolean returnValue = RoleServiceUtil.hasUserRoles(userId,
217 companyId, names, inherited);
218
219 return returnValue;
220 }
221 catch (Exception e) {
222 _log.error(e, e);
223 throw new RemoteException(e.getMessage());
224 }
225 }
226
227 public static com.liferay.portal.model.RoleSoap updateRole(long roleId,
228 java.lang.String name) throws RemoteException {
229 try {
230 com.liferay.portal.model.Role returnValue = RoleServiceUtil.updateRole(roleId,
231 name);
232
233 return com.liferay.portal.model.RoleSoap.toSoapModel(returnValue);
234 }
235 catch (Exception e) {
236 _log.error(e, e);
237 throw new RemoteException(e.getMessage());
238 }
239 }
240
241 private static Log _log = LogFactoryUtil.getLog(RoleServiceSoap.class);
242 }