001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.transaction.Isolation;
020    import com.liferay.portal.kernel.transaction.Propagation;
021    import com.liferay.portal.kernel.transaction.Transactional;
022    
023    /**
024     * The interface for the user group local service.
025     *
026     * <p>
027     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see UserGroupLocalServiceUtil
032     * @see com.liferay.portal.service.base.UserGroupLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.UserGroupLocalServiceImpl
034     * @generated
035     */
036    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
037            PortalException.class, SystemException.class})
038    public interface UserGroupLocalService extends BaseLocalService,
039            PersistedModelLocalService {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * Never modify or reference this interface directly. Always use {@link UserGroupLocalServiceUtil} to access the user group local service. Add custom service methods to {@link com.liferay.portal.service.impl.UserGroupLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
044             */
045    
046            /**
047            * Adds the user group to the database. Also notifies the appropriate model listeners.
048            *
049            * @param userGroup the user group
050            * @return the user group that was added
051            * @throws SystemException if a system exception occurred
052            */
053            public com.liferay.portal.model.UserGroup addUserGroup(
054                    com.liferay.portal.model.UserGroup userGroup)
055                    throws com.liferay.portal.kernel.exception.SystemException;
056    
057            /**
058            * Creates a new user group with the primary key. Does not add the user group to the database.
059            *
060            * @param userGroupId the primary key for the new user group
061            * @return the new user group
062            */
063            public com.liferay.portal.model.UserGroup createUserGroup(long userGroupId);
064    
065            /**
066            * Deletes the user group with the primary key from the database. Also notifies the appropriate model listeners.
067            *
068            * @param userGroupId the primary key of the user group
069            * @return the user group that was removed
070            * @throws PortalException if a user group with the primary key could not be found
071            * @throws SystemException if a system exception occurred
072            */
073            public com.liferay.portal.model.UserGroup deleteUserGroup(long userGroupId)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException;
076    
077            /**
078            * Deletes the user group from the database. Also notifies the appropriate model listeners.
079            *
080            * @param userGroup the user group
081            * @return the user group that was removed
082            * @throws PortalException
083            * @throws SystemException if a system exception occurred
084            */
085            public com.liferay.portal.model.UserGroup deleteUserGroup(
086                    com.liferay.portal.model.UserGroup userGroup)
087                    throws com.liferay.portal.kernel.exception.PortalException,
088                            com.liferay.portal.kernel.exception.SystemException;
089    
090            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
091    
092            /**
093            * Performs a dynamic query on the database and returns the matching rows.
094            *
095            * @param dynamicQuery the dynamic query
096            * @return the matching rows
097            * @throws SystemException if a system exception occurred
098            */
099            @SuppressWarnings("rawtypes")
100            public java.util.List dynamicQuery(
101                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
102                    throws com.liferay.portal.kernel.exception.SystemException;
103    
104            /**
105            * Performs a dynamic query on the database and returns a range of the matching rows.
106            *
107            * <p>
108            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
109            * </p>
110            *
111            * @param dynamicQuery the dynamic query
112            * @param start the lower bound of the range of model instances
113            * @param end the upper bound of the range of model instances (not inclusive)
114            * @return the range of matching rows
115            * @throws SystemException if a system exception occurred
116            */
117            @SuppressWarnings("rawtypes")
118            public java.util.List dynamicQuery(
119                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
120                    int end) throws com.liferay.portal.kernel.exception.SystemException;
121    
122            /**
123            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
124            *
125            * <p>
126            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
127            * </p>
128            *
129            * @param dynamicQuery the dynamic query
130            * @param start the lower bound of the range of model instances
131            * @param end the upper bound of the range of model instances (not inclusive)
132            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
133            * @return the ordered range of matching rows
134            * @throws SystemException if a system exception occurred
135            */
136            @SuppressWarnings("rawtypes")
137            public java.util.List dynamicQuery(
138                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
139                    int end,
140                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
141                    throws com.liferay.portal.kernel.exception.SystemException;
142    
143            /**
144            * Returns the number of rows that match the dynamic query.
145            *
146            * @param dynamicQuery the dynamic query
147            * @return the number of rows that match the dynamic query
148            * @throws SystemException if a system exception occurred
149            */
150            public long dynamicQueryCount(
151                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
152                    throws com.liferay.portal.kernel.exception.SystemException;
153    
154            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
155            public com.liferay.portal.model.UserGroup fetchUserGroup(long userGroupId)
156                    throws com.liferay.portal.kernel.exception.SystemException;
157    
158            /**
159            * Returns the user group with the primary key.
160            *
161            * @param userGroupId the primary key of the user group
162            * @return the user group
163            * @throws PortalException if a user group with the primary key could not be found
164            * @throws SystemException if a system exception occurred
165            */
166            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167            public com.liferay.portal.model.UserGroup getUserGroup(long userGroupId)
168                    throws com.liferay.portal.kernel.exception.PortalException,
169                            com.liferay.portal.kernel.exception.SystemException;
170    
171            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172            public com.liferay.portal.model.PersistedModel getPersistedModel(
173                    java.io.Serializable primaryKeyObj)
174                    throws com.liferay.portal.kernel.exception.PortalException,
175                            com.liferay.portal.kernel.exception.SystemException;
176    
177            /**
178            * Returns a range of all the user groups.
179            *
180            * <p>
181            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
182            * </p>
183            *
184            * @param start the lower bound of the range of user groups
185            * @param end the upper bound of the range of user groups (not inclusive)
186            * @return the range of user groups
187            * @throws SystemException if a system exception occurred
188            */
189            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
190            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
191                    int start, int end)
192                    throws com.liferay.portal.kernel.exception.SystemException;
193    
194            /**
195            * Returns the number of user groups.
196            *
197            * @return the number of user groups
198            * @throws SystemException if a system exception occurred
199            */
200            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
201            public int getUserGroupsCount()
202                    throws com.liferay.portal.kernel.exception.SystemException;
203    
204            /**
205            * Updates the user group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
206            *
207            * @param userGroup the user group
208            * @return the user group that was updated
209            * @throws SystemException if a system exception occurred
210            */
211            public com.liferay.portal.model.UserGroup updateUserGroup(
212                    com.liferay.portal.model.UserGroup userGroup)
213                    throws com.liferay.portal.kernel.exception.SystemException;
214    
215            /**
216            * Updates the user group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
217            *
218            * @param userGroup the user group
219            * @param merge whether to merge the user group with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
220            * @return the user group that was updated
221            * @throws SystemException if a system exception occurred
222            */
223            public com.liferay.portal.model.UserGroup updateUserGroup(
224                    com.liferay.portal.model.UserGroup userGroup, boolean merge)
225                    throws com.liferay.portal.kernel.exception.SystemException;
226    
227            /**
228            * @throws SystemException if a system exception occurred
229            */
230            public void addGroupUserGroup(long groupId, long userGroupId)
231                    throws com.liferay.portal.kernel.exception.SystemException;
232    
233            /**
234            * @throws SystemException if a system exception occurred
235            */
236            public void addGroupUserGroup(long groupId,
237                    com.liferay.portal.model.UserGroup userGroup)
238                    throws com.liferay.portal.kernel.exception.SystemException;
239    
240            /**
241            * @throws SystemException if a system exception occurred
242            */
243            public void addGroupUserGroups(long groupId, long[] userGroupIds)
244                    throws com.liferay.portal.kernel.exception.SystemException;
245    
246            /**
247            * @throws SystemException if a system exception occurred
248            */
249            public void addGroupUserGroups(long groupId,
250                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
251                    throws com.liferay.portal.kernel.exception.SystemException;
252    
253            /**
254            * @throws SystemException if a system exception occurred
255            */
256            public void clearGroupUserGroups(long groupId)
257                    throws com.liferay.portal.kernel.exception.SystemException;
258    
259            /**
260            * @throws SystemException if a system exception occurred
261            */
262            public void deleteGroupUserGroup(long groupId, long userGroupId)
263                    throws com.liferay.portal.kernel.exception.SystemException;
264    
265            /**
266            * @throws SystemException if a system exception occurred
267            */
268            public void deleteGroupUserGroup(long groupId,
269                    com.liferay.portal.model.UserGroup userGroup)
270                    throws com.liferay.portal.kernel.exception.SystemException;
271    
272            /**
273            * @throws SystemException if a system exception occurred
274            */
275            public void deleteGroupUserGroups(long groupId, long[] userGroupIds)
276                    throws com.liferay.portal.kernel.exception.SystemException;
277    
278            /**
279            * @throws SystemException if a system exception occurred
280            */
281            public void deleteGroupUserGroups(long groupId,
282                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
283                    throws com.liferay.portal.kernel.exception.SystemException;
284    
285            /**
286            * @throws SystemException if a system exception occurred
287            */
288            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
289            public java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups(
290                    long groupId)
291                    throws com.liferay.portal.kernel.exception.SystemException;
292    
293            /**
294            * @throws SystemException if a system exception occurred
295            */
296            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
297            public java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups(
298                    long groupId, int start, int end)
299                    throws com.liferay.portal.kernel.exception.SystemException;
300    
301            /**
302            * @throws SystemException if a system exception occurred
303            */
304            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
305            public java.util.List<com.liferay.portal.model.UserGroup> getGroupUserGroups(
306                    long groupId, int start, int end,
307                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
308                    throws com.liferay.portal.kernel.exception.SystemException;
309    
310            /**
311            * @throws SystemException if a system exception occurred
312            */
313            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
314            public int getGroupUserGroupsCount(long groupId)
315                    throws com.liferay.portal.kernel.exception.SystemException;
316    
317            /**
318            * @throws SystemException if a system exception occurred
319            */
320            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
321            public boolean hasGroupUserGroup(long groupId, long userGroupId)
322                    throws com.liferay.portal.kernel.exception.SystemException;
323    
324            /**
325            * @throws SystemException if a system exception occurred
326            */
327            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
328            public boolean hasGroupUserGroups(long groupId)
329                    throws com.liferay.portal.kernel.exception.SystemException;
330    
331            /**
332            * @throws SystemException if a system exception occurred
333            */
334            public void setGroupUserGroups(long groupId, long[] userGroupIds)
335                    throws com.liferay.portal.kernel.exception.SystemException;
336    
337            /**
338            * @throws SystemException if a system exception occurred
339            */
340            public void addTeamUserGroup(long teamId, long userGroupId)
341                    throws com.liferay.portal.kernel.exception.SystemException;
342    
343            /**
344            * @throws SystemException if a system exception occurred
345            */
346            public void addTeamUserGroup(long teamId,
347                    com.liferay.portal.model.UserGroup userGroup)
348                    throws com.liferay.portal.kernel.exception.SystemException;
349    
350            /**
351            * @throws SystemException if a system exception occurred
352            */
353            public void addTeamUserGroups(long teamId, long[] userGroupIds)
354                    throws com.liferay.portal.kernel.exception.SystemException;
355    
356            /**
357            * @throws SystemException if a system exception occurred
358            */
359            public void addTeamUserGroups(long teamId,
360                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
361                    throws com.liferay.portal.kernel.exception.SystemException;
362    
363            /**
364            * @throws SystemException if a system exception occurred
365            */
366            public void clearTeamUserGroups(long teamId)
367                    throws com.liferay.portal.kernel.exception.SystemException;
368    
369            /**
370            * @throws SystemException if a system exception occurred
371            */
372            public void deleteTeamUserGroup(long teamId, long userGroupId)
373                    throws com.liferay.portal.kernel.exception.SystemException;
374    
375            /**
376            * @throws SystemException if a system exception occurred
377            */
378            public void deleteTeamUserGroup(long teamId,
379                    com.liferay.portal.model.UserGroup userGroup)
380                    throws com.liferay.portal.kernel.exception.SystemException;
381    
382            /**
383            * @throws SystemException if a system exception occurred
384            */
385            public void deleteTeamUserGroups(long teamId, long[] userGroupIds)
386                    throws com.liferay.portal.kernel.exception.SystemException;
387    
388            /**
389            * @throws SystemException if a system exception occurred
390            */
391            public void deleteTeamUserGroups(long teamId,
392                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
393                    throws com.liferay.portal.kernel.exception.SystemException;
394    
395            /**
396            * @throws SystemException if a system exception occurred
397            */
398            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
399            public java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups(
400                    long teamId) throws com.liferay.portal.kernel.exception.SystemException;
401    
402            /**
403            * @throws SystemException if a system exception occurred
404            */
405            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
406            public java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups(
407                    long teamId, int start, int end)
408                    throws com.liferay.portal.kernel.exception.SystemException;
409    
410            /**
411            * @throws SystemException if a system exception occurred
412            */
413            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
414            public java.util.List<com.liferay.portal.model.UserGroup> getTeamUserGroups(
415                    long teamId, int start, int end,
416                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
417                    throws com.liferay.portal.kernel.exception.SystemException;
418    
419            /**
420            * @throws SystemException if a system exception occurred
421            */
422            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
423            public int getTeamUserGroupsCount(long teamId)
424                    throws com.liferay.portal.kernel.exception.SystemException;
425    
426            /**
427            * @throws SystemException if a system exception occurred
428            */
429            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
430            public boolean hasTeamUserGroup(long teamId, long userGroupId)
431                    throws com.liferay.portal.kernel.exception.SystemException;
432    
433            /**
434            * @throws SystemException if a system exception occurred
435            */
436            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
437            public boolean hasTeamUserGroups(long teamId)
438                    throws com.liferay.portal.kernel.exception.SystemException;
439    
440            /**
441            * @throws SystemException if a system exception occurred
442            */
443            public void setTeamUserGroups(long teamId, long[] userGroupIds)
444                    throws com.liferay.portal.kernel.exception.SystemException;
445    
446            /**
447            * @throws SystemException if a system exception occurred
448            */
449            public void addUserUserGroup(long userId, long userGroupId)
450                    throws com.liferay.portal.kernel.exception.SystemException;
451    
452            /**
453            * @throws SystemException if a system exception occurred
454            */
455            public void addUserUserGroup(long userId,
456                    com.liferay.portal.model.UserGroup userGroup)
457                    throws com.liferay.portal.kernel.exception.SystemException;
458    
459            /**
460            * @throws SystemException if a system exception occurred
461            */
462            public void addUserUserGroups(long userId, long[] userGroupIds)
463                    throws com.liferay.portal.kernel.exception.SystemException;
464    
465            /**
466            * @throws SystemException if a system exception occurred
467            */
468            public void addUserUserGroups(long userId,
469                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
470                    throws com.liferay.portal.kernel.exception.SystemException;
471    
472            /**
473            * @throws SystemException if a system exception occurred
474            */
475            public void clearUserUserGroups(long userId)
476                    throws com.liferay.portal.kernel.exception.SystemException;
477    
478            /**
479            * @throws SystemException if a system exception occurred
480            */
481            public void deleteUserUserGroup(long userId, long userGroupId)
482                    throws com.liferay.portal.kernel.exception.SystemException;
483    
484            /**
485            * @throws SystemException if a system exception occurred
486            */
487            public void deleteUserUserGroup(long userId,
488                    com.liferay.portal.model.UserGroup userGroup)
489                    throws com.liferay.portal.kernel.exception.SystemException;
490    
491            /**
492            * @throws SystemException if a system exception occurred
493            */
494            public void deleteUserUserGroups(long userId, long[] userGroupIds)
495                    throws com.liferay.portal.kernel.exception.SystemException;
496    
497            /**
498            * @throws SystemException if a system exception occurred
499            */
500            public void deleteUserUserGroups(long userId,
501                    java.util.List<com.liferay.portal.model.UserGroup> UserGroups)
502                    throws com.liferay.portal.kernel.exception.SystemException;
503    
504            /**
505            * @throws SystemException if a system exception occurred
506            */
507            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
508            public java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
509                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
510    
511            /**
512            * @throws SystemException if a system exception occurred
513            */
514            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
515            public java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
516                    long userId, int start, int end)
517                    throws com.liferay.portal.kernel.exception.SystemException;
518    
519            /**
520            * @throws SystemException if a system exception occurred
521            */
522            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
523            public java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
524                    long userId, int start, int end,
525                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
526                    throws com.liferay.portal.kernel.exception.SystemException;
527    
528            /**
529            * @throws SystemException if a system exception occurred
530            */
531            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
532            public int getUserUserGroupsCount(long userId)
533                    throws com.liferay.portal.kernel.exception.SystemException;
534    
535            /**
536            * @throws SystemException if a system exception occurred
537            */
538            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
539            public boolean hasUserUserGroup(long userId, long userGroupId)
540                    throws com.liferay.portal.kernel.exception.SystemException;
541    
542            /**
543            * @throws SystemException if a system exception occurred
544            */
545            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
546            public boolean hasUserUserGroups(long userId)
547                    throws com.liferay.portal.kernel.exception.SystemException;
548    
549            /**
550            * @throws PortalException
551            * @throws SystemException if a system exception occurred
552            */
553            public void setUserUserGroups(long userId, long[] userGroupIds)
554                    throws com.liferay.portal.kernel.exception.PortalException,
555                            com.liferay.portal.kernel.exception.SystemException;
556    
557            /**
558            * Returns the Spring bean ID for this bean.
559            *
560            * @return the Spring bean ID for this bean
561            */
562            public java.lang.String getBeanIdentifier();
563    
564            /**
565            * Sets the Spring bean ID for this bean.
566            *
567            * @param beanIdentifier the Spring bean ID for this bean
568            */
569            public void setBeanIdentifier(java.lang.String beanIdentifier);
570    
571            /**
572            * Adds a user group.
573            *
574            * <p>
575            * This method handles the creation and bookkeeping of the user group,
576            * including its resources, metadata, and internal data structures. It is
577            * not necessary to make subsequent calls to setup default groups and
578            * resources for the user group.
579            * </p>
580            *
581            * @param userId the primary key of the user
582            * @param companyId the primary key of the user group's company
583            * @param name the user group's name
584            * @param description the user group's description
585            * @return the user group
586            * @throws PortalException if the user group's information was invalid
587            * @throws SystemException if a system exception occurred
588            */
589            public com.liferay.portal.model.UserGroup addUserGroup(long userId,
590                    long companyId, java.lang.String name, java.lang.String description)
591                    throws com.liferay.portal.kernel.exception.PortalException,
592                            com.liferay.portal.kernel.exception.SystemException;
593    
594            /**
595            * Copies the user group's layout to the user.
596            *
597            * @param userGroupId the primary key of the user group
598            * @param userId the primary key of the user
599            * @throws PortalException if a user with the primary key could not be
600            found or if a portal exception occurred
601            * @throws SystemException if a system exception occurred
602            * @deprecated
603            */
604            public void copyUserGroupLayouts(long userGroupId, long userId)
605                    throws com.liferay.portal.kernel.exception.PortalException,
606                            com.liferay.portal.kernel.exception.SystemException;
607    
608            /**
609            * Copies the user group's layouts to the users who are not already members
610            * of the user group.
611            *
612            * @param userGroupId the primary key of the user group
613            * @param userIds the primary keys of the users
614            * @throws PortalException if any one of the users could not be found or
615            if a portal exception occurred
616            * @throws SystemException if a system exception occurred
617            * @deprecated
618            */
619            public void copyUserGroupLayouts(long userGroupId, long[] userIds)
620                    throws com.liferay.portal.kernel.exception.PortalException,
621                            com.liferay.portal.kernel.exception.SystemException;
622    
623            /**
624            * Copies the user groups' layouts to the user.
625            *
626            * @param userGroupIds the primary keys of the user groups
627            * @param userId the primary key of the user
628            * @throws PortalException if a user with the primary key could not be
629            found or if a portal exception occurred
630            * @throws SystemException if a system exception occurred
631            * @deprecated
632            */
633            public void copyUserGroupLayouts(long[] userGroupIds, long userId)
634                    throws com.liferay.portal.kernel.exception.PortalException,
635                            com.liferay.portal.kernel.exception.SystemException;
636    
637            /**
638            * Returns the user group with the name.
639            *
640            * @param companyId the primary key of the user group's company
641            * @param name the user group's name
642            * @return Returns the user group with the name
643            * @throws PortalException if a user group with the name could not be found
644            * @throws SystemException if a system exception occurred
645            */
646            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
647            public com.liferay.portal.model.UserGroup getUserGroup(long companyId,
648                    java.lang.String name)
649                    throws com.liferay.portal.kernel.exception.PortalException,
650                            com.liferay.portal.kernel.exception.SystemException;
651    
652            /**
653            * Returns all the user groups belonging to the company.
654            *
655            * @param companyId the primary key of the user groups' company
656            * @return the user groups belonging to the company
657            * @throws SystemException if a system exception occurred
658            */
659            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
660            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
661                    long companyId)
662                    throws com.liferay.portal.kernel.exception.SystemException;
663    
664            /**
665            * Returns all the user groups with the primary keys.
666            *
667            * @param userGroupIds the primary keys of the user groups
668            * @return the user groups with the primary keys
669            * @throws PortalException if any one of the user groups could not be found
670            * @throws SystemException if a system exception occurred
671            */
672            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
673            public java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
674                    long[] userGroupIds)
675                    throws com.liferay.portal.kernel.exception.PortalException,
676                            com.liferay.portal.kernel.exception.SystemException;
677    
678            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
679            public java.util.List<com.liferay.portal.model.UserGroup> search(
680                    long companyId, java.lang.String keywords,
681                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
682                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
683                    throws com.liferay.portal.kernel.exception.SystemException;
684    
685            /**
686            * Returns an ordered range of all the user groups that match the name and
687            * description.
688            *
689            * <p>
690            * Useful when paginating results. Returns a maximum of <code>end -
691            * start</code> instances. <code>start</code> and <code>end</code> are not
692            * primary keys, they are indexes in the result set. Thus, <code>0</code>
693            * refers to the first result in the set. Setting both <code>start</code>
694            * and <code>end</code> to {@link
695            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
696            * result set.
697            * </p>
698            *
699            * @param companyId the primary key of the user group's company
700            * @param name the user group's name (optionally <code>null</code>)
701            * @param description the user group's description (optionally
702            <code>null</code>)
703            * @param params the finder params (optionally <code>null</code>). For more
704            information see {@link
705            com.liferay.portal.service.persistence.UserGroupFinder}
706            * @param start the lower bound of the range of user groups to return
707            * @param end the upper bound of the range of user groups to return (not
708            inclusive)
709            * @param obc the comparator to order the user groups (optionally
710            <code>null</code>)
711            * @return the matching user groups ordered by comparator <code>obc</code>
712            * @throws SystemException if a system exception occurred
713            * @see com.liferay.portal.service.persistence.UserGroupFinder
714            */
715            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
716            public java.util.List<com.liferay.portal.model.UserGroup> search(
717                    long companyId, java.lang.String name, java.lang.String description,
718                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
719                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
720                    throws com.liferay.portal.kernel.exception.SystemException;
721    
722            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
723            public int searchCount(long companyId, java.lang.String keywords,
724                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
725                    throws com.liferay.portal.kernel.exception.SystemException;
726    
727            /**
728            * Returns the number of user groups that match the name and description.
729            *
730            * @param companyId the primary key of the user group's company
731            * @param name the user group's name (optionally <code>null</code>)
732            * @param description the user group's description (optionally
733            <code>null</code>)
734            * @param params the finder params (optionally <code>null</code>). For more
735            information see {@link
736            com.liferay.portal.service.persistence.UserGroupFinder}
737            * @return the number of matching user groups
738            * @throws SystemException if a system exception occurred
739            * @see com.liferay.portal.service.persistence.UserGroupFinder
740            */
741            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
742            public int searchCount(long companyId, java.lang.String name,
743                    java.lang.String description,
744                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
745                    throws com.liferay.portal.kernel.exception.SystemException;
746    
747            /**
748            * Removes the user groups from the group.
749            *
750            * @param groupId the primary key of the group
751            * @param userGroupIds the primary keys of the user groups
752            * @throws SystemException if a system exception occurred
753            */
754            public void unsetGroupUserGroups(long groupId, long[] userGroupIds)
755                    throws com.liferay.portal.kernel.exception.SystemException;
756    
757            /**
758            * Removes the user groups from the team.
759            *
760            * @param teamId the primary key of the team
761            * @param userGroupIds the primary keys of the user groups
762            * @throws SystemException if a system exception occurred
763            */
764            public void unsetTeamUserGroups(long teamId, long[] userGroupIds)
765                    throws com.liferay.portal.kernel.exception.SystemException;
766    
767            /**
768            * Updates the user group.
769            *
770            * @param companyId the primary key of the user group's company
771            * @param userGroupId the primary key of the user group
772            * @param name the user group's name
773            * @param description the user group's description
774            * @return the user group
775            * @throws PortalException if a user group with the primary key could not be
776            found or if the new information was invalid
777            * @throws SystemException if a system exception occurred
778            */
779            public com.liferay.portal.model.UserGroup updateUserGroup(long companyId,
780                    long userGroupId, java.lang.String name, java.lang.String description)
781                    throws com.liferay.portal.kernel.exception.PortalException,
782                            com.liferay.portal.kernel.exception.SystemException;
783    }