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  
26  /**
27   * <a href="OrganizationLocalService.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This interface defines the service. The default implementation is
36   * <code>com.liferay.portal.service.impl.OrganizationLocalServiceImpl</code>.
37   * Modify methods in that class and rerun ServiceBuilder to populate this class
38   * and all other generated classes.
39   * </p>
40   *
41   * <p>
42   * 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.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portal.service.OrganizationLocalServiceFactory
48   * @see com.liferay.portal.service.OrganizationLocalServiceUtil
49   *
50   */
51  public interface OrganizationLocalService {
52      public com.liferay.portal.model.Organization addOrganization(
53          com.liferay.portal.model.Organization organization)
54          throws com.liferay.portal.SystemException;
55  
56      public void deleteOrganization(long organizationId)
57          throws com.liferay.portal.SystemException,
58              com.liferay.portal.PortalException;
59  
60      public void deleteOrganization(
61          com.liferay.portal.model.Organization organization)
62          throws com.liferay.portal.SystemException;
63  
64      public java.util.List<Object> dynamicQuery(
65          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
66          throws com.liferay.portal.SystemException;
67  
68      public java.util.List<Object> dynamicQuery(
69          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
70          int end) throws com.liferay.portal.SystemException;
71  
72      public com.liferay.portal.model.Organization getOrganization(
73          long organizationId)
74          throws com.liferay.portal.SystemException,
75              com.liferay.portal.PortalException;
76  
77      public com.liferay.portal.model.Organization updateOrganization(
78          com.liferay.portal.model.Organization organization)
79          throws com.liferay.portal.SystemException;
80  
81      public void addGroupOrganizations(long groupId, long[] organizationIds)
82          throws com.liferay.portal.SystemException;
83  
84      public com.liferay.portal.model.Organization addOrganization(long userId,
85          long parentOrganizationId, java.lang.String name, int type,
86          boolean recursable, long regionId, long countryId, int statusId,
87          java.lang.String comments)
88          throws com.liferay.portal.PortalException,
89              com.liferay.portal.SystemException;
90  
91      public void addOrganizationResources(long userId,
92          com.liferay.portal.model.Organization organization)
93          throws com.liferay.portal.PortalException,
94              com.liferay.portal.SystemException;
95  
96      public void addPasswordPolicyOrganizations(long passwordPolicyId,
97          long[] organizationIds) throws com.liferay.portal.SystemException;
98  
99      public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
100         long groupId) throws com.liferay.portal.SystemException;
101 
102     public java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations(
103         long userId) throws com.liferay.portal.SystemException;
104 
105     public com.liferay.portal.model.Organization getOrganization(
106         long companyId, java.lang.String name)
107         throws com.liferay.portal.PortalException,
108             com.liferay.portal.SystemException;
109 
110     public long getOrganizationId(long companyId, java.lang.String name)
111         throws com.liferay.portal.SystemException;
112 
113     public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
114         long[] organizationIds)
115         throws com.liferay.portal.PortalException,
116             com.liferay.portal.SystemException;
117 
118     public java.util.List<com.liferay.portal.model.Organization> getParentOrganizations(
119         long organizationId)
120         throws com.liferay.portal.PortalException,
121             com.liferay.portal.SystemException;
122 
123     public java.util.List<com.liferay.portal.model.Organization> getSuborganizations(
124         java.util.List<com.liferay.portal.model.Organization> organizations)
125         throws com.liferay.portal.SystemException;
126 
127     public java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations(
128         java.util.List<com.liferay.portal.model.Organization> allOrganizations,
129         java.util.List<com.liferay.portal.model.Organization> availableOrganizations);
130 
131     public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
132         long userId) throws com.liferay.portal.SystemException;
133 
134     public int getUserOrganizationsCount(long userId)
135         throws com.liferay.portal.SystemException;
136 
137     public boolean hasGroupOrganization(long groupId, long organizationId)
138         throws com.liferay.portal.SystemException;
139 
140     public boolean hasUserOrganization(long userId, long organizationId)
141         throws com.liferay.portal.SystemException;
142 
143     public boolean hasPasswordPolicyOrganization(long passwordPolicyId,
144         long organizationId) throws com.liferay.portal.SystemException;
145 
146     public java.util.List<com.liferay.portal.model.Organization> search(
147         long companyId, long parentOrganizationId, java.lang.String keywords,
148         int type, java.lang.Long regionId, java.lang.Long countryId,
149         java.util.LinkedHashMap<String, Object> params, int start, int end)
150         throws com.liferay.portal.SystemException;
151 
152     public java.util.List<com.liferay.portal.model.Organization> search(
153         long companyId, long parentOrganizationId, java.lang.String keywords,
154         int type, java.lang.Long regionId, java.lang.Long countryId,
155         java.util.LinkedHashMap<String, Object> params, int start, int end,
156         com.liferay.portal.kernel.util.OrderByComparator obc)
157         throws com.liferay.portal.SystemException;
158 
159     public java.util.List<com.liferay.portal.model.Organization> search(
160         long companyId, long parentOrganizationId, java.lang.String name,
161         int type, java.lang.String street, java.lang.String city,
162         java.lang.String zip, java.lang.Long regionId,
163         java.lang.Long countryId,
164         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
165         int start, int end) throws com.liferay.portal.SystemException;
166 
167     public java.util.List<com.liferay.portal.model.Organization> search(
168         long companyId, long parentOrganizationId, java.lang.String name,
169         int type, java.lang.String street, java.lang.String city,
170         java.lang.String zip, java.lang.Long regionId,
171         java.lang.Long countryId,
172         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
173         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
174         throws com.liferay.portal.SystemException;
175 
176     public int searchCount(long companyId, long parentOrganizationId,
177         java.lang.String keywords, int type, java.lang.Long regionId,
178         java.lang.Long countryId, java.util.LinkedHashMap<String, Object> params)
179         throws com.liferay.portal.SystemException;
180 
181     public int searchCount(long companyId, long parentOrganizationId,
182         java.lang.String name, int type, java.lang.String street,
183         java.lang.String city, java.lang.String zip, java.lang.Long regionId,
184         java.lang.Long countryId,
185         java.util.LinkedHashMap<String, Object> params, boolean andOperator)
186         throws com.liferay.portal.SystemException;
187 
188     public void setGroupOrganizations(long groupId, long[] organizationIds)
189         throws com.liferay.portal.SystemException;
190 
191     public void unsetGroupOrganizations(long groupId, long[] organizationIds)
192         throws com.liferay.portal.SystemException;
193 
194     public void unsetPasswordPolicyOrganizations(long passwordPolicyId,
195         long[] organizationIds) throws com.liferay.portal.SystemException;
196 
197     public com.liferay.portal.model.Organization updateOrganization(
198         long companyId, long organizationId, long parentOrganizationId,
199         java.lang.String name, int type, boolean recursable, long regionId,
200         long countryId, int statusId, java.lang.String comments)
201         throws com.liferay.portal.PortalException,
202             com.liferay.portal.SystemException;
203 }