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.Isolation;
28  import com.liferay.portal.kernel.annotation.Propagation;
29  import com.liferay.portal.kernel.annotation.Transactional;
30  
31  /**
32   * <a href="OrganizationLocalService.java.html"><b><i>View Source</i></b></a>
33   *
34   * <p>
35   * ServiceBuilder generated this class. Modifications in this class will be
36   * overwritten the next time is generated.
37   * </p>
38   *
39   * <p>
40   * This interface defines the service. The default implementation is
41   * <code>com.liferay.portal.service.impl.OrganizationLocalServiceImpl</code>.
42   * Modify methods in that class and rerun ServiceBuilder to populate this class
43   * and all other generated classes.
44   * </p>
45   *
46   * <p>
47   * 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.
48   * </p>
49   *
50   * @author Brian Wing Shun Chan
51   *
52   * @see com.liferay.portal.service.OrganizationLocalServiceUtil
53   *
54   */
55  @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
56      PortalException.class, SystemException.class})
57  public interface OrganizationLocalService {
58      public com.liferay.portal.model.Organization addOrganization(
59          com.liferay.portal.model.Organization organization)
60          throws com.liferay.portal.SystemException;
61  
62      public com.liferay.portal.model.Organization createOrganization(
63          long organizationId);
64  
65      public void deleteOrganization(long organizationId)
66          throws com.liferay.portal.SystemException,
67              com.liferay.portal.PortalException;
68  
69      public void deleteOrganization(
70          com.liferay.portal.model.Organization organization)
71          throws com.liferay.portal.SystemException;
72  
73      public java.util.List<Object> dynamicQuery(
74          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
75          throws com.liferay.portal.SystemException;
76  
77      public java.util.List<Object> dynamicQuery(
78          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
79          int end) throws com.liferay.portal.SystemException;
80  
81      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
82      public com.liferay.portal.model.Organization getOrganization(
83          long organizationId)
84          throws com.liferay.portal.SystemException,
85              com.liferay.portal.PortalException;
86  
87      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
88      public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
89          int start, int end) throws com.liferay.portal.SystemException;
90  
91      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
92      public int getOrganizationsCount()
93          throws com.liferay.portal.SystemException;
94  
95      public com.liferay.portal.model.Organization updateOrganization(
96          com.liferay.portal.model.Organization organization)
97          throws com.liferay.portal.SystemException;
98  
99      public com.liferay.portal.model.Organization updateOrganization(
100         com.liferay.portal.model.Organization organization, boolean merge)
101         throws com.liferay.portal.SystemException;
102 
103     public void addGroupOrganizations(long groupId, long[] organizationIds)
104         throws com.liferay.portal.SystemException;
105 
106     public com.liferay.portal.model.Organization addOrganization(long userId,
107         long parentOrganizationId, java.lang.String name,
108         java.lang.String type, boolean recursable, long regionId,
109         long countryId, int statusId, java.lang.String comments,
110         com.liferay.portal.service.ServiceContext serviceContext)
111         throws com.liferay.portal.PortalException,
112             com.liferay.portal.SystemException;
113 
114     public void addOrganizationResources(long userId,
115         com.liferay.portal.model.Organization organization)
116         throws com.liferay.portal.PortalException,
117             com.liferay.portal.SystemException;
118 
119     public void addPasswordPolicyOrganizations(long passwordPolicyId,
120         long[] organizationIds) throws com.liferay.portal.SystemException;
121 
122     public void deleteLogo(long organizationId)
123         throws com.liferay.portal.PortalException,
124             com.liferay.portal.SystemException;
125 
126     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
127     public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
128         long groupId) throws com.liferay.portal.SystemException;
129 
130     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
131     public com.liferay.portal.model.Organization getOrganization(
132         long companyId, java.lang.String name)
133         throws com.liferay.portal.PortalException,
134             com.liferay.portal.SystemException;
135 
136     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
137     public long getOrganizationId(long companyId, java.lang.String name)
138         throws com.liferay.portal.SystemException;
139 
140     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
141     public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
142         long[] organizationIds)
143         throws com.liferay.portal.PortalException,
144             com.liferay.portal.SystemException;
145 
146     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
147     public java.util.List<com.liferay.portal.model.Organization> getParentOrganizations(
148         long organizationId)
149         throws com.liferay.portal.PortalException,
150             com.liferay.portal.SystemException;
151 
152     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
153     public java.util.List<com.liferay.portal.model.Organization> getSuborganizations(
154         java.util.List<com.liferay.portal.model.Organization> organizations)
155         throws com.liferay.portal.SystemException;
156 
157     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
158     public java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations(
159         java.util.List<com.liferay.portal.model.Organization> allOrganizations,
160         java.util.List<com.liferay.portal.model.Organization> availableOrganizations);
161 
162     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
163     public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
164         long userId) throws com.liferay.portal.SystemException;
165 
166     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167     public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
168         long userId, int start, int end)
169         throws com.liferay.portal.SystemException;
170 
171     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172     public int getUserOrganizationsCount(long userId)
173         throws com.liferay.portal.SystemException;
174 
175     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
176     public boolean hasGroupOrganization(long groupId, long organizationId)
177         throws com.liferay.portal.SystemException;
178 
179     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180     public boolean hasUserOrganization(long userId, long organizationId)
181         throws com.liferay.portal.SystemException;
182 
183     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
184     public boolean hasUserOrganization(long userId, long organizationId,
185         boolean inherited, boolean includeSpecifiedOrganization)
186         throws com.liferay.portal.PortalException,
187             com.liferay.portal.SystemException;
188 
189     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
190     public boolean hasPasswordPolicyOrganization(long passwordPolicyId,
191         long organizationId) throws com.liferay.portal.SystemException;
192 
193     public void rebuildTree(long companyId, boolean force)
194         throws com.liferay.portal.SystemException;
195 
196     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
197     public java.util.List<com.liferay.portal.model.Organization> search(
198         long companyId, long parentOrganizationId, java.lang.String keywords,
199         java.lang.String type, java.lang.Long regionId,
200         java.lang.Long countryId,
201         java.util.LinkedHashMap<String, Object> params, int start, int end)
202         throws com.liferay.portal.SystemException;
203 
204     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
205     public java.util.List<com.liferay.portal.model.Organization> search(
206         long companyId, long parentOrganizationId, java.lang.String keywords,
207         java.lang.String type, java.lang.Long regionId,
208         java.lang.Long countryId,
209         java.util.LinkedHashMap<String, Object> params, int start, int end,
210         com.liferay.portal.kernel.util.OrderByComparator obc)
211         throws com.liferay.portal.SystemException;
212 
213     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214     public java.util.List<com.liferay.portal.model.Organization> search(
215         long companyId, long parentOrganizationId, java.lang.String name,
216         java.lang.String type, java.lang.String street, java.lang.String city,
217         java.lang.String zip, java.lang.Long regionId,
218         java.lang.Long countryId,
219         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
220         int start, int end) throws com.liferay.portal.SystemException;
221 
222     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
223     public java.util.List<com.liferay.portal.model.Organization> search(
224         long companyId, long parentOrganizationId, java.lang.String name,
225         java.lang.String type, java.lang.String street, java.lang.String city,
226         java.lang.String zip, java.lang.Long regionId,
227         java.lang.Long countryId,
228         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
229         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
230         throws com.liferay.portal.SystemException;
231 
232     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
233     public int searchCount(long companyId, long parentOrganizationId,
234         java.lang.String keywords, java.lang.String type,
235         java.lang.Long regionId, java.lang.Long countryId,
236         java.util.LinkedHashMap<String, Object> params)
237         throws com.liferay.portal.SystemException;
238 
239     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
240     public int searchCount(long companyId, long parentOrganizationId,
241         java.lang.String name, java.lang.String type, java.lang.String street,
242         java.lang.String city, java.lang.String zip, java.lang.Long regionId,
243         java.lang.Long countryId,
244         java.util.LinkedHashMap<String, Object> params, boolean andOperator)
245         throws com.liferay.portal.SystemException;
246 
247     public void setGroupOrganizations(long groupId, long[] organizationIds)
248         throws com.liferay.portal.SystemException;
249 
250     public void unsetGroupOrganizations(long groupId, long[] organizationIds)
251         throws com.liferay.portal.SystemException;
252 
253     public void unsetPasswordPolicyOrganizations(long passwordPolicyId,
254         long[] organizationIds) throws com.liferay.portal.SystemException;
255 
256     public com.liferay.portal.model.Organization updateOrganization(
257         long companyId, long organizationId, long parentOrganizationId,
258         java.lang.String name, java.lang.String type, boolean recursable,
259         long regionId, long countryId, int statusId, java.lang.String comments,
260         com.liferay.portal.service.ServiceContext serviceContext)
261         throws com.liferay.portal.PortalException,
262             com.liferay.portal.SystemException;
263 
264     public void updateTagsAsset(long userId,
265         com.liferay.portal.model.Organization organization,
266         java.lang.String[] tagsCategories, java.lang.String[] tagsEntries)
267         throws com.liferay.portal.PortalException,
268             com.liferay.portal.SystemException;
269 }