1   /**
2    * Copyright (c) 2000-2008 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, int type,
103         boolean recursable, long regionId, long countryId, int statusId,
104         java.lang.String comments)
105         throws com.liferay.portal.PortalException,
106             com.liferay.portal.SystemException;
107 
108     public void addOrganizationResources(long userId,
109         com.liferay.portal.model.Organization organization)
110         throws com.liferay.portal.PortalException,
111             com.liferay.portal.SystemException;
112 
113     public void addPasswordPolicyOrganizations(long passwordPolicyId,
114         long[] organizationIds) throws com.liferay.portal.SystemException;
115 
116     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
117     public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
118         long groupId) throws com.liferay.portal.SystemException;
119 
120     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
121     public java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations(
122         long userId) throws com.liferay.portal.SystemException;
123 
124     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125     public com.liferay.portal.model.Organization getOrganization(
126         long companyId, java.lang.String name)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException;
129 
130     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
131     public long getOrganizationId(long companyId, java.lang.String name)
132         throws com.liferay.portal.SystemException;
133 
134     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
135     public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
136         long[] organizationIds)
137         throws com.liferay.portal.PortalException,
138             com.liferay.portal.SystemException;
139 
140     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
141     public java.util.List<com.liferay.portal.model.Organization> getParentOrganizations(
142         long organizationId)
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> getSuborganizations(
148         java.util.List<com.liferay.portal.model.Organization> organizations)
149         throws com.liferay.portal.SystemException;
150 
151     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
152     public java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations(
153         java.util.List<com.liferay.portal.model.Organization> allOrganizations,
154         java.util.List<com.liferay.portal.model.Organization> availableOrganizations);
155 
156     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
157     public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
158         long userId) throws com.liferay.portal.SystemException;
159 
160     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
161     public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
162         long userId, int start, int end)
163         throws com.liferay.portal.SystemException;
164 
165     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
166     public int getUserOrganizationsCount(long userId)
167         throws com.liferay.portal.SystemException;
168 
169     public boolean hasGroupOrganization(long groupId, long organizationId)
170         throws com.liferay.portal.SystemException;
171 
172     public boolean hasUserOrganization(long userId, long organizationId)
173         throws com.liferay.portal.SystemException;
174 
175     public boolean hasPasswordPolicyOrganization(long passwordPolicyId,
176         long organizationId) throws com.liferay.portal.SystemException;
177 
178     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
179     public java.util.List<com.liferay.portal.model.Organization> search(
180         long companyId, long parentOrganizationId, java.lang.String keywords,
181         int type, java.lang.Long regionId, java.lang.Long countryId,
182         java.util.LinkedHashMap<String, Object> params, int start, int end)
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         com.liferay.portal.kernel.util.OrderByComparator obc)
191         throws com.liferay.portal.SystemException;
192 
193     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194     public java.util.List<com.liferay.portal.model.Organization> search(
195         long companyId, long parentOrganizationId, java.lang.String name,
196         int type, java.lang.String street, java.lang.String city,
197         java.lang.String zip, java.lang.Long regionId,
198         java.lang.Long countryId,
199         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
200         int start, int end) throws com.liferay.portal.SystemException;
201 
202     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203     public java.util.List<com.liferay.portal.model.Organization> search(
204         long companyId, long parentOrganizationId, java.lang.String name,
205         int type, java.lang.String street, java.lang.String city,
206         java.lang.String zip, java.lang.Long regionId,
207         java.lang.Long countryId,
208         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
209         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
210         throws com.liferay.portal.SystemException;
211 
212     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213     public int searchCount(long companyId, long parentOrganizationId,
214         java.lang.String keywords, int type, java.lang.Long regionId,
215         java.lang.Long countryId, java.util.LinkedHashMap<String, Object> params)
216         throws com.liferay.portal.SystemException;
217 
218     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
219     public int searchCount(long companyId, long parentOrganizationId,
220         java.lang.String name, int type, java.lang.String street,
221         java.lang.String city, java.lang.String zip, java.lang.Long regionId,
222         java.lang.Long countryId,
223         java.util.LinkedHashMap<String, Object> params, boolean andOperator)
224         throws com.liferay.portal.SystemException;
225 
226     public void setGroupOrganizations(long groupId, long[] organizationIds)
227         throws com.liferay.portal.SystemException;
228 
229     public void unsetGroupOrganizations(long groupId, long[] organizationIds)
230         throws com.liferay.portal.SystemException;
231 
232     public void unsetPasswordPolicyOrganizations(long passwordPolicyId,
233         long[] organizationIds) throws com.liferay.portal.SystemException;
234 
235     public com.liferay.portal.model.Organization updateOrganization(
236         long companyId, long organizationId, long parentOrganizationId,
237         java.lang.String name, int type, boolean recursable, long regionId,
238         long countryId, int statusId, java.lang.String comments)
239         throws com.liferay.portal.PortalException,
240             com.liferay.portal.SystemException;
241 }