001
014
015 package com.liferay.portal.service.http;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.log.Log;
020 import com.liferay.portal.kernel.log.LogFactoryUtil;
021 import com.liferay.portal.kernel.service.GroupServiceUtil;
022 import com.liferay.portal.kernel.util.LocalizationUtil;
023
024 import java.rmi.RemoteException;
025
026 import java.util.Locale;
027 import java.util.Map;
028
029
069 @ProviderType
070 public class GroupServiceSoap {
071 public static com.liferay.portal.kernel.model.GroupSoap addGroup(
072 long parentGroupId, long liveGroupId,
073 java.lang.String[] nameMapLanguageIds,
074 java.lang.String[] nameMapValues,
075 java.lang.String[] descriptionMapLanguageIds,
076 java.lang.String[] descriptionMapValues, int type,
077 boolean manualMembership, int membershipRestriction,
078 java.lang.String friendlyURL, boolean site, boolean inheritContent,
079 boolean active,
080 com.liferay.portal.kernel.service.ServiceContext serviceContext)
081 throws RemoteException {
082 try {
083 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
084 nameMapValues);
085 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
086 descriptionMapValues);
087
088 com.liferay.portal.kernel.model.Group returnValue = GroupServiceUtil.addGroup(parentGroupId,
089 liveGroupId, nameMap, descriptionMap, type,
090 manualMembership, membershipRestriction, friendlyURL, site,
091 inheritContent, active, serviceContext);
092
093 return com.liferay.portal.kernel.model.GroupSoap.toSoapModel(returnValue);
094 }
095 catch (Exception e) {
096 _log.error(e, e);
097
098 throw new RemoteException(e.getMessage());
099 }
100 }
101
102 public static com.liferay.portal.kernel.model.GroupSoap addGroup(
103 long parentGroupId, long liveGroupId,
104 java.lang.String[] nameMapLanguageIds,
105 java.lang.String[] nameMapValues,
106 java.lang.String[] descriptionMapLanguageIds,
107 java.lang.String[] descriptionMapValues, int type,
108 boolean manualMembership, int membershipRestriction,
109 java.lang.String friendlyURL, boolean site, boolean active,
110 com.liferay.portal.kernel.service.ServiceContext serviceContext)
111 throws RemoteException {
112 try {
113 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
114 nameMapValues);
115 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
116 descriptionMapValues);
117
118 com.liferay.portal.kernel.model.Group returnValue = GroupServiceUtil.addGroup(parentGroupId,
119 liveGroupId, nameMap, descriptionMap, type,
120 manualMembership, membershipRestriction, friendlyURL, site,
121 active, serviceContext);
122
123 return com.liferay.portal.kernel.model.GroupSoap.toSoapModel(returnValue);
124 }
125 catch (Exception e) {
126 _log.error(e, e);
127
128 throw new RemoteException(e.getMessage());
129 }
130 }
131
132
160 @Deprecated
161 public static com.liferay.portal.kernel.model.GroupSoap addGroup(
162 long parentGroupId, long liveGroupId, java.lang.String name,
163 java.lang.String description, int type, boolean manualMembership,
164 int membershipRestriction, java.lang.String friendlyURL, boolean site,
165 boolean active,
166 com.liferay.portal.kernel.service.ServiceContext serviceContext)
167 throws RemoteException {
168 try {
169 com.liferay.portal.kernel.model.Group returnValue = GroupServiceUtil.addGroup(parentGroupId,
170 liveGroupId, name, description, type, manualMembership,
171 membershipRestriction, friendlyURL, site, active,
172 serviceContext);
173
174 return com.liferay.portal.kernel.model.GroupSoap.toSoapModel(returnValue);
175 }
176 catch (Exception e) {
177 _log.error(e, e);
178
179 throw new RemoteException(e.getMessage());
180 }
181 }
182
183
190 public static void addRoleGroups(long roleId, long[] groupIds)
191 throws RemoteException {
192 try {
193 GroupServiceUtil.addRoleGroups(roleId, groupIds);
194 }
195 catch (Exception e) {
196 _log.error(e, e);
197
198 throw new RemoteException(e.getMessage());
199 }
200 }
201
202
209 public static void checkRemoteStagingGroup(long groupId)
210 throws RemoteException {
211 try {
212 GroupServiceUtil.checkRemoteStagingGroup(groupId);
213 }
214 catch (Exception e) {
215 _log.error(e, e);
216
217 throw new RemoteException(e.getMessage());
218 }
219 }
220
221
234 public static void deleteGroup(long groupId) throws RemoteException {
235 try {
236 GroupServiceUtil.deleteGroup(groupId);
237 }
238 catch (Exception e) {
239 _log.error(e, e);
240
241 throw new RemoteException(e.getMessage());
242 }
243 }
244
245 public static void disableStaging(long groupId) throws RemoteException {
246 try {
247 GroupServiceUtil.disableStaging(groupId);
248 }
249 catch (Exception e) {
250 _log.error(e, e);
251
252 throw new RemoteException(e.getMessage());
253 }
254 }
255
256 public static void enableStaging(long groupId) throws RemoteException {
257 try {
258 GroupServiceUtil.enableStaging(groupId);
259 }
260 catch (Exception e) {
261 _log.error(e, e);
262
263 throw new RemoteException(e.getMessage());
264 }
265 }
266
267
274 public static com.liferay.portal.kernel.model.GroupSoap getCompanyGroup(
275 long companyId) throws RemoteException {
276 try {
277 com.liferay.portal.kernel.model.Group returnValue = GroupServiceUtil.getCompanyGroup(companyId);
278
279 return com.liferay.portal.kernel.model.GroupSoap.toSoapModel(returnValue);
280 }
281 catch (Exception e) {
282 _log.error(e, e);
283
284 throw new RemoteException(e.getMessage());
285 }
286 }
287
288
295 public static com.liferay.portal.kernel.model.GroupSoap getGroup(
296 long groupId) throws RemoteException {
297 try {
298 com.liferay.portal.kernel.model.Group returnValue = GroupServiceUtil.getGroup(groupId);
299
300 return com.liferay.portal.kernel.model.GroupSoap.toSoapModel(returnValue);
301 }
302 catch (Exception e) {
303 _log.error(e, e);
304
305 throw new RemoteException(e.getMessage());
306 }
307 }
308
309
317 public static com.liferay.portal.kernel.model.GroupSoap getGroup(
318 long companyId, java.lang.String groupKey) throws RemoteException {
319 try {
320 com.liferay.portal.kernel.model.Group returnValue = GroupServiceUtil.getGroup(companyId,
321 groupKey);
322
323 return com.liferay.portal.kernel.model.GroupSoap.toSoapModel(returnValue);
324 }
325 catch (Exception e) {
326 _log.error(e, e);
327
328 throw new RemoteException(e.getMessage());
329 }
330 }
331
332
343 public static java.lang.String getGroupDisplayURL(long groupId,
344 boolean privateLayout, boolean secureConnection)
345 throws RemoteException {
346 try {
347 java.lang.String returnValue = GroupServiceUtil.getGroupDisplayURL(groupId,
348 privateLayout, secureConnection);
349
350 return returnValue;
351 }
352 catch (Exception e) {
353 _log.error(e, e);
354
355 throw new RemoteException(e.getMessage());
356 }
357 }
358
359
369 public static com.liferay.portal.kernel.model.GroupSoap[] getGroups(
370 long companyId, long parentGroupId, boolean site)
371 throws RemoteException {
372 try {
373 java.util.List<com.liferay.portal.kernel.model.Group> returnValue = GroupServiceUtil.getGroups(companyId,
374 parentGroupId, site);
375
376 return com.liferay.portal.kernel.model.GroupSoap.toSoapModels(returnValue);
377 }
378 catch (Exception e) {
379 _log.error(e, e);
380
381 throw new RemoteException(e.getMessage());
382 }
383 }
384
385
396 public static com.liferay.portal.kernel.model.GroupSoap[] getManageableSiteGroups(
397 java.util.Collection<com.liferay.portal.kernel.model.Portlet> portlets,
398 int max) throws RemoteException {
399 try {
400 java.util.List<com.liferay.portal.kernel.model.Group> returnValue = GroupServiceUtil.getManageableSiteGroups(portlets,
401 max);
402
403 return com.liferay.portal.kernel.model.GroupSoap.toSoapModels(returnValue);
404 }
405 catch (Exception e) {
406 _log.error(e, e);
407
408 throw new RemoteException(e.getMessage());
409 }
410 }
411
412
419 public static com.liferay.portal.kernel.model.GroupSoap[] getOrganizationsGroups(
420 com.liferay.portal.kernel.model.OrganizationSoap[] organizations)
421 throws RemoteException {
422 try {
423 java.util.List<com.liferay.portal.kernel.model.Group> returnValue = GroupServiceUtil.getOrganizationsGroups(com.liferay.portal.model.impl.OrganizationModelImpl.toModels(
424 organizations));
425
426 return com.liferay.portal.kernel.model.GroupSoap.toSoapModels(returnValue);
427 }
428 catch (Exception e) {
429 _log.error(e, e);
430
431 throw new RemoteException(e.getMessage());
432 }
433 }
434
435
443 public static com.liferay.portal.kernel.model.GroupSoap getUserGroup(
444 long companyId, long userId) throws RemoteException {
445 try {
446 com.liferay.portal.kernel.model.Group returnValue = GroupServiceUtil.getUserGroup(companyId,
447 userId);
448
449 return com.liferay.portal.kernel.model.GroupSoap.toSoapModel(returnValue);
450 }
451 catch (Exception e) {
452 _log.error(e, e);
453
454 throw new RemoteException(e.getMessage());
455 }
456 }
457
458
465 public static com.liferay.portal.kernel.model.GroupSoap[] getUserGroupsGroups(
466 com.liferay.portal.kernel.model.UserGroupSoap[] userGroups)
467 throws RemoteException {
468 try {
469 java.util.List<com.liferay.portal.kernel.model.Group> returnValue = GroupServiceUtil.getUserGroupsGroups(com.liferay.portal.model.impl.UserGroupModelImpl.toModels(
470 userGroups));
471
472 return com.liferay.portal.kernel.model.GroupSoap.toSoapModels(returnValue);
473 }
474 catch (Exception e) {
475 _log.error(e, e);
476
477 throw new RemoteException(e.getMessage());
478 }
479 }
480
481
503 public static com.liferay.portal.kernel.model.GroupSoap[] getUserOrganizationsGroups(
504 long userId, int start, int end) throws RemoteException {
505 try {
506 java.util.List<com.liferay.portal.kernel.model.Group> returnValue = GroupServiceUtil.getUserOrganizationsGroups(userId,
507 start, end);
508
509 return com.liferay.portal.kernel.model.GroupSoap.toSoapModels(returnValue);
510 }
511 catch (Exception e) {
512 _log.error(e, e);
513
514 throw new RemoteException(e.getMessage());
515 }
516 }
517
518 public static com.liferay.portal.kernel.model.GroupSoap[] getUserSitesGroups()
519 throws RemoteException {
520 try {
521 java.util.List<com.liferay.portal.kernel.model.Group> returnValue = GroupServiceUtil.getUserSitesGroups();
522
523 return com.liferay.portal.kernel.model.GroupSoap.toSoapModels(returnValue);
524 }
525 catch (Exception e) {
526 _log.error(e, e);
527
528 throw new RemoteException(e.getMessage());
529 }
530 }
531
532
565 public static com.liferay.portal.kernel.model.GroupSoap[] getUserSitesGroups(
566 long userId, java.lang.String[] classNames, int max)
567 throws RemoteException {
568 try {
569 java.util.List<com.liferay.portal.kernel.model.Group> returnValue = GroupServiceUtil.getUserSitesGroups(userId,
570 classNames, max);
571
572 return com.liferay.portal.kernel.model.GroupSoap.toSoapModels(returnValue);
573 }
574 catch (Exception e) {
575 _log.error(e, e);
576
577 throw new RemoteException(e.getMessage());
578 }
579 }
580
581
613 public static com.liferay.portal.kernel.model.GroupSoap[] getUserSitesGroups(
614 java.lang.String[] classNames, int max) throws RemoteException {
615 try {
616 java.util.List<com.liferay.portal.kernel.model.Group> returnValue = GroupServiceUtil.getUserSitesGroups(classNames,
617 max);
618
619 return com.liferay.portal.kernel.model.GroupSoap.toSoapModels(returnValue);
620 }
621 catch (Exception e) {
622 _log.error(e, e);
623
624 throw new RemoteException(e.getMessage());
625 }
626 }
627
628
637 public static int getUserSitesGroupsCount() throws RemoteException {
638 try {
639 int returnValue = GroupServiceUtil.getUserSitesGroupsCount();
640
641 return returnValue;
642 }
643 catch (Exception e) {
644 _log.error(e, e);
645
646 throw new RemoteException(e.getMessage());
647 }
648 }
649
650
661 public static boolean hasUserGroup(long userId, long groupId)
662 throws RemoteException {
663 try {
664 boolean returnValue = GroupServiceUtil.hasUserGroup(userId, groupId);
665
666 return returnValue;
667 }
668 catch (Exception e) {
669 _log.error(e, e);
670
671 throw new RemoteException(e.getMessage());
672 }
673 }
674
675
706 public static com.liferay.portal.kernel.model.GroupSoap[] search(
707 long companyId, java.lang.String name, java.lang.String description,
708 java.lang.String[] params, int start, int end)
709 throws RemoteException {
710 try {
711 java.util.List<com.liferay.portal.kernel.model.Group> returnValue = GroupServiceUtil.search(companyId,
712 name, description, params, start, end);
713
714 return com.liferay.portal.kernel.model.GroupSoap.toSoapModels(returnValue);
715 }
716 catch (Exception e) {
717 _log.error(e, e);
718
719 throw new RemoteException(e.getMessage());
720 }
721 }
722
723
740 public static int searchCount(long companyId, java.lang.String name,
741 java.lang.String description, java.lang.String[] params)
742 throws RemoteException {
743 try {
744 int returnValue = GroupServiceUtil.searchCount(companyId, name,
745 description, params);
746
747 return returnValue;
748 }
749 catch (Exception e) {
750 _log.error(e, e);
751
752 throw new RemoteException(e.getMessage());
753 }
754 }
755
756
764 public static void setRoleGroups(long roleId, long[] groupIds)
765 throws RemoteException {
766 try {
767 GroupServiceUtil.setRoleGroups(roleId, groupIds);
768 }
769 catch (Exception e) {
770 _log.error(e, e);
771
772 throw new RemoteException(e.getMessage());
773 }
774 }
775
776
783 public static void unsetRoleGroups(long roleId, long[] groupIds)
784 throws RemoteException {
785 try {
786 GroupServiceUtil.unsetRoleGroups(roleId, groupIds);
787 }
788 catch (Exception e) {
789 _log.error(e, e);
790
791 throw new RemoteException(e.getMessage());
792 }
793 }
794
795
804 public static com.liferay.portal.kernel.model.GroupSoap updateFriendlyURL(
805 long groupId, java.lang.String friendlyURL) throws RemoteException {
806 try {
807 com.liferay.portal.kernel.model.Group returnValue = GroupServiceUtil.updateFriendlyURL(groupId,
808 friendlyURL);
809
810 return com.liferay.portal.kernel.model.GroupSoap.toSoapModel(returnValue);
811 }
812 catch (Exception e) {
813 _log.error(e, e);
814
815 throw new RemoteException(e.getMessage());
816 }
817 }
818
819 public static com.liferay.portal.kernel.model.GroupSoap updateGroup(
820 long groupId, long parentGroupId,
821 java.lang.String[] nameMapLanguageIds,
822 java.lang.String[] nameMapValues,
823 java.lang.String[] descriptionMapLanguageIds,
824 java.lang.String[] descriptionMapValues, int type,
825 boolean manualMembership, int membershipRestriction,
826 java.lang.String friendlyURL, boolean inheritContent, boolean active,
827 com.liferay.portal.kernel.service.ServiceContext serviceContext)
828 throws RemoteException {
829 try {
830 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds,
831 nameMapValues);
832 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds,
833 descriptionMapValues);
834
835 com.liferay.portal.kernel.model.Group returnValue = GroupServiceUtil.updateGroup(groupId,
836 parentGroupId, nameMap, descriptionMap, type,
837 manualMembership, membershipRestriction, friendlyURL,
838 inheritContent, active, serviceContext);
839
840 return com.liferay.portal.kernel.model.GroupSoap.toSoapModel(returnValue);
841 }
842 catch (Exception e) {
843 _log.error(e, e);
844
845 throw new RemoteException(e.getMessage());
846 }
847 }
848
849
877 @Deprecated
878 public static com.liferay.portal.kernel.model.GroupSoap updateGroup(
879 long groupId, long parentGroupId, java.lang.String name,
880 java.lang.String description, int type, boolean manualMembership,
881 int membershipRestriction, java.lang.String friendlyURL,
882 boolean inheritContent, boolean active,
883 com.liferay.portal.kernel.service.ServiceContext serviceContext)
884 throws RemoteException {
885 try {
886 com.liferay.portal.kernel.model.Group returnValue = GroupServiceUtil.updateGroup(groupId,
887 parentGroupId, name, description, type, manualMembership,
888 membershipRestriction, friendlyURL, inheritContent, active,
889 serviceContext);
890
891 return com.liferay.portal.kernel.model.GroupSoap.toSoapModel(returnValue);
892 }
893 catch (Exception e) {
894 _log.error(e, e);
895
896 throw new RemoteException(e.getMessage());
897 }
898 }
899
900
909 public static com.liferay.portal.kernel.model.GroupSoap updateGroup(
910 long groupId, java.lang.String typeSettings) throws RemoteException {
911 try {
912 com.liferay.portal.kernel.model.Group returnValue = GroupServiceUtil.updateGroup(groupId,
913 typeSettings);
914
915 return com.liferay.portal.kernel.model.GroupSoap.toSoapModel(returnValue);
916 }
917 catch (Exception e) {
918 _log.error(e, e);
919
920 throw new RemoteException(e.getMessage());
921 }
922 }
923
924 private static Log _log = LogFactoryUtil.getLog(GroupServiceSoap.class);
925 }