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            /**
250            * Returns the OSGi service identifier.
251            *
252            * @return the OSGi service identifier
253            */
254            public java.lang.String getOSGiServiceIdentifier();
255    
256            @Override
257            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
258            public com.liferay.portal.model.PersistedModel getPersistedModel(
259                    java.io.Serializable primaryKeyObj) throws PortalException;
260    
261            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
262            public com.liferay.portal.model.Team getTeam(long groupId,
263                    java.lang.String name) throws PortalException;
264    
265            /**
266            * Returns the team with the primary key.
267            *
268            * @param teamId the primary key of the team
269            * @return the team
270            * @throws PortalException if a team with the primary key could not be found
271            */
272            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273            public com.liferay.portal.model.Team getTeam(long teamId)
274                    throws PortalException;
275    
276            /**
277            * Returns the team matching the UUID and group.
278            *
279            * @param uuid the team's UUID
280            * @param groupId the primary key of the group
281            * @return the matching team
282            * @throws PortalException if a matching team could not be found
283            */
284            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
285            public com.liferay.portal.model.Team getTeamByUuidAndGroupId(
286                    java.lang.String uuid, long groupId) throws PortalException;
287    
288            /**
289            * Returns a range of all the teams.
290            *
291            * <p>
292            * 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.
293            * </p>
294            *
295            * @param start the lower bound of the range of teams
296            * @param end the upper bound of the range of teams (not inclusive)
297            * @return the range of teams
298            */
299            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
300            public java.util.List<com.liferay.portal.model.Team> getTeams(int start,
301                    int end);
302    
303            /**
304            * Returns all the teams matching the UUID and company.
305            *
306            * @param uuid the UUID of the teams
307            * @param companyId the primary key of the company
308            * @return the matching teams, or an empty list if no matches were found
309            */
310            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
311            public java.util.List<com.liferay.portal.model.Team> getTeamsByUuidAndCompanyId(
312                    java.lang.String uuid, long companyId);
313    
314            /**
315            * Returns a range of teams matching the UUID and company.
316            *
317            * @param uuid the UUID of the teams
318            * @param companyId the primary key of the company
319            * @param start the lower bound of the range of teams
320            * @param end the upper bound of the range of teams (not inclusive)
321            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
322            * @return the range of matching teams, or an empty list if no matches were found
323            */
324            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
325            public java.util.List<com.liferay.portal.model.Team> getTeamsByUuidAndCompanyId(
326                    java.lang.String uuid, long companyId, int start, int end,
327                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator);
328    
329            /**
330            * Returns the number of teams.
331            *
332            * @return the number of teams
333            */
334            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
335            public int getTeamsCount();
336    
337            /**
338            * Returns the userGroupIds of the user groups associated with the team.
339            *
340            * @param teamId the teamId of the team
341            * @return long[] the userGroupIds of user groups associated with the team
342            */
343            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
344            public long[] getUserGroupPrimaryKeys(long teamId);
345    
346            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
347            public java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
348                    long userGroupId);
349    
350            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
351            public java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
352                    long userGroupId, int start, int end);
353    
354            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
355            public java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
356                    long userGroupId, int start, int end,
357                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator);
358    
359            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
360            public int getUserGroupTeamsCount(long userGroupId);
361    
362            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
363            public java.util.List<com.liferay.portal.model.Team> getUserOrUserGroupTeams(
364                    long groupId, long userId);
365    
366            /**
367            * Returns the userIds of the users associated with the team.
368            *
369            * @param teamId the teamId of the team
370            * @return long[] the userIds of users associated with the team
371            */
372            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
373            public long[] getUserPrimaryKeys(long teamId);
374    
375            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
376            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
377                    long userId);
378    
379            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
380            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
381                    long userId, long groupId);
382    
383            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
384            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
385                    long userId, int start, int end);
386    
387            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
388            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
389                    long userId, int start, int end,
390                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator);
391    
392            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
393            public int getUserTeamsCount(long userId);
394    
395            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
396            public boolean hasUserGroupTeam(long userGroupId, long teamId);
397    
398            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
399            public boolean hasUserGroupTeams(long userGroupId);
400    
401            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
402            public boolean hasUserTeam(long userId, long teamId);
403    
404            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
405            public boolean hasUserTeams(long userId);
406    
407            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
408            public java.util.List<com.liferay.portal.model.Team> search(long groupId,
409                    java.lang.String name, java.lang.String description,
410                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
411                    int start, int end,
412                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> obc);
413    
414            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
415            public int searchCount(long groupId, java.lang.String name,
416                    java.lang.String description,
417                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params);
418    
419            public void setUserGroupTeams(long userGroupId, long[] teamIds);
420    
421            public void setUserTeams(long userId, long[] teamIds);
422    
423            /**
424            * Updates the team in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
425            *
426            * @param team the team
427            * @return the team that was updated
428            */
429            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
430            public com.liferay.portal.model.Team updateTeam(
431                    com.liferay.portal.model.Team team);
432    
433            public com.liferay.portal.model.Team updateTeam(long teamId,
434                    java.lang.String name, java.lang.String description)
435                    throws PortalException;
436    }