001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.transaction.Isolation;
020    import com.liferay.portal.kernel.transaction.Propagation;
021    import com.liferay.portal.kernel.transaction.Transactional;
022    
023    /**
024     * The interface for the team local service.
025     *
026     * <p>
027     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see TeamLocalServiceUtil
032     * @see com.liferay.portal.service.base.TeamLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.TeamLocalServiceImpl
034     * @generated
035     */
036    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
037            PortalException.class, SystemException.class})
038    public interface TeamLocalService extends BaseLocalService,
039            PersistedModelLocalService {
040            /*
041             * NOTE FOR DEVELOPERS:
042             *
043             * 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.
044             */
045    
046            /**
047            * Adds the team to the database. Also notifies the appropriate model listeners.
048            *
049            * @param team the team
050            * @return the team that was added
051            * @throws SystemException if a system exception occurred
052            */
053            public com.liferay.portal.model.Team addTeam(
054                    com.liferay.portal.model.Team team)
055                    throws com.liferay.portal.kernel.exception.SystemException;
056    
057            /**
058            * Creates a new team with the primary key. Does not add the team to the database.
059            *
060            * @param teamId the primary key for the new team
061            * @return the new team
062            */
063            public com.liferay.portal.model.Team createTeam(long teamId);
064    
065            /**
066            * Deletes the team with the primary key from the database. Also notifies the appropriate model listeners.
067            *
068            * @param teamId the primary key of the team
069            * @return the team that was removed
070            * @throws PortalException if a team with the primary key could not be found
071            * @throws SystemException if a system exception occurred
072            */
073            public com.liferay.portal.model.Team deleteTeam(long teamId)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException;
076    
077            /**
078            * Deletes the team from the database. Also notifies the appropriate model listeners.
079            *
080            * @param team the team
081            * @return the team that was removed
082            * @throws PortalException
083            * @throws SystemException if a system exception occurred
084            */
085            public com.liferay.portal.model.Team deleteTeam(
086                    com.liferay.portal.model.Team team)
087                    throws com.liferay.portal.kernel.exception.PortalException,
088                            com.liferay.portal.kernel.exception.SystemException;
089    
090            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
091    
092            /**
093            * Performs a dynamic query on the database and returns the matching rows.
094            *
095            * @param dynamicQuery the dynamic query
096            * @return the matching rows
097            * @throws SystemException if a system exception occurred
098            */
099            @SuppressWarnings("rawtypes")
100            public java.util.List dynamicQuery(
101                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
102                    throws com.liferay.portal.kernel.exception.SystemException;
103    
104            /**
105            * Performs a dynamic query on the database and returns a range of the matching rows.
106            *
107            * <p>
108            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 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.
109            * </p>
110            *
111            * @param dynamicQuery the dynamic query
112            * @param start the lower bound of the range of model instances
113            * @param end the upper bound of the range of model instances (not inclusive)
114            * @return the range of matching rows
115            * @throws SystemException if a system exception occurred
116            */
117            @SuppressWarnings("rawtypes")
118            public java.util.List dynamicQuery(
119                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
120                    int end) throws com.liferay.portal.kernel.exception.SystemException;
121    
122            /**
123            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
124            *
125            * <p>
126            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 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.
127            * </p>
128            *
129            * @param dynamicQuery the dynamic query
130            * @param start the lower bound of the range of model instances
131            * @param end the upper bound of the range of model instances (not inclusive)
132            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
133            * @return the ordered range of matching rows
134            * @throws SystemException if a system exception occurred
135            */
136            @SuppressWarnings("rawtypes")
137            public java.util.List dynamicQuery(
138                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
139                    int end,
140                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
141                    throws com.liferay.portal.kernel.exception.SystemException;
142    
143            /**
144            * Returns the number of rows that match the dynamic query.
145            *
146            * @param dynamicQuery the dynamic query
147            * @return the number of rows that match the dynamic query
148            * @throws SystemException if a system exception occurred
149            */
150            public long dynamicQueryCount(
151                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
152                    throws com.liferay.portal.kernel.exception.SystemException;
153    
154            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
155            public com.liferay.portal.model.Team fetchTeam(long teamId)
156                    throws com.liferay.portal.kernel.exception.SystemException;
157    
158            /**
159            * Returns the team with the primary key.
160            *
161            * @param teamId the primary key of the team
162            * @return the team
163            * @throws PortalException if a team with the primary key could not be found
164            * @throws SystemException if a system exception occurred
165            */
166            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167            public com.liferay.portal.model.Team getTeam(long teamId)
168                    throws com.liferay.portal.kernel.exception.PortalException,
169                            com.liferay.portal.kernel.exception.SystemException;
170    
171            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172            public com.liferay.portal.model.PersistedModel getPersistedModel(
173                    java.io.Serializable primaryKeyObj)
174                    throws com.liferay.portal.kernel.exception.PortalException,
175                            com.liferay.portal.kernel.exception.SystemException;
176    
177            /**
178            * Returns a range of all the teams.
179            *
180            * <p>
181            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 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.
182            * </p>
183            *
184            * @param start the lower bound of the range of teams
185            * @param end the upper bound of the range of teams (not inclusive)
186            * @return the range of teams
187            * @throws SystemException if a system exception occurred
188            */
189            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
190            public java.util.List<com.liferay.portal.model.Team> getTeams(int start,
191                    int end) throws com.liferay.portal.kernel.exception.SystemException;
192    
193            /**
194            * Returns the number of teams.
195            *
196            * @return the number of teams
197            * @throws SystemException if a system exception occurred
198            */
199            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200            public int getTeamsCount()
201                    throws com.liferay.portal.kernel.exception.SystemException;
202    
203            /**
204            * Updates the team in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
205            *
206            * @param team the team
207            * @return the team that was updated
208            * @throws SystemException if a system exception occurred
209            */
210            public com.liferay.portal.model.Team updateTeam(
211                    com.liferay.portal.model.Team team)
212                    throws com.liferay.portal.kernel.exception.SystemException;
213    
214            /**
215            * @throws SystemException if a system exception occurred
216            */
217            public void addUserTeam(long userId, long teamId)
218                    throws com.liferay.portal.kernel.exception.SystemException;
219    
220            /**
221            * @throws SystemException if a system exception occurred
222            */
223            public void addUserTeam(long userId, com.liferay.portal.model.Team team)
224                    throws com.liferay.portal.kernel.exception.SystemException;
225    
226            /**
227            * @throws SystemException if a system exception occurred
228            */
229            public void addUserTeams(long userId, long[] teamIds)
230                    throws com.liferay.portal.kernel.exception.SystemException;
231    
232            /**
233            * @throws SystemException if a system exception occurred
234            */
235            public void addUserTeams(long userId,
236                    java.util.List<com.liferay.portal.model.Team> Teams)
237                    throws com.liferay.portal.kernel.exception.SystemException;
238    
239            /**
240            * @throws SystemException if a system exception occurred
241            */
242            public void clearUserTeams(long userId)
243                    throws com.liferay.portal.kernel.exception.SystemException;
244    
245            /**
246            * @throws SystemException if a system exception occurred
247            */
248            public void deleteUserTeam(long userId, long teamId)
249                    throws com.liferay.portal.kernel.exception.SystemException;
250    
251            /**
252            * @throws SystemException if a system exception occurred
253            */
254            public void deleteUserTeam(long userId, com.liferay.portal.model.Team team)
255                    throws com.liferay.portal.kernel.exception.SystemException;
256    
257            /**
258            * @throws SystemException if a system exception occurred
259            */
260            public void deleteUserTeams(long userId, long[] teamIds)
261                    throws com.liferay.portal.kernel.exception.SystemException;
262    
263            /**
264            * @throws SystemException if a system exception occurred
265            */
266            public void deleteUserTeams(long userId,
267                    java.util.List<com.liferay.portal.model.Team> Teams)
268                    throws com.liferay.portal.kernel.exception.SystemException;
269    
270            /**
271            * @throws SystemException if a system exception occurred
272            */
273            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
275                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
276    
277            /**
278            * @throws SystemException if a system exception occurred
279            */
280            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
281            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
282                    long userId, int start, int end)
283                    throws com.liferay.portal.kernel.exception.SystemException;
284    
285            /**
286            * @throws SystemException if a system exception occurred
287            */
288            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
289            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
290                    long userId, int start, int end,
291                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
292                    throws com.liferay.portal.kernel.exception.SystemException;
293    
294            /**
295            * @throws SystemException if a system exception occurred
296            */
297            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
298            public int getUserTeamsCount(long userId)
299                    throws com.liferay.portal.kernel.exception.SystemException;
300    
301            /**
302            * @throws SystemException if a system exception occurred
303            */
304            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
305            public boolean hasUserTeam(long userId, long teamId)
306                    throws com.liferay.portal.kernel.exception.SystemException;
307    
308            /**
309            * @throws SystemException if a system exception occurred
310            */
311            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
312            public boolean hasUserTeams(long userId)
313                    throws com.liferay.portal.kernel.exception.SystemException;
314    
315            /**
316            * @throws SystemException if a system exception occurred
317            */
318            public void setUserTeams(long userId, long[] teamIds)
319                    throws com.liferay.portal.kernel.exception.SystemException;
320    
321            /**
322            * @throws SystemException if a system exception occurred
323            */
324            public void addUserGroupTeam(long userGroupId, long teamId)
325                    throws com.liferay.portal.kernel.exception.SystemException;
326    
327            /**
328            * @throws SystemException if a system exception occurred
329            */
330            public void addUserGroupTeam(long userGroupId,
331                    com.liferay.portal.model.Team team)
332                    throws com.liferay.portal.kernel.exception.SystemException;
333    
334            /**
335            * @throws SystemException if a system exception occurred
336            */
337            public void addUserGroupTeams(long userGroupId, long[] teamIds)
338                    throws com.liferay.portal.kernel.exception.SystemException;
339    
340            /**
341            * @throws SystemException if a system exception occurred
342            */
343            public void addUserGroupTeams(long userGroupId,
344                    java.util.List<com.liferay.portal.model.Team> Teams)
345                    throws com.liferay.portal.kernel.exception.SystemException;
346    
347            /**
348            * @throws SystemException if a system exception occurred
349            */
350            public void clearUserGroupTeams(long userGroupId)
351                    throws com.liferay.portal.kernel.exception.SystemException;
352    
353            /**
354            * @throws SystemException if a system exception occurred
355            */
356            public void deleteUserGroupTeam(long userGroupId, long teamId)
357                    throws com.liferay.portal.kernel.exception.SystemException;
358    
359            /**
360            * @throws SystemException if a system exception occurred
361            */
362            public void deleteUserGroupTeam(long userGroupId,
363                    com.liferay.portal.model.Team team)
364                    throws com.liferay.portal.kernel.exception.SystemException;
365    
366            /**
367            * @throws SystemException if a system exception occurred
368            */
369            public void deleteUserGroupTeams(long userGroupId, long[] teamIds)
370                    throws com.liferay.portal.kernel.exception.SystemException;
371    
372            /**
373            * @throws SystemException if a system exception occurred
374            */
375            public void deleteUserGroupTeams(long userGroupId,
376                    java.util.List<com.liferay.portal.model.Team> Teams)
377                    throws com.liferay.portal.kernel.exception.SystemException;
378    
379            /**
380            * @throws SystemException if a system exception occurred
381            */
382            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
383            public java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
384                    long userGroupId)
385                    throws com.liferay.portal.kernel.exception.SystemException;
386    
387            /**
388            * @throws SystemException if a system exception occurred
389            */
390            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
391            public java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
392                    long userGroupId, int start, int end)
393                    throws com.liferay.portal.kernel.exception.SystemException;
394    
395            /**
396            * @throws SystemException if a system exception occurred
397            */
398            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
399            public java.util.List<com.liferay.portal.model.Team> getUserGroupTeams(
400                    long userGroupId, int start, int end,
401                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
402                    throws com.liferay.portal.kernel.exception.SystemException;
403    
404            /**
405            * @throws SystemException if a system exception occurred
406            */
407            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
408            public int getUserGroupTeamsCount(long userGroupId)
409                    throws com.liferay.portal.kernel.exception.SystemException;
410    
411            /**
412            * @throws SystemException if a system exception occurred
413            */
414            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
415            public boolean hasUserGroupTeam(long userGroupId, long teamId)
416                    throws com.liferay.portal.kernel.exception.SystemException;
417    
418            /**
419            * @throws SystemException if a system exception occurred
420            */
421            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
422            public boolean hasUserGroupTeams(long userGroupId)
423                    throws com.liferay.portal.kernel.exception.SystemException;
424    
425            /**
426            * @throws SystemException if a system exception occurred
427            */
428            public void setUserGroupTeams(long userGroupId, long[] teamIds)
429                    throws com.liferay.portal.kernel.exception.SystemException;
430    
431            /**
432            * Returns the Spring bean ID for this bean.
433            *
434            * @return the Spring bean ID for this bean
435            */
436            public java.lang.String getBeanIdentifier();
437    
438            /**
439            * Sets the Spring bean ID for this bean.
440            *
441            * @param beanIdentifier the Spring bean ID for this bean
442            */
443            public void setBeanIdentifier(java.lang.String beanIdentifier);
444    
445            public com.liferay.portal.model.Team addTeam(long userId, long groupId,
446                    java.lang.String name, java.lang.String description)
447                    throws com.liferay.portal.kernel.exception.PortalException,
448                            com.liferay.portal.kernel.exception.SystemException;
449    
450            public void deleteTeams(long groupId)
451                    throws com.liferay.portal.kernel.exception.PortalException,
452                            com.liferay.portal.kernel.exception.SystemException;
453    
454            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
455            public java.util.List<com.liferay.portal.model.Team> getGroupTeams(
456                    long groupId)
457                    throws com.liferay.portal.kernel.exception.SystemException;
458    
459            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
460            public com.liferay.portal.model.Team getTeam(long groupId,
461                    java.lang.String name)
462                    throws com.liferay.portal.kernel.exception.PortalException,
463                            com.liferay.portal.kernel.exception.SystemException;
464    
465            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
466            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
467                    long userId, long groupId)
468                    throws com.liferay.portal.kernel.exception.SystemException;
469    
470            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
471            public java.util.List<com.liferay.portal.model.Team> search(long groupId,
472                    java.lang.String name, java.lang.String description,
473                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
474                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
475                    throws com.liferay.portal.kernel.exception.SystemException;
476    
477            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
478            public int searchCount(long groupId, java.lang.String name,
479                    java.lang.String description,
480                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
481                    throws com.liferay.portal.kernel.exception.SystemException;
482    
483            public com.liferay.portal.model.Team updateTeam(long teamId,
484                    java.lang.String name, java.lang.String description)
485                    throws com.liferay.portal.kernel.exception.PortalException,
486                            com.liferay.portal.kernel.exception.SystemException;
487    }