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.OrganizationLocalServiceUtil
48   *
49   */
50  public interface OrganizationLocalService {
51      public com.liferay.portal.model.Organization addOrganization(
52          com.liferay.portal.model.Organization organization)
53          throws com.liferay.portal.SystemException;
54  
55      public void deleteOrganization(long organizationId)
56          throws com.liferay.portal.SystemException,
57              com.liferay.portal.PortalException;
58  
59      public void deleteOrganization(
60          com.liferay.portal.model.Organization organization)
61          throws com.liferay.portal.SystemException;
62  
63      public java.util.List<Object> dynamicQuery(
64          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65          throws com.liferay.portal.SystemException;
66  
67      public java.util.List<Object> dynamicQuery(
68          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
69          int end) throws com.liferay.portal.SystemException;
70  
71      public com.liferay.portal.model.Organization getOrganization(
72          long organizationId)
73          throws com.liferay.portal.SystemException,
74              com.liferay.portal.PortalException;
75  
76      public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
77          int start, int end) throws com.liferay.portal.SystemException;
78  
79      public int getOrganizationsCount()
80          throws com.liferay.portal.SystemException;
81  
82      public com.liferay.portal.model.Organization updateOrganization(
83          com.liferay.portal.model.Organization organization)
84          throws com.liferay.portal.SystemException;
85  
86      public void addGroupOrganizations(long groupId, long[] organizationIds)
87          throws com.liferay.portal.SystemException;
88  
89      public com.liferay.portal.model.Organization addOrganization(long userId,
90          long parentOrganizationId, java.lang.String name, int type,
91          boolean recursable, long regionId, long countryId, int statusId,
92          java.lang.String comments)
93          throws com.liferay.portal.PortalException,
94              com.liferay.portal.SystemException;
95  
96      public void addOrganizationResources(long userId,
97          com.liferay.portal.model.Organization organization)
98          throws com.liferay.portal.PortalException,
99              com.liferay.portal.SystemException;
100 
101     public void addPasswordPolicyOrganizations(long passwordPolicyId,
102         long[] organizationIds) throws com.liferay.portal.SystemException;
103 
104     public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
105         long groupId) throws com.liferay.portal.SystemException;
106 
107     public java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations(
108         long userId) throws com.liferay.portal.SystemException;
109 
110     public com.liferay.portal.model.Organization getOrganization(
111         long companyId, java.lang.String name)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException;
114 
115     public long getOrganizationId(long companyId, java.lang.String name)
116         throws com.liferay.portal.SystemException;
117 
118     public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
119         long[] organizationIds)
120         throws com.liferay.portal.PortalException,
121             com.liferay.portal.SystemException;
122 
123     public java.util.List<com.liferay.portal.model.Organization> getParentOrganizations(
124         long organizationId)
125         throws com.liferay.portal.PortalException,
126             com.liferay.portal.SystemException;
127 
128     public java.util.List<com.liferay.portal.model.Organization> getSuborganizations(
129         java.util.List<com.liferay.portal.model.Organization> organizations)
130         throws com.liferay.portal.SystemException;
131 
132     public java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations(
133         java.util.List<com.liferay.portal.model.Organization> allOrganizations,
134         java.util.List<com.liferay.portal.model.Organization> availableOrganizations);
135 
136     public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
137         long userId) throws com.liferay.portal.SystemException;
138 
139     public int getUserOrganizationsCount(long userId)
140         throws com.liferay.portal.SystemException;
141 
142     public boolean hasGroupOrganization(long groupId, long organizationId)
143         throws com.liferay.portal.SystemException;
144 
145     public boolean hasUserOrganization(long userId, long organizationId)
146         throws com.liferay.portal.SystemException;
147 
148     public boolean hasPasswordPolicyOrganization(long passwordPolicyId,
149         long organizationId) throws com.liferay.portal.SystemException;
150 
151     public java.util.List<com.liferay.portal.model.Organization> search(
152         long companyId, long parentOrganizationId, java.lang.String keywords,
153         int type, java.lang.Long regionId, java.lang.Long countryId,
154         java.util.LinkedHashMap<String, Object> params, int start, int end)
155         throws com.liferay.portal.SystemException;
156 
157     public java.util.List<com.liferay.portal.model.Organization> search(
158         long companyId, long parentOrganizationId, java.lang.String keywords,
159         int type, java.lang.Long regionId, java.lang.Long countryId,
160         java.util.LinkedHashMap<String, Object> params, int start, int end,
161         com.liferay.portal.kernel.util.OrderByComparator obc)
162         throws com.liferay.portal.SystemException;
163 
164     public java.util.List<com.liferay.portal.model.Organization> search(
165         long companyId, long parentOrganizationId, java.lang.String name,
166         int type, java.lang.String street, java.lang.String city,
167         java.lang.String zip, java.lang.Long regionId,
168         java.lang.Long countryId,
169         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
170         int start, int end) throws com.liferay.portal.SystemException;
171 
172     public java.util.List<com.liferay.portal.model.Organization> search(
173         long companyId, long parentOrganizationId, java.lang.String name,
174         int type, java.lang.String street, java.lang.String city,
175         java.lang.String zip, java.lang.Long regionId,
176         java.lang.Long countryId,
177         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
178         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
179         throws com.liferay.portal.SystemException;
180 
181     public int searchCount(long companyId, long parentOrganizationId,
182         java.lang.String keywords, int type, java.lang.Long regionId,
183         java.lang.Long countryId, java.util.LinkedHashMap<String, Object> params)
184         throws com.liferay.portal.SystemException;
185 
186     public int searchCount(long companyId, long parentOrganizationId,
187         java.lang.String name, int type, java.lang.String street,
188         java.lang.String city, java.lang.String zip, java.lang.Long regionId,
189         java.lang.Long countryId,
190         java.util.LinkedHashMap<String, Object> params, boolean andOperator)
191         throws com.liferay.portal.SystemException;
192 
193     public void setGroupOrganizations(long groupId, long[] organizationIds)
194         throws com.liferay.portal.SystemException;
195 
196     public void unsetGroupOrganizations(long groupId, long[] organizationIds)
197         throws com.liferay.portal.SystemException;
198 
199     public void unsetPasswordPolicyOrganizations(long passwordPolicyId,
200         long[] organizationIds) throws com.liferay.portal.SystemException;
201 
202     public com.liferay.portal.model.Organization updateOrganization(
203         long companyId, long organizationId, long parentOrganizationId,
204         java.lang.String name, int type, boolean recursable, long regionId,
205         long countryId, int statusId, java.lang.String comments)
206         throws com.liferay.portal.PortalException,
207             com.liferay.portal.SystemException;
208 }