1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portal.service;
21  
22  import com.liferay.portal.PortalException;
23  import com.liferay.portal.SystemException;
24  import com.liferay.portal.kernel.annotation.Propagation;
25  import com.liferay.portal.kernel.annotation.Transactional;
26  
27  /**
28   * <a href="OrganizationLocalService.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This interface defines the service. The default implementation is
37   * <code>com.liferay.portal.service.impl.OrganizationLocalServiceImpl</code>.
38   * Modify methods in that class and rerun ServiceBuilder to populate this class
39   * and all other generated classes.
40   * </p>
41   *
42   * <p>
43   * 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.
44   * </p>
45   *
46   * @author Brian Wing Shun Chan
47   *
48   * @see com.liferay.portal.service.OrganizationLocalServiceUtil
49   *
50   */
51  @Transactional(rollbackFor =  {
52      PortalException.class, SystemException.class})
53  public interface OrganizationLocalService {
54      public com.liferay.portal.model.Organization addOrganization(
55          com.liferay.portal.model.Organization organization)
56          throws com.liferay.portal.SystemException;
57  
58      public com.liferay.portal.model.Organization createOrganization(
59          long organizationId);
60  
61      public void deleteOrganization(long organizationId)
62          throws com.liferay.portal.SystemException,
63              com.liferay.portal.PortalException;
64  
65      public void deleteOrganization(
66          com.liferay.portal.model.Organization organization)
67          throws com.liferay.portal.SystemException;
68  
69      public java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
71          throws com.liferay.portal.SystemException;
72  
73      public java.util.List<Object> dynamicQuery(
74          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75          int end) throws com.liferay.portal.SystemException;
76  
77      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
78      public com.liferay.portal.model.Organization getOrganization(
79          long organizationId)
80          throws com.liferay.portal.SystemException,
81              com.liferay.portal.PortalException;
82  
83      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
84      public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
85          int start, int end) throws com.liferay.portal.SystemException;
86  
87      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
88      public int getOrganizationsCount()
89          throws com.liferay.portal.SystemException;
90  
91      public com.liferay.portal.model.Organization updateOrganization(
92          com.liferay.portal.model.Organization organization)
93          throws com.liferay.portal.SystemException;
94  
95      public void addGroupOrganizations(long groupId, long[] organizationIds)
96          throws com.liferay.portal.SystemException;
97  
98      public com.liferay.portal.model.Organization addOrganization(long userId,
99          long parentOrganizationId, java.lang.String name, int type,
100         boolean recursable, long regionId, long countryId, int statusId,
101         java.lang.String comments)
102         throws com.liferay.portal.PortalException,
103             com.liferay.portal.SystemException;
104 
105     public void addOrganizationResources(long userId,
106         com.liferay.portal.model.Organization organization)
107         throws com.liferay.portal.PortalException,
108             com.liferay.portal.SystemException;
109 
110     public void addPasswordPolicyOrganizations(long passwordPolicyId,
111         long[] organizationIds) throws com.liferay.portal.SystemException;
112 
113     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
114     public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
115         long groupId) throws com.liferay.portal.SystemException;
116 
117     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
118     public java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations(
119         long userId) throws com.liferay.portal.SystemException;
120 
121     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
122     public com.liferay.portal.model.Organization getOrganization(
123         long companyId, java.lang.String name)
124         throws com.liferay.portal.PortalException,
125             com.liferay.portal.SystemException;
126 
127     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
128     public long getOrganizationId(long companyId, java.lang.String name)
129         throws com.liferay.portal.SystemException;
130 
131     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
132     public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
133         long[] organizationIds)
134         throws com.liferay.portal.PortalException,
135             com.liferay.portal.SystemException;
136 
137     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
138     public java.util.List<com.liferay.portal.model.Organization> getParentOrganizations(
139         long organizationId)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException;
142 
143     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
144     public java.util.List<com.liferay.portal.model.Organization> getSuborganizations(
145         java.util.List<com.liferay.portal.model.Organization> organizations)
146         throws com.liferay.portal.SystemException;
147 
148     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
149     public java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations(
150         java.util.List<com.liferay.portal.model.Organization> allOrganizations,
151         java.util.List<com.liferay.portal.model.Organization> availableOrganizations);
152 
153     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
154     public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
155         long userId) throws com.liferay.portal.SystemException;
156 
157     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
158     public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
159         long userId, int start, int end)
160         throws com.liferay.portal.SystemException;
161 
162     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
163     public int getUserOrganizationsCount(long userId)
164         throws com.liferay.portal.SystemException;
165 
166     public boolean hasGroupOrganization(long groupId, long organizationId)
167         throws com.liferay.portal.SystemException;
168 
169     public boolean hasUserOrganization(long userId, long organizationId)
170         throws com.liferay.portal.SystemException;
171 
172     public boolean hasPasswordPolicyOrganization(long passwordPolicyId,
173         long organizationId) throws com.liferay.portal.SystemException;
174 
175     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
176     public java.util.List<com.liferay.portal.model.Organization> search(
177         long companyId, long parentOrganizationId, java.lang.String keywords,
178         int type, java.lang.Long regionId, java.lang.Long countryId,
179         java.util.LinkedHashMap<String, Object> params, int start, int end)
180         throws com.liferay.portal.SystemException;
181 
182     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
183     public java.util.List<com.liferay.portal.model.Organization> search(
184         long companyId, long parentOrganizationId, java.lang.String keywords,
185         int type, java.lang.Long regionId, java.lang.Long countryId,
186         java.util.LinkedHashMap<String, Object> params, int start, int end,
187         com.liferay.portal.kernel.util.OrderByComparator obc)
188         throws com.liferay.portal.SystemException;
189 
190     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
191     public java.util.List<com.liferay.portal.model.Organization> search(
192         long companyId, long parentOrganizationId, java.lang.String name,
193         int type, java.lang.String street, java.lang.String city,
194         java.lang.String zip, java.lang.Long regionId,
195         java.lang.Long countryId,
196         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
197         int start, int end) throws com.liferay.portal.SystemException;
198 
199     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200     public java.util.List<com.liferay.portal.model.Organization> search(
201         long companyId, long parentOrganizationId, java.lang.String name,
202         int type, java.lang.String street, java.lang.String city,
203         java.lang.String zip, java.lang.Long regionId,
204         java.lang.Long countryId,
205         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
206         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
207         throws com.liferay.portal.SystemException;
208 
209     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
210     public int searchCount(long companyId, long parentOrganizationId,
211         java.lang.String keywords, int type, java.lang.Long regionId,
212         java.lang.Long countryId, java.util.LinkedHashMap<String, Object> params)
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 name, int type, java.lang.String street,
218         java.lang.String city, java.lang.String zip, java.lang.Long regionId,
219         java.lang.Long countryId,
220         java.util.LinkedHashMap<String, Object> params, boolean andOperator)
221         throws com.liferay.portal.SystemException;
222 
223     public void setGroupOrganizations(long groupId, long[] organizationIds)
224         throws com.liferay.portal.SystemException;
225 
226     public void unsetGroupOrganizations(long groupId, long[] organizationIds)
227         throws com.liferay.portal.SystemException;
228 
229     public void unsetPasswordPolicyOrganizations(long passwordPolicyId,
230         long[] organizationIds) throws com.liferay.portal.SystemException;
231 
232     public com.liferay.portal.model.Organization updateOrganization(
233         long companyId, long organizationId, long parentOrganizationId,
234         java.lang.String name, int type, boolean recursable, long regionId,
235         long countryId, int statusId, java.lang.String comments)
236         throws com.liferay.portal.PortalException,
237             com.liferay.portal.SystemException;
238 }