1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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   * {@link
42   * com.liferay.portal.service.impl.OrganizationLocalServiceImpl}}.
43   * Modify methods in that class and rerun ServiceBuilder to populate this class
44   * and all other generated classes.
45   * </p>
46   *
47   * <p>
48   * 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.
49   * </p>
50   *
51   * @author    Brian Wing Shun Chan
52   * @see       OrganizationLocalServiceUtil
53   * @generated
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.PortalException,
67              com.liferay.portal.SystemException;
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.PortalException,
85              com.liferay.portal.SystemException;
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)
165         throws com.liferay.portal.PortalException,
166             com.liferay.portal.SystemException;
167 
168     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
169     public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
170         long userId, boolean inheritUserGroups)
171         throws com.liferay.portal.PortalException,
172             com.liferay.portal.SystemException;
173 
174     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
175     public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
176         long userId, int start, int end)
177         throws com.liferay.portal.PortalException,
178             com.liferay.portal.SystemException;
179 
180     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
181     public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
182         long userId, boolean inheritUserGroups, int start, int end)
183         throws com.liferay.portal.PortalException,
184             com.liferay.portal.SystemException;
185 
186     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
187     public int getUserOrganizationsCount(long userId)
188         throws com.liferay.portal.SystemException;
189 
190     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
191     public boolean hasGroupOrganization(long groupId, long organizationId)
192         throws com.liferay.portal.SystemException;
193 
194     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
195     public boolean hasUserOrganization(long userId, long organizationId)
196         throws com.liferay.portal.SystemException;
197 
198     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
199     public boolean hasUserOrganization(long userId, long organizationId,
200         boolean inheritSuborganizations, boolean inheritUserGroups,
201         boolean includeSpecifiedOrganization)
202         throws com.liferay.portal.PortalException,
203             com.liferay.portal.SystemException;
204 
205     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
206     public boolean hasPasswordPolicyOrganization(long passwordPolicyId,
207         long organizationId) throws com.liferay.portal.SystemException;
208 
209     public void rebuildTree(long companyId, boolean force)
210         throws com.liferay.portal.SystemException;
211 
212     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213     public java.util.List<com.liferay.portal.model.Organization> search(
214         long companyId, long parentOrganizationId, java.lang.String keywords,
215         java.lang.String type, java.lang.Long regionId,
216         java.lang.Long countryId,
217         java.util.LinkedHashMap<String, Object> params, int start, int end)
218         throws com.liferay.portal.SystemException;
219 
220     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
221     public java.util.List<com.liferay.portal.model.Organization> search(
222         long companyId, long parentOrganizationId, java.lang.String keywords,
223         java.lang.String type, java.lang.Long regionId,
224         java.lang.Long countryId,
225         java.util.LinkedHashMap<String, Object> params, int start, int end,
226         com.liferay.portal.kernel.util.OrderByComparator obc)
227         throws com.liferay.portal.SystemException;
228 
229     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230     public java.util.List<com.liferay.portal.model.Organization> search(
231         long companyId, long parentOrganizationId, java.lang.String name,
232         java.lang.String type, java.lang.String street, java.lang.String city,
233         java.lang.String zip, java.lang.Long regionId,
234         java.lang.Long countryId,
235         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
236         int start, int end) throws com.liferay.portal.SystemException;
237 
238     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239     public java.util.List<com.liferay.portal.model.Organization> search(
240         long companyId, long parentOrganizationId, java.lang.String name,
241         java.lang.String type, java.lang.String street, java.lang.String city,
242         java.lang.String zip, java.lang.Long regionId,
243         java.lang.Long countryId,
244         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
245         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
246         throws com.liferay.portal.SystemException;
247 
248     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
249     public int searchCount(long companyId, long parentOrganizationId,
250         java.lang.String keywords, java.lang.String type,
251         java.lang.Long regionId, java.lang.Long countryId,
252         java.util.LinkedHashMap<String, Object> params)
253         throws com.liferay.portal.SystemException;
254 
255     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
256     public int searchCount(long companyId, long parentOrganizationId,
257         java.lang.String name, java.lang.String type, java.lang.String street,
258         java.lang.String city, java.lang.String zip, java.lang.Long regionId,
259         java.lang.Long countryId,
260         java.util.LinkedHashMap<String, Object> params, boolean andOperator)
261         throws com.liferay.portal.SystemException;
262 
263     public void setGroupOrganizations(long groupId, long[] organizationIds)
264         throws com.liferay.portal.SystemException;
265 
266     public void unsetGroupOrganizations(long groupId, long[] organizationIds)
267         throws com.liferay.portal.SystemException;
268 
269     public void unsetPasswordPolicyOrganizations(long passwordPolicyId,
270         long[] organizationIds) throws com.liferay.portal.SystemException;
271 
272     public com.liferay.portal.model.Organization updateOrganization(
273         long companyId, long organizationId, long parentOrganizationId,
274         java.lang.String name, java.lang.String type, boolean recursable,
275         long regionId, long countryId, int statusId, java.lang.String comments,
276         com.liferay.portal.service.ServiceContext serviceContext)
277         throws com.liferay.portal.PortalException,
278             com.liferay.portal.SystemException;
279 
280     public void updateTagsAsset(long userId,
281         com.liferay.portal.model.Organization organization,
282         java.lang.String[] tagsCategories, java.lang.String[] tagsEntries)
283         throws com.liferay.portal.PortalException,
284             com.liferay.portal.SystemException;
285 }