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, int type,
108         boolean recursable, long regionId, long countryId, int statusId,
109         java.lang.String comments)
110         throws com.liferay.portal.PortalException,
111             com.liferay.portal.SystemException;
112 
113     public void addOrganizationResources(long userId,
114         com.liferay.portal.model.Organization organization)
115         throws com.liferay.portal.PortalException,
116             com.liferay.portal.SystemException;
117 
118     public void addPasswordPolicyOrganizations(long passwordPolicyId,
119         long[] organizationIds) throws 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 com.liferay.portal.model.Organization getOrganization(
127         long companyId, java.lang.String name)
128         throws com.liferay.portal.PortalException,
129             com.liferay.portal.SystemException;
130 
131     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
132     public long getOrganizationId(long companyId, java.lang.String name)
133         throws com.liferay.portal.SystemException;
134 
135     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
136     public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
137         long[] organizationIds)
138         throws com.liferay.portal.PortalException,
139             com.liferay.portal.SystemException;
140 
141     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
142     public java.util.List<com.liferay.portal.model.Organization> getParentOrganizations(
143         long organizationId)
144         throws com.liferay.portal.PortalException,
145             com.liferay.portal.SystemException;
146 
147     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
148     public java.util.List<com.liferay.portal.model.Organization> getSuborganizations(
149         java.util.List<com.liferay.portal.model.Organization> organizations)
150         throws com.liferay.portal.SystemException;
151 
152     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
153     public java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations(
154         java.util.List<com.liferay.portal.model.Organization> allOrganizations,
155         java.util.List<com.liferay.portal.model.Organization> availableOrganizations);
156 
157     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
158     public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
159         long userId) throws com.liferay.portal.SystemException;
160 
161     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
162     public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
163         long userId, int start, int end)
164         throws com.liferay.portal.SystemException;
165 
166     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167     public int getUserOrganizationsCount(long userId)
168         throws com.liferay.portal.SystemException;
169 
170     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
171     public boolean hasGroupOrganization(long groupId, long organizationId)
172         throws com.liferay.portal.SystemException;
173 
174     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
175     public boolean hasUserOrganization(long userId, long organizationId)
176         throws com.liferay.portal.SystemException;
177 
178     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
179     public boolean hasPasswordPolicyOrganization(long passwordPolicyId,
180         long organizationId) throws com.liferay.portal.SystemException;
181 
182     public void rebuildTree(long companyId, boolean force)
183         throws com.liferay.portal.SystemException;
184 
185     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186     public java.util.List<com.liferay.portal.model.Organization> search(
187         long companyId, long parentOrganizationId, java.lang.String keywords,
188         int type, java.lang.Long regionId, java.lang.Long countryId,
189         java.util.LinkedHashMap<String, Object> params, int start, int end)
190         throws com.liferay.portal.SystemException;
191 
192     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
193     public java.util.List<com.liferay.portal.model.Organization> search(
194         long companyId, long parentOrganizationId, java.lang.String keywords,
195         int type, java.lang.Long regionId, 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         int 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         int 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, int type, java.lang.Long regionId,
222         java.lang.Long countryId, java.util.LinkedHashMap<String, Object> params)
223         throws com.liferay.portal.SystemException;
224 
225     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
226     public int searchCount(long companyId, long parentOrganizationId,
227         java.lang.String name, int type, java.lang.String street,
228         java.lang.String city, java.lang.String zip, java.lang.Long regionId,
229         java.lang.Long countryId,
230         java.util.LinkedHashMap<String, Object> params, boolean andOperator)
231         throws com.liferay.portal.SystemException;
232 
233     public void setGroupOrganizations(long groupId, long[] organizationIds)
234         throws com.liferay.portal.SystemException;
235 
236     public void unsetGroupOrganizations(long groupId, long[] organizationIds)
237         throws com.liferay.portal.SystemException;
238 
239     public void unsetPasswordPolicyOrganizations(long passwordPolicyId,
240         long[] organizationIds) throws com.liferay.portal.SystemException;
241 
242     public com.liferay.portal.model.Organization updateOrganization(
243         long companyId, long organizationId, long parentOrganizationId,
244         java.lang.String name, int type, boolean recursable, long regionId,
245         long countryId, int statusId, java.lang.String comments)
246         throws com.liferay.portal.PortalException,
247             com.liferay.portal.SystemException;
248 }