001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    
026    /**
027     * Provides the local service interface for Team. Methods of this
028     * service will not have security checks based on the propagated JAAS
029     * credentials because this service can only be accessed from within the same
030     * VM.
031     *
032     * @author Brian Wing Shun Chan
033     * @see TeamLocalServiceUtil
034     * @see com.liferay.portal.service.base.TeamLocalServiceBaseImpl
035     * @see com.liferay.portal.service.impl.TeamLocalServiceImpl
036     * @generated
037     */
038    @ProviderType
039    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
040            PortalException.class, SystemException.class})
041    public interface TeamLocalService extends BaseLocalService,
042            PersistedModelLocalService {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify or reference this interface directly. Always use {@link TeamLocalServiceUtil} to access the team local service. Add custom service methods to {@link com.liferay.portal.service.impl.TeamLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
047             */
048    
049            /**
050            * Adds the team to the database. Also notifies the appropriate model listeners.
051            *
052            * @param team the team
053            * @return the team that was added
054            */
055            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
056            public com.liferay.portal.model.Team addTeam(
057                    com.liferay.portal.model.Team team);
058    
059            /**
060            * @deprecated As of 7.0.0, replaced by {@link #addTeam(long, long, String,
061            String, ServiceContext)}
062            */
063            @java.lang.Deprecated
064            public com.liferay.portal.model.Team addTeam(long userId, long groupId,
065                    java.lang.String name, java.lang.String description)
066                    throws PortalException;
067    
068            public com.liferay.portal.model.Team addTeam(long userId, long groupId,
069                    java.lang.String name, java.lang.String description,
070                    com.liferay.portal.service.ServiceContext serviceContext)
071                    throws PortalException;
072    
073            public void addUserGroupTeam(long userGroupId,
074                    com.liferay.portal.model.Team team);
075    
076            public void addUserGroupTeam(long userGroupId, long teamId);
077    
078            public void addUserGroupTeams(long userGroupId,
079                    java.util.List<com.liferay.portal.model.Team> Teams);
080    
081            public void addUserGroupTeams(long userGroupId, long[] teamIds);
082    
083            public void addUserTeam(long userId, com.liferay.portal.model.Team team);
084    
085            public void addUserTeam(long userId, long teamId);
086    
087            public void addUserTeams(long userId,
088                    java.util.List<com.liferay.portal.model.Team> Teams);
089    
090            public void addUserTeams(long userId, long[] teamIds);
091    
092            public void clearUserGroupTeams(long userGroupId);
093    
094            public void clearUserTeams(long userId);
095    
096            /**
097            * Creates a new team with the primary key. Does not add the team to the database.
098            *
099            * @param teamId the primary key for the new team
100            * @return the new team
101            */
102            public com.liferay.portal.model.Team createTeam(long teamId);
103    
104            /**
105            * @throws PortalException
106            */
107            @Override
108            public com.liferay.portal.model.PersistedModel deletePersistedModel(
109                    com.liferay.portal.model.PersistedModel persistedModel)
110                    throws PortalException;
111    
112            /**
113            * Deletes the team from the database. Also notifies the appropriate model listeners.
114            *
115            * @param team the team
116            * @return the team that was removed
117            * @throws PortalException
118            */
119            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
120            public com.liferay.portal.model.Team deleteTeam(
121                    com.liferay.portal.model.Team team) throws PortalException;
122    
123            /**
124            * Deletes the team with the primary key from the database. Also notifies the appropriate model listeners.
125            *
126            * @param teamId the primary key of the team
127            * @return the team that was removed
128            * @throws PortalException if a team with the primary key could not be found
129            */
130            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
131            public com.liferay.portal.model.Team deleteTeam(long teamId)
132                    throws PortalException;
133    
134            public void deleteTeams(long groupId) throws PortalException;
135    
136            public void deleteUserGroupTeam(long userGroupId,
137                    com.liferay.portal.model.Team team);
138    
139            public void deleteUserGroupTeam(long userGroupId, long teamId);
140    
141            public void deleteUserGroupTeams(long userGroupId,
142                    java.util.List<com.liferay.portal.model.Team> Teams);
143    
144            public void deleteUserGroupTeams(long userGroupId, long[] teamIds);
145    
146            public void deleteUserTeam(long userId, com.liferay.portal.model.Team team);
147    
148            public void deleteUserTeam(long userId, long teamId);
149    
150            public void deleteUserTeams(long userId,
151                    java.util.List<com.liferay.portal.model.Team> Teams);
152    
153            public void deleteUserTeams(long userId, long[] teamIds);
154    
155            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
156    
157            /**
158            * Performs a dynamic query on the database and returns the matching rows.
159            *
160            * @param dynamicQuery the dynamic query
161            * @return the matching rows
162            */
163            public <T> java.util.List<T> dynamicQuery(
164                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
165    
166            /**
167            * Performs a dynamic query on the database and returns a range of the matching rows.
168            *
169            * <p>
170            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
171            * </p>
172            *
173            * @param dynamicQuery the dynamic query
174            * @param start the lower bound of the range of model instances
175            * @param end the upper bound of the range of model instances (not inclusive)
176            * @return the range of matching rows
177            */
178            public <T> java.util.List<T> dynamicQuery(
179                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
180                    int end);
181    
182            /**
183            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
184            *
185            * <p>
186            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
187            * </p>
188            *
189            * @param dynamicQuery the dynamic query
190            * @param start the lower bound of the range of model instances
191            * @param end the upper bound of the range of model instances (not inclusive)
192            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
193            * @return the ordered range of matching rows
194            */
195            public <T> java.util.List<T> dynamicQuery(
196                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
197                    int end,
198                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
199    
200            /**
201            * Returns the number of rows matching the dynamic query.
202            *
203            * @param dynamicQuery the dynamic query
204            * @return the number of rows matching the dynamic query
205            */
206            public long dynamicQueryCount(
207                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
208    
209            /**
210            * Returns the number of rows matching the dynamic query.
211            *
212            * @param dynamicQuery the dynamic query
213            * @param projection the projection to apply to the query
214            * @return the number of rows matching the dynamic query
215            */
216            public long dynamicQueryCount(
217                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
218                    com.liferay.portal.kernel.dao.orm.Projection projection);
219    
220            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
221            public com.liferay.portal.model.Team fetchTeam(long groupId,
222                    java.lang.String name);
223    
224            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
225            public com.liferay.portal.model.Team fetchTeam(long teamId);
226    
227            /**
228            * Returns the team matching the UUID and group.
229            *
230            * @param uuid the team's UUID
231            * @param groupId the primary key of the group
232            * @return the matching team, or <code>null</code> if a matching team could not be found
233            */
234            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
235            public com.liferay.portal.model.Team fetchTeamByUuidAndGroupId(
236                    java.lang.String uuid, long groupId);
237    
238            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
240    
241            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
243                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
244    
245            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
246            public java.util.List<com.liferay.portal.model.Team> getGroupTeams(
247                    long groupId);
248    
249            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250            public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
251    
252            /**
253            * Returns the OSGi service identifier.
254            *
255            * @return the OSGi service identifier
256            */
257            public java.lang.String getOSGiServiceIdentifier();
258    
259            @Override
260            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
261            public com.liferay.portal.model.PersistedModel getPersistedModel(
262                    java.io.Serializable primaryKeyObj) throws PortalException;
263    
264            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
265            public com.liferay.portal.model.Team getTeam(long groupId,
266                    java.lang.String name) throws PortalException;
267    
268            /**
269            * Returns the team with the primary key.
270            *
271            * @param teamId the primary key of the team
272            * @return the team
273            * @throws PortalException if a team with the primary key could not be found
274            */
275            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
276            public com.liferay.portal.model.Team getTeam(long teamId)
277                    throws PortalException;
278    
279            /**
280            * Returns the team matching the UUID and group.
281            *
282            * @param uuid the team's UUID
283            * @param groupId the primary key of the group
284            * @return the matching team
285            * @throws PortalException if a matching team could not be found
286            */
287            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
288            public com.liferay.portal.model.Team getTeamByUuidAndGroupId(
289                    java.lang.String uuid, long groupId) throws PortalException;
290    
291            /**
292            * Returns a range of all the teams.
293            *
294            * <p>
295            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.TeamModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
296            * </p>
297            *
298            * @param start the lower bound of the range of teams
299            * @param end the upper bound of the range of teams (not inclusive)
300            * @return the range of teams
301            */
302            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
303            public java.util.List<com.liferay.portal.model.Team> getTeams(int start,
304                    int end);
305    
306            /**
307            * Returns all the teams matching the UUID and company.
308            *
309            * @param uuid the UUID of the teams
310            * @param companyId the primary key of the company
311            * @return the matching teams, or an empty list if no matches were found
312            */
313            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
314            public java.util.List<com.liferay.portal.model.Team> getTeamsByUuidAndCompanyId(
315                    java.lang.String uuid, long companyId);
316    
317            /**
318            * Returns a range of teams matching the UUID and company.
319            *
320            * @param uuid the UUID of the teams
321            * @param companyId the primary key of the company
322            * @param start the lower bound of the range of teams
323            * @param end the upper bound of the range of teams (not inclusive)
324            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
325            * @return the range of matching teams, or an empty list if no matches were found
326            */
327            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
328            public java.util.List<com.liferay.portal.model.Team> getTeamsByUuidAndCompanyId(
329                    java.lang.String uuid, long companyId, int start, int end,
330                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator);
331    
332            /**
333            * Returns the number of teams.
334            *
335            * @return the number of teams
336            */
337            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
338            public int getTeamsCount();
339    
340            /**
341            * Returns the userGroupIds of the user groups associated with the team.
342            *
343            * @param teamId the teamId of the team
344            * @return long[] the userGroupIds of user groups associated with the team
345            */
346            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
347            public long[] getUserGroupPrimaryKeys(long teamId);
348    
349            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
350            public java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
351                    long userGroupId);
352    
353            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
354            public java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
355                    long userGroupId, int start, int end);
356    
357            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
358            public java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
359                    long userGroupId, int start, int end,
360                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator);
361    
362            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
363            public int getUserGroupTeamsCount(long userGroupId);
364    
365            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
366            public java.util.List<com.liferay.portal.model.Team> getUserOrUserGroupTeams(
367                    long groupId, long userId);
368    
369            /**
370            * Returns the userIds of the users associated with the team.
371            *
372            * @param teamId the teamId of the team
373            * @return long[] the userIds of users associated with the team
374            */
375            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
376            public long[] getUserPrimaryKeys(long teamId);
377    
378            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
379            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
380                    long userId);
381    
382            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
383            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
384                    long userId, long groupId);
385    
386            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
387            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
388                    long userId, int start, int end);
389    
390            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
391            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
392                    long userId, int start, int end,
393                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator);
394    
395            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
396            public int getUserTeamsCount(long userId);
397    
398            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
399            public boolean hasUserGroupTeam(long userGroupId, long teamId);
400    
401            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
402            public boolean hasUserGroupTeams(long userGroupId);
403    
404            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
405            public boolean hasUserTeam(long userId, long teamId);
406    
407            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
408            public boolean hasUserTeams(long userId);
409    
410            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
411            public java.util.List<com.liferay.portal.model.Team> search(long groupId,
412                    java.lang.String name, java.lang.String description,
413                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
414                    int start, int end,
415                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> obc);
416    
417            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
418            public int searchCount(long groupId, java.lang.String name,
419                    java.lang.String description,
420                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params);
421    
422            public void setUserGroupTeams(long userGroupId, long[] teamIds);
423    
424            public void setUserTeams(long userId, long[] teamIds);
425    
426            /**
427            * Updates the team in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
428            *
429            * @param team the team
430            * @return the team that was updated
431            */
432            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
433            public com.liferay.portal.model.Team updateTeam(
434                    com.liferay.portal.model.Team team);
435    
436            public com.liferay.portal.model.Team updateTeam(long teamId,
437                    java.lang.String name, java.lang.String description)
438                    throws PortalException;
439    }