001    /**
002     * Copyright (c) 2000-2010 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.annotation.Isolation;
018    import com.liferay.portal.kernel.annotation.Propagation;
019    import com.liferay.portal.kernel.annotation.Transactional;
020    import com.liferay.portal.kernel.exception.PortalException;
021    import com.liferay.portal.kernel.exception.SystemException;
022    
023    /**
024     * The interface for the group local service.
025     *
026     * <p>
027     * Never modify or reference this interface directly. Always use {@link GroupLocalServiceUtil} to access the group local service. Add custom service methods to {@link com.liferay.portal.service.impl.GroupLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
028     * </p>
029     *
030     * <p>
031     * 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.
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see GroupLocalServiceUtil
036     * @see com.liferay.portal.service.base.GroupLocalServiceBaseImpl
037     * @see com.liferay.portal.service.impl.GroupLocalServiceImpl
038     * @generated
039     */
040    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
041            PortalException.class, SystemException.class})
042    public interface GroupLocalService {
043            /**
044            * Adds the group to the database. Also notifies the appropriate model listeners.
045            *
046            * @param group the group to add
047            * @return the group that was added
048            * @throws SystemException if a system exception occurred
049            */
050            public com.liferay.portal.model.Group addGroup(
051                    com.liferay.portal.model.Group group)
052                    throws com.liferay.portal.kernel.exception.SystemException;
053    
054            /**
055            * Creates a new group with the primary key. Does not add the group to the database.
056            *
057            * @param groupId the primary key for the new group
058            * @return the new group
059            */
060            public com.liferay.portal.model.Group createGroup(long groupId);
061    
062            /**
063            * Deletes the group with the primary key from the database. Also notifies the appropriate model listeners.
064            *
065            * @param groupId the primary key of the group to delete
066            * @throws PortalException if a group with the primary key could not be found
067            * @throws SystemException if a system exception occurred
068            */
069            public void deleteGroup(long groupId)
070                    throws com.liferay.portal.kernel.exception.PortalException,
071                            com.liferay.portal.kernel.exception.SystemException;
072    
073            /**
074            * Deletes the group from the database. Also notifies the appropriate model listeners.
075            *
076            * @param group the group to delete
077            * @throws SystemException if a system exception occurred
078            */
079            public void deleteGroup(com.liferay.portal.model.Group group)
080                    throws com.liferay.portal.kernel.exception.SystemException;
081    
082            /**
083            * Performs a dynamic query on the database and returns the matching rows.
084            *
085            * @param dynamicQuery the dynamic query to search with
086            * @return the matching rows
087            * @throws SystemException if a system exception occurred
088            */
089            @SuppressWarnings("rawtypes")
090            public java.util.List dynamicQuery(
091                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
092                    throws com.liferay.portal.kernel.exception.SystemException;
093    
094            /**
095            * Performs a dynamic query on the database and returns a range of the matching rows.
096            *
097            * <p>
098            * 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.
099            * </p>
100            *
101            * @param dynamicQuery the dynamic query to search with
102            * @param start the lower bound of the range of model instances to return
103            * @param end the upper bound of the range of model instances to return (not inclusive)
104            * @return the range of matching rows
105            * @throws SystemException if a system exception occurred
106            */
107            @SuppressWarnings("rawtypes")
108            public java.util.List dynamicQuery(
109                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
110                    int end) throws com.liferay.portal.kernel.exception.SystemException;
111    
112            /**
113            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
114            *
115            * <p>
116            * 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.
117            * </p>
118            *
119            * @param dynamicQuery the dynamic query to search with
120            * @param start the lower bound of the range of model instances to return
121            * @param end the upper bound of the range of model instances to return (not inclusive)
122            * @param orderByComparator the comparator to order the results by
123            * @return the ordered range of matching rows
124            * @throws SystemException if a system exception occurred
125            */
126            @SuppressWarnings("rawtypes")
127            public java.util.List dynamicQuery(
128                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
129                    int end,
130                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
131                    throws com.liferay.portal.kernel.exception.SystemException;
132    
133            /**
134            * Counts the number of rows that match the dynamic query.
135            *
136            * @param dynamicQuery the dynamic query to search with
137            * @return the number of rows that match the dynamic query
138            * @throws SystemException if a system exception occurred
139            */
140            public long dynamicQueryCount(
141                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
142                    throws com.liferay.portal.kernel.exception.SystemException;
143    
144            /**
145            * Gets the group with the primary key.
146            *
147            * @param groupId the primary key of the group to get
148            * @return the group
149            * @throws PortalException if a group with the primary key could not be found
150            * @throws SystemException if a system exception occurred
151            */
152            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
153            public com.liferay.portal.model.Group getGroup(long groupId)
154                    throws com.liferay.portal.kernel.exception.PortalException,
155                            com.liferay.portal.kernel.exception.SystemException;
156    
157            /**
158            * Gets a range of all the groups.
159            *
160            * <p>
161            * 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.
162            * </p>
163            *
164            * @param start the lower bound of the range of groups to return
165            * @param end the upper bound of the range of groups to return (not inclusive)
166            * @return the range of groups
167            * @throws SystemException if a system exception occurred
168            */
169            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
170            public java.util.List<com.liferay.portal.model.Group> getGroups(int start,
171                    int end) throws com.liferay.portal.kernel.exception.SystemException;
172    
173            /**
174            * Gets the number of groups.
175            *
176            * @return the number of groups
177            * @throws SystemException if a system exception occurred
178            */
179            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180            public int getGroupsCount()
181                    throws com.liferay.portal.kernel.exception.SystemException;
182    
183            /**
184            * Updates the group in the database. Also notifies the appropriate model listeners.
185            *
186            * @param group the group to update
187            * @return the group that was updated
188            * @throws SystemException if a system exception occurred
189            */
190            public com.liferay.portal.model.Group updateGroup(
191                    com.liferay.portal.model.Group group)
192                    throws com.liferay.portal.kernel.exception.SystemException;
193    
194            /**
195            * Updates the group in the database. Also notifies the appropriate model listeners.
196            *
197            * @param group the group to update
198            * @param merge whether to merge the 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.
199            * @return the group that was updated
200            * @throws SystemException if a system exception occurred
201            */
202            public com.liferay.portal.model.Group updateGroup(
203                    com.liferay.portal.model.Group group, boolean merge)
204                    throws com.liferay.portal.kernel.exception.SystemException;
205    
206            public com.liferay.portal.model.Group addGroup(long userId,
207                    java.lang.String className, long classPK, java.lang.String name,
208                    java.lang.String description, int type, java.lang.String friendlyURL,
209                    boolean active, com.liferay.portal.service.ServiceContext serviceContext)
210                    throws com.liferay.portal.kernel.exception.PortalException,
211                            com.liferay.portal.kernel.exception.SystemException;
212    
213            public com.liferay.portal.model.Group addGroup(long userId,
214                    java.lang.String className, long classPK, long liveGroupId,
215                    java.lang.String name, java.lang.String description, int type,
216                    java.lang.String friendlyURL, boolean active,
217                    com.liferay.portal.service.ServiceContext serviceContext)
218                    throws com.liferay.portal.kernel.exception.PortalException,
219                            com.liferay.portal.kernel.exception.SystemException;
220    
221            public void addRoleGroups(long roleId, long[] groupIds)
222                    throws com.liferay.portal.kernel.exception.SystemException;
223    
224            public void addUserGroups(long userId, long[] groupIds)
225                    throws com.liferay.portal.kernel.exception.SystemException;
226    
227            public void checkCompanyGroup(long companyId)
228                    throws com.liferay.portal.kernel.exception.PortalException,
229                            com.liferay.portal.kernel.exception.SystemException;
230    
231            public void checkSystemGroups(long companyId)
232                    throws com.liferay.portal.kernel.exception.PortalException,
233                            com.liferay.portal.kernel.exception.SystemException;
234    
235            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
236            public com.liferay.portal.model.Group getCompanyGroup(long companyId)
237                    throws com.liferay.portal.kernel.exception.PortalException,
238                            com.liferay.portal.kernel.exception.SystemException;
239    
240            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
241            public java.util.List<com.liferay.portal.model.Group> getCompanyGroups(
242                    long companyId, int start, int end)
243                    throws com.liferay.portal.kernel.exception.SystemException;
244    
245            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
246            public int getCompanyGroupsCount(long companyId)
247                    throws com.liferay.portal.kernel.exception.SystemException;
248    
249            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250            public com.liferay.portal.model.Group getFriendlyURLGroup(long companyId,
251                    java.lang.String friendlyURL)
252                    throws com.liferay.portal.kernel.exception.PortalException,
253                            com.liferay.portal.kernel.exception.SystemException;
254    
255            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
256            public com.liferay.portal.model.Group getGroup(long companyId,
257                    java.lang.String name)
258                    throws com.liferay.portal.kernel.exception.PortalException,
259                            com.liferay.portal.kernel.exception.SystemException;
260    
261            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
262            public java.util.List<com.liferay.portal.model.Group> getGroups(
263                    long[] groupIds)
264                    throws com.liferay.portal.kernel.exception.PortalException,
265                            com.liferay.portal.kernel.exception.SystemException;
266    
267            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
268            public com.liferay.portal.model.Group getLayoutGroup(long companyId,
269                    long plid)
270                    throws com.liferay.portal.kernel.exception.PortalException,
271                            com.liferay.portal.kernel.exception.SystemException;
272    
273            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274            public com.liferay.portal.model.Group getLayoutPrototypeGroup(
275                    long companyId, long layoutPrototypeId)
276                    throws com.liferay.portal.kernel.exception.PortalException,
277                            com.liferay.portal.kernel.exception.SystemException;
278    
279            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
280            public com.liferay.portal.model.Group getLayoutSetPrototypeGroup(
281                    long companyId, long layoutSetPrototypeId)
282                    throws com.liferay.portal.kernel.exception.PortalException,
283                            com.liferay.portal.kernel.exception.SystemException;
284    
285            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286            public java.util.List<com.liferay.portal.model.Group> getLiveGroups()
287                    throws com.liferay.portal.kernel.exception.SystemException;
288    
289            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
290            public java.util.List<com.liferay.portal.model.Group> getNoLayoutsGroups(
291                    java.lang.String className, boolean privateLayout, int start, int end)
292                    throws com.liferay.portal.kernel.exception.SystemException;
293    
294            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
295            public java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups()
296                    throws com.liferay.portal.kernel.exception.SystemException;
297    
298            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
299            public com.liferay.portal.model.Group getOrganizationGroup(long companyId,
300                    long organizationId)
301                    throws com.liferay.portal.kernel.exception.PortalException,
302                            com.liferay.portal.kernel.exception.SystemException;
303    
304            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
305            public java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
306                    java.util.List<com.liferay.portal.model.Organization> organizations);
307    
308            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
309            public java.util.List<com.liferay.portal.model.Group> getOrganizationsRelatedGroups(
310                    java.util.List<com.liferay.portal.model.Organization> organizations)
311                    throws com.liferay.portal.kernel.exception.SystemException;
312    
313            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
314            public java.util.List<com.liferay.portal.model.Group> getRoleGroups(
315                    long roleId) throws com.liferay.portal.kernel.exception.SystemException;
316    
317            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
318            public com.liferay.portal.model.Group getStagingGroup(long liveGroupId)
319                    throws com.liferay.portal.kernel.exception.PortalException,
320                            com.liferay.portal.kernel.exception.SystemException;
321    
322            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
323            public com.liferay.portal.model.Group getUserGroup(long companyId,
324                    long userId)
325                    throws com.liferay.portal.kernel.exception.PortalException,
326                            com.liferay.portal.kernel.exception.SystemException;
327    
328            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
329            public com.liferay.portal.model.Group getUserGroupGroup(long companyId,
330                    long userGroupId)
331                    throws com.liferay.portal.kernel.exception.PortalException,
332                            com.liferay.portal.kernel.exception.SystemException;
333    
334            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
335            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
336                    long userId)
337                    throws com.liferay.portal.kernel.exception.PortalException,
338                            com.liferay.portal.kernel.exception.SystemException;
339    
340            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
341            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
342                    long userId, boolean inherit)
343                    throws com.liferay.portal.kernel.exception.PortalException,
344                            com.liferay.portal.kernel.exception.SystemException;
345    
346            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
347            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
348                    long userId, int start, int end)
349                    throws com.liferay.portal.kernel.exception.PortalException,
350                            com.liferay.portal.kernel.exception.SystemException;
351    
352            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
353            public java.util.List<com.liferay.portal.model.Group> getUserGroups(
354                    long userId, boolean inherit, int start, int end)
355                    throws com.liferay.portal.kernel.exception.PortalException,
356                            com.liferay.portal.kernel.exception.SystemException;
357    
358            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
359            public java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
360                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
361                    throws com.liferay.portal.kernel.exception.PortalException,
362                            com.liferay.portal.kernel.exception.SystemException;
363    
364            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
365            public java.util.List<com.liferay.portal.model.Group> getUserGroupsRelatedGroups(
366                    java.util.List<com.liferay.portal.model.UserGroup> userGroups)
367                    throws com.liferay.portal.kernel.exception.SystemException;
368    
369            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
370            public java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
371                    long userId, int start, int end)
372                    throws com.liferay.portal.kernel.exception.PortalException,
373                            com.liferay.portal.kernel.exception.SystemException;
374    
375            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
376            public boolean hasRoleGroup(long roleId, long groupId)
377                    throws com.liferay.portal.kernel.exception.SystemException;
378    
379            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
380            public boolean hasStagingGroup(long liveGroupId)
381                    throws com.liferay.portal.kernel.exception.SystemException;
382    
383            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
384            public boolean hasUserGroup(long userId, long groupId)
385                    throws com.liferay.portal.kernel.exception.SystemException;
386    
387            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
388            public java.util.List<com.liferay.portal.model.Group> search(
389                    long companyId, java.lang.String name, java.lang.String description,
390                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
391                    int start, int end)
392                    throws com.liferay.portal.kernel.exception.SystemException;
393    
394            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
395            public java.util.List<com.liferay.portal.model.Group> search(
396                    long companyId, java.lang.String name, java.lang.String description,
397                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
398                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
399                    throws com.liferay.portal.kernel.exception.SystemException;
400    
401            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
402            public int searchCount(long companyId, java.lang.String name,
403                    java.lang.String description,
404                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
405                    throws com.liferay.portal.kernel.exception.SystemException;
406    
407            public void setRoleGroups(long roleId, long[] groupIds)
408                    throws com.liferay.portal.kernel.exception.SystemException;
409    
410            public void unsetRoleGroups(long roleId, long[] groupIds)
411                    throws com.liferay.portal.kernel.exception.SystemException;
412    
413            public void unsetUserGroups(long userId, long[] groupIds)
414                    throws com.liferay.portal.kernel.exception.SystemException;
415    
416            public void updateAsset(long userId, com.liferay.portal.model.Group group,
417                    long[] assetCategoryIds, java.lang.String[] assetTagNames)
418                    throws com.liferay.portal.kernel.exception.PortalException,
419                            com.liferay.portal.kernel.exception.SystemException;
420    
421            public com.liferay.portal.model.Group updateFriendlyURL(long groupId,
422                    java.lang.String friendlyURL)
423                    throws com.liferay.portal.kernel.exception.PortalException,
424                            com.liferay.portal.kernel.exception.SystemException;
425    
426            public com.liferay.portal.model.Group updateGroup(long groupId,
427                    java.lang.String name, java.lang.String description, int type,
428                    java.lang.String friendlyURL, boolean active,
429                    com.liferay.portal.service.ServiceContext serviceContext)
430                    throws com.liferay.portal.kernel.exception.PortalException,
431                            com.liferay.portal.kernel.exception.SystemException;
432    
433            public com.liferay.portal.model.Group updateGroup(long groupId,
434                    java.lang.String typeSettings)
435                    throws com.liferay.portal.kernel.exception.PortalException,
436                            com.liferay.portal.kernel.exception.SystemException;
437    
438            public com.liferay.portal.model.Group updateWorkflow(long groupId,
439                    boolean workflowEnabled, int workflowStages,
440                    java.lang.String workflowRoleNames)
441                    throws com.liferay.portal.kernel.exception.PortalException,
442                            com.liferay.portal.kernel.exception.SystemException;
443    }