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