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     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
118     public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
119         long groupId) throws com.liferay.portal.SystemException;
120 
121     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
122     public java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations(
123         long userId) 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     public boolean hasGroupOrganization(long groupId, long organizationId)
171         throws com.liferay.portal.SystemException;
172 
173     public boolean hasUserOrganization(long userId, long organizationId)
174         throws com.liferay.portal.SystemException;
175 
176     public boolean hasPasswordPolicyOrganization(long passwordPolicyId,
177         long organizationId) throws com.liferay.portal.SystemException;
178 
179     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180     public java.util.List<com.liferay.portal.model.Organization> search(
181         long companyId, long parentOrganizationId, java.lang.String keywords,
182         java.lang.String type, java.lang.Long regionId,
183         java.lang.Long countryId,
184         java.util.LinkedHashMap<String, Object> params, int start, int end)
185         throws com.liferay.portal.SystemException;
186 
187     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
188     public java.util.List<com.liferay.portal.model.Organization> search(
189         long companyId, long parentOrganizationId, java.lang.String keywords,
190         java.lang.String type, java.lang.Long regionId,
191         java.lang.Long countryId,
192         java.util.LinkedHashMap<String, Object> params, int start, int end,
193         com.liferay.portal.kernel.util.OrderByComparator obc)
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 name,
199         java.lang.String type, java.lang.String street, java.lang.String city,
200         java.lang.String zip, java.lang.Long regionId,
201         java.lang.Long countryId,
202         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
203         int start, int end) throws com.liferay.portal.SystemException;
204 
205     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
206     public java.util.List<com.liferay.portal.model.Organization> search(
207         long companyId, long parentOrganizationId, java.lang.String name,
208         java.lang.String type, java.lang.String street, java.lang.String city,
209         java.lang.String zip, java.lang.Long regionId,
210         java.lang.Long countryId,
211         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
212         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
213         throws com.liferay.portal.SystemException;
214 
215     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
216     public int searchCount(long companyId, long parentOrganizationId,
217         java.lang.String keywords, java.lang.String type,
218         java.lang.Long regionId, java.lang.Long countryId,
219         java.util.LinkedHashMap<String, Object> params)
220         throws com.liferay.portal.SystemException;
221 
222     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
223     public int searchCount(long companyId, long parentOrganizationId,
224         java.lang.String name, java.lang.String type, java.lang.String street,
225         java.lang.String city, java.lang.String zip, java.lang.Long regionId,
226         java.lang.Long countryId,
227         java.util.LinkedHashMap<String, Object> params, boolean andOperator)
228         throws com.liferay.portal.SystemException;
229 
230     public void setGroupOrganizations(long groupId, long[] organizationIds)
231         throws com.liferay.portal.SystemException;
232 
233     public void unsetGroupOrganizations(long groupId, long[] organizationIds)
234         throws com.liferay.portal.SystemException;
235 
236     public void unsetPasswordPolicyOrganizations(long passwordPolicyId,
237         long[] organizationIds) throws com.liferay.portal.SystemException;
238 
239     public com.liferay.portal.model.Organization updateOrganization(
240         long companyId, long organizationId, long parentOrganizationId,
241         java.lang.String name, java.lang.String type, boolean recursable,
242         long regionId, long countryId, int statusId, java.lang.String comments,
243         com.liferay.portal.service.ServiceContext serviceContext)
244         throws com.liferay.portal.PortalException,
245             com.liferay.portal.SystemException;
246 }