1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service;
24  
25  import com.liferay.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.Propagation;
28  import com.liferay.portal.kernel.annotation.Transactional;
29  
30  /**
31   * <a href="OrganizationLocalService.java.html"><b><i>View Source</i></b></a>
32   *
33   * <p>
34   * ServiceBuilder generated this class. Modifications in this class will be
35   * overwritten the next time is generated.
36   * </p>
37   *
38   * <p>
39   * This interface defines the service. The default implementation is
40   * <code>com.liferay.portal.service.impl.OrganizationLocalServiceImpl</code>.
41   * Modify methods in that class and rerun ServiceBuilder to populate this class
42   * and all other generated classes.
43   * </p>
44   *
45   * <p>
46   * 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.
47   * </p>
48   *
49   * @author Brian Wing Shun Chan
50   *
51   * @see com.liferay.portal.service.OrganizationLocalServiceUtil
52   *
53   */
54  @Transactional(rollbackFor =  {
55      PortalException.class, SystemException.class})
56  public interface OrganizationLocalService {
57      public com.liferay.portal.model.Organization addOrganization(
58          com.liferay.portal.model.Organization organization)
59          throws com.liferay.portal.SystemException;
60  
61      public com.liferay.portal.model.Organization createOrganization(
62          long organizationId);
63  
64      public void deleteOrganization(long organizationId)
65          throws com.liferay.portal.SystemException,
66              com.liferay.portal.PortalException;
67  
68      public void deleteOrganization(
69          com.liferay.portal.model.Organization organization)
70          throws com.liferay.portal.SystemException;
71  
72      public java.util.List<Object> dynamicQuery(
73          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
74          throws com.liferay.portal.SystemException;
75  
76      public java.util.List<Object> dynamicQuery(
77          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
78          int end) throws com.liferay.portal.SystemException;
79  
80      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
81      public com.liferay.portal.model.Organization getOrganization(
82          long organizationId)
83          throws com.liferay.portal.SystemException,
84              com.liferay.portal.PortalException;
85  
86      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
87      public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
88          int start, int end) throws com.liferay.portal.SystemException;
89  
90      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
91      public int getOrganizationsCount()
92          throws com.liferay.portal.SystemException;
93  
94      public com.liferay.portal.model.Organization updateOrganization(
95          com.liferay.portal.model.Organization organization)
96          throws com.liferay.portal.SystemException;
97  
98      public void addGroupOrganizations(long groupId, long[] organizationIds)
99          throws com.liferay.portal.SystemException;
100 
101     public com.liferay.portal.model.Organization addOrganization(long userId,
102         long parentOrganizationId, java.lang.String name,
103         java.lang.String type, boolean recursable, long regionId,
104         long countryId, int statusId, java.lang.String comments,
105         com.liferay.portal.service.ServiceContext serviceContext)
106         throws com.liferay.portal.PortalException,
107             com.liferay.portal.SystemException;
108 
109     public void addOrganizationResources(long userId,
110         com.liferay.portal.model.Organization organization)
111         throws com.liferay.portal.PortalException,
112             com.liferay.portal.SystemException;
113 
114     public void addPasswordPolicyOrganizations(long passwordPolicyId,
115         long[] organizationIds) throws com.liferay.portal.SystemException;
116 
117     public void deleteLogo(long organizationId)
118         throws com.liferay.portal.PortalException,
119             com.liferay.portal.SystemException;
120 
121     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
122     public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
123         long groupId) throws com.liferay.portal.SystemException;
124 
125     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
126     public java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations(
127         long userId) throws com.liferay.portal.SystemException;
128 
129     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
130     public com.liferay.portal.model.Organization getOrganization(
131         long companyId, java.lang.String name)
132         throws com.liferay.portal.PortalException,
133             com.liferay.portal.SystemException;
134 
135     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
136     public long getOrganizationId(long companyId, java.lang.String name)
137         throws com.liferay.portal.SystemException;
138 
139     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
140     public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
141         long[] organizationIds)
142         throws com.liferay.portal.PortalException,
143             com.liferay.portal.SystemException;
144 
145     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
146     public java.util.List<com.liferay.portal.model.Organization> getParentOrganizations(
147         long organizationId)
148         throws com.liferay.portal.PortalException,
149             com.liferay.portal.SystemException;
150 
151     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
152     public java.util.List<com.liferay.portal.model.Organization> getSuborganizations(
153         java.util.List<com.liferay.portal.model.Organization> organizations)
154         throws com.liferay.portal.SystemException;
155 
156     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
157     public java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations(
158         java.util.List<com.liferay.portal.model.Organization> allOrganizations,
159         java.util.List<com.liferay.portal.model.Organization> availableOrganizations);
160 
161     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
162     public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
163         long userId) throws com.liferay.portal.SystemException;
164 
165     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
166     public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
167         long userId, int start, int end)
168         throws com.liferay.portal.SystemException;
169 
170     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
171     public int getUserOrganizationsCount(long userId)
172         throws com.liferay.portal.SystemException;
173 
174     public boolean hasGroupOrganization(long groupId, long organizationId)
175         throws com.liferay.portal.SystemException;
176 
177     public boolean hasUserOrganization(long userId, long organizationId)
178         throws com.liferay.portal.SystemException;
179 
180     public boolean hasPasswordPolicyOrganization(long passwordPolicyId,
181         long organizationId) throws com.liferay.portal.SystemException;
182 
183     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
184     public java.util.List<com.liferay.portal.model.Organization> search(
185         long companyId, long parentOrganizationId, java.lang.String keywords,
186         java.lang.String type, java.lang.Long regionId,
187         java.lang.Long countryId,
188         java.util.LinkedHashMap<String, Object> params, int start, int end)
189         throws com.liferay.portal.SystemException;
190 
191     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
192     public java.util.List<com.liferay.portal.model.Organization> search(
193         long companyId, long parentOrganizationId, java.lang.String keywords,
194         java.lang.String type, java.lang.Long regionId,
195         java.lang.Long countryId,
196         java.util.LinkedHashMap<String, Object> params, int start, int end,
197         com.liferay.portal.kernel.util.OrderByComparator obc)
198         throws com.liferay.portal.SystemException;
199 
200     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
201     public java.util.List<com.liferay.portal.model.Organization> search(
202         long companyId, long parentOrganizationId, java.lang.String name,
203         java.lang.String type, java.lang.String street, java.lang.String city,
204         java.lang.String zip, java.lang.Long regionId,
205         java.lang.Long countryId,
206         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
207         int start, int end) throws com.liferay.portal.SystemException;
208 
209     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
210     public java.util.List<com.liferay.portal.model.Organization> search(
211         long companyId, long parentOrganizationId, java.lang.String name,
212         java.lang.String type, java.lang.String street, java.lang.String city,
213         java.lang.String zip, java.lang.Long regionId,
214         java.lang.Long countryId,
215         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
216         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
217         throws com.liferay.portal.SystemException;
218 
219     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
220     public int searchCount(long companyId, long parentOrganizationId,
221         java.lang.String keywords, java.lang.String type,
222         java.lang.Long regionId, java.lang.Long countryId,
223         java.util.LinkedHashMap<String, Object> params)
224         throws com.liferay.portal.SystemException;
225 
226     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
227     public int searchCount(long companyId, long parentOrganizationId,
228         java.lang.String name, java.lang.String type, java.lang.String street,
229         java.lang.String city, java.lang.String zip, java.lang.Long regionId,
230         java.lang.Long countryId,
231         java.util.LinkedHashMap<String, Object> params, boolean andOperator)
232         throws com.liferay.portal.SystemException;
233 
234     public void setGroupOrganizations(long groupId, long[] organizationIds)
235         throws com.liferay.portal.SystemException;
236 
237     public void unsetGroupOrganizations(long groupId, long[] organizationIds)
238         throws com.liferay.portal.SystemException;
239 
240     public void unsetPasswordPolicyOrganizations(long passwordPolicyId,
241         long[] organizationIds) throws com.liferay.portal.SystemException;
242 
243     public com.liferay.portal.model.Organization updateOrganization(
244         long companyId, long organizationId, long parentOrganizationId,
245         java.lang.String name, java.lang.String type, boolean recursable,
246         long regionId, long countryId, int statusId, java.lang.String comments,
247         com.liferay.portal.service.ServiceContext serviceContext)
248         throws com.liferay.portal.PortalException,
249             com.liferay.portal.SystemException;
250 }