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