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            * @throws PortalException
061            * @deprecated As of 7.0.0, replaced by {@link #addTeam(long, long, String,
062            String, ServiceContext)}
063            */
064            @java.lang.Deprecated
065            public com.liferay.portal.model.Team addTeam(long userId, long groupId,
066                    java.lang.String name, java.lang.String description)
067                    throws PortalException;
068    
069            public com.liferay.portal.model.Team addTeam(long userId, long groupId,
070                    java.lang.String name, java.lang.String description,
071                    com.liferay.portal.service.ServiceContext serviceContext)
072                    throws PortalException;
073    
074            public void addUserGroupTeam(long userGroupId,
075                    com.liferay.portal.model.Team team);
076    
077            public void addUserGroupTeam(long userGroupId, long teamId);
078    
079            public void addUserGroupTeams(long userGroupId,
080                    java.util.List<com.liferay.portal.model.Team> Teams);
081    
082            public void addUserGroupTeams(long userGroupId, long[] teamIds);
083    
084            public void addUserTeam(long userId, com.liferay.portal.model.Team team);
085    
086            public void addUserTeam(long userId, long teamId);
087    
088            public void addUserTeams(long userId,
089                    java.util.List<com.liferay.portal.model.Team> Teams);
090    
091            public void addUserTeams(long userId, long[] teamIds);
092    
093            public void clearUserGroupTeams(long userGroupId);
094    
095            public void clearUserTeams(long userId);
096    
097            /**
098            * Creates a new team with the primary key. Does not add the team to the database.
099            *
100            * @param teamId the primary key for the new team
101            * @return the new team
102            */
103            public com.liferay.portal.model.Team createTeam(long teamId);
104    
105            /**
106            * @throws PortalException
107            */
108            @Override
109            public com.liferay.portal.model.PersistedModel deletePersistedModel(
110                    com.liferay.portal.model.PersistedModel persistedModel)
111                    throws PortalException;
112    
113            /**
114            * Deletes the team from the database. Also notifies the appropriate model listeners.
115            *
116            * @param team the team
117            * @return the team that was removed
118            * @throws PortalException
119            */
120            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
121            public com.liferay.portal.model.Team deleteTeam(
122                    com.liferay.portal.model.Team team) throws PortalException;
123    
124            /**
125            * Deletes the team with the primary key from the database. Also notifies the appropriate model listeners.
126            *
127            * @param teamId the primary key of the team
128            * @return the team that was removed
129            * @throws PortalException if a team with the primary key could not be found
130            */
131            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
132            public com.liferay.portal.model.Team deleteTeam(long teamId)
133                    throws PortalException;
134    
135            public void deleteTeams(long groupId) throws PortalException;
136    
137            public void deleteUserGroupTeam(long userGroupId,
138                    com.liferay.portal.model.Team team);
139    
140            public void deleteUserGroupTeam(long userGroupId, long teamId);
141    
142            public void deleteUserGroupTeams(long userGroupId,
143                    java.util.List<com.liferay.portal.model.Team> Teams);
144    
145            public void deleteUserGroupTeams(long userGroupId, long[] teamIds);
146    
147            public void deleteUserTeam(long userId, com.liferay.portal.model.Team team);
148    
149            public void deleteUserTeam(long userId, long teamId);
150    
151            public void deleteUserTeams(long userId,
152                    java.util.List<com.liferay.portal.model.Team> Teams);
153    
154            public void deleteUserTeams(long userId, long[] teamIds);
155    
156            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
157    
158            /**
159            * Performs a dynamic query on the database and returns the matching rows.
160            *
161            * @param dynamicQuery the dynamic query
162            * @return the matching rows
163            */
164            public <T> java.util.List<T> dynamicQuery(
165                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
166    
167            /**
168            * Performs a dynamic query on the database and returns a range of the matching rows.
169            *
170            * <p>
171            * 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.
172            * </p>
173            *
174            * @param dynamicQuery the dynamic query
175            * @param start the lower bound of the range of model instances
176            * @param end the upper bound of the range of model instances (not inclusive)
177            * @return the range of matching rows
178            */
179            public <T> java.util.List<T> dynamicQuery(
180                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
181                    int end);
182    
183            /**
184            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
185            *
186            * <p>
187            * 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.
188            * </p>
189            *
190            * @param dynamicQuery the dynamic query
191            * @param start the lower bound of the range of model instances
192            * @param end the upper bound of the range of model instances (not inclusive)
193            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
194            * @return the ordered range of matching rows
195            */
196            public <T> java.util.List<T> dynamicQuery(
197                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
198                    int end,
199                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
200    
201            /**
202            * Returns the number of rows matching the dynamic query.
203            *
204            * @param dynamicQuery the dynamic query
205            * @return the number of rows matching the dynamic query
206            */
207            public long dynamicQueryCount(
208                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
209    
210            /**
211            * Returns the number of rows matching the dynamic query.
212            *
213            * @param dynamicQuery the dynamic query
214            * @param projection the projection to apply to the query
215            * @return the number of rows matching the dynamic query
216            */
217            public long dynamicQueryCount(
218                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
219                    com.liferay.portal.kernel.dao.orm.Projection projection);
220    
221            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
222            public com.liferay.portal.model.Team fetchTeam(long groupId,
223                    java.lang.String name);
224    
225            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
226            public com.liferay.portal.model.Team fetchTeam(long teamId);
227    
228            /**
229            * Returns the team matching the UUID and group.
230            *
231            * @param uuid the team's UUID
232            * @param groupId the primary key of the group
233            * @return the matching team, or <code>null</code> if a matching team could not be found
234            */
235            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
236            public com.liferay.portal.model.Team fetchTeamByUuidAndGroupId(
237                    java.lang.String uuid, long groupId);
238    
239            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
240            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
241    
242            /**
243            * Returns the Spring bean ID for this bean.
244            *
245            * @return the Spring bean ID for this bean
246            */
247            public java.lang.String getBeanIdentifier();
248    
249            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
251                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
252    
253            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254            public java.util.List<com.liferay.portal.model.Team> getGroupTeams(
255                    long groupId);
256    
257            @Override
258            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259            public com.liferay.portal.model.PersistedModel getPersistedModel(
260                    java.io.Serializable primaryKeyObj) throws PortalException;
261    
262            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
263            public com.liferay.portal.model.Team getTeam(long groupId,
264                    java.lang.String name) throws PortalException;
265    
266            /**
267            * Returns the team with the primary key.
268            *
269            * @param teamId the primary key of the team
270            * @return the team
271            * @throws PortalException if a team with the primary key could not be found
272            */
273            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274            public com.liferay.portal.model.Team getTeam(long teamId)
275                    throws PortalException;
276    
277            /**
278            * Returns the team matching the UUID and group.
279            *
280            * @param uuid the team's UUID
281            * @param groupId the primary key of the group
282            * @return the matching team
283            * @throws PortalException if a matching team could not be found
284            */
285            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286            public com.liferay.portal.model.Team getTeamByUuidAndGroupId(
287                    java.lang.String uuid, long groupId) throws PortalException;
288    
289            /**
290            * Returns a range of all the teams.
291            *
292            * <p>
293            * 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.
294            * </p>
295            *
296            * @param start the lower bound of the range of teams
297            * @param end the upper bound of the range of teams (not inclusive)
298            * @return the range of teams
299            */
300            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301            public java.util.List<com.liferay.portal.model.Team> getTeams(int start,
302                    int end);
303    
304            /**
305            * Returns all the teams matching the UUID and company.
306            *
307            * @param uuid the UUID of the teams
308            * @param companyId the primary key of the company
309            * @return the matching teams, or an empty list if no matches were found
310            */
311            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
312            public java.util.List<com.liferay.portal.model.Team> getTeamsByUuidAndCompanyId(
313                    java.lang.String uuid, long companyId);
314    
315            /**
316            * Returns a range of teams matching the UUID and company.
317            *
318            * @param uuid the UUID of the teams
319            * @param companyId the primary key of the company
320            * @param start the lower bound of the range of teams
321            * @param end the upper bound of the range of teams (not inclusive)
322            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
323            * @return the range of matching teams, or an empty list if no matches were found
324            */
325            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
326            public java.util.List<com.liferay.portal.model.Team> getTeamsByUuidAndCompanyId(
327                    java.lang.String uuid, long companyId, int start, int end,
328                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator);
329    
330            /**
331            * Returns the number of teams.
332            *
333            * @return the number of teams
334            */
335            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
336            public int getTeamsCount();
337    
338            /**
339            * Returns the userGroupIds of the user groups associated with the team.
340            *
341            * @param teamId the teamId of the team
342            * @return long[] the userGroupIds of user groups associated with the team
343            */
344            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
345            public long[] getUserGroupPrimaryKeys(long teamId);
346    
347            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
348            public java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
349                    long userGroupId);
350    
351            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
352            public java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
353                    long userGroupId, int start, int end);
354    
355            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
356            public java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
357                    long userGroupId, int start, int end,
358                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator);
359    
360            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
361            public int getUserGroupTeamsCount(long userGroupId);
362    
363            /**
364            * Returns the userIds of the users associated with the team.
365            *
366            * @param teamId the teamId of the team
367            * @return long[] the userIds of users associated with the team
368            */
369            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
370            public long[] getUserPrimaryKeys(long teamId);
371    
372            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
373            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
374                    long userId);
375    
376            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
377            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
378                    long userId, long groupId);
379    
380            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
381            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
382                    long userId, int start, int end);
383    
384            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
385            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
386                    long userId, int start, int end,
387                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> orderByComparator);
388    
389            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
390            public int getUserTeamsCount(long userId);
391    
392            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
393            public boolean hasUserGroupTeam(long userGroupId, long teamId);
394    
395            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
396            public boolean hasUserGroupTeams(long userGroupId);
397    
398            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
399            public boolean hasUserTeam(long userId, long teamId);
400    
401            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
402            public boolean hasUserTeams(long userId);
403    
404            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
405            public java.util.List<com.liferay.portal.model.Team> search(long groupId,
406                    java.lang.String name, java.lang.String description,
407                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
408                    int start, int end,
409                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Team> obc);
410    
411            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
412            public int searchCount(long groupId, java.lang.String name,
413                    java.lang.String description,
414                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params);
415    
416            /**
417            * Sets the Spring bean ID for this bean.
418            *
419            * @param beanIdentifier the Spring bean ID for this bean
420            */
421            public void setBeanIdentifier(java.lang.String beanIdentifier);
422    
423            public void setUserGroupTeams(long userGroupId, long[] teamIds);
424    
425            public void setUserTeams(long userId, long[] teamIds);
426    
427            /**
428            * Updates the team in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
429            *
430            * @param team the team
431            * @return the team that was updated
432            */
433            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
434            public com.liferay.portal.model.Team updateTeam(
435                    com.liferay.portal.model.Team team);
436    
437            public com.liferay.portal.model.Team updateTeam(long teamId,
438                    java.lang.String name, java.lang.String description)
439                    throws PortalException;
440    }