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.Isolation;
25  import com.liferay.portal.kernel.annotation.Propagation;
26  import com.liferay.portal.kernel.annotation.Transactional;
27  
28  /**
29   * <a href="OrganizationLocalService.java.html"><b><i>View Source</i></b></a>
30   *
31   * <p>
32   * ServiceBuilder generated this class. Modifications in this class will be
33   * overwritten the next time is generated.
34   * </p>
35   *
36   * <p>
37   * This interface defines the service. The default implementation is
38   * <code>com.liferay.portal.service.impl.OrganizationLocalServiceImpl</code>.
39   * Modify methods in that class and rerun ServiceBuilder to populate this class
40   * and all other generated classes.
41   * </p>
42   *
43   * <p>
44   * 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.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portal.service.OrganizationLocalServiceUtil
50   *
51   */
52  @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
53      PortalException.class, SystemException.class})
54  public interface OrganizationLocalService {
55      public com.liferay.portal.model.Organization addOrganization(
56          com.liferay.portal.model.Organization organization)
57          throws com.liferay.portal.SystemException;
58  
59      public com.liferay.portal.model.Organization createOrganization(
60          long organizationId);
61  
62      public void deleteOrganization(long organizationId)
63          throws com.liferay.portal.SystemException,
64              com.liferay.portal.PortalException;
65  
66      public void deleteOrganization(
67          com.liferay.portal.model.Organization organization)
68          throws com.liferay.portal.SystemException;
69  
70      public java.util.List<Object> dynamicQuery(
71          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
72          throws com.liferay.portal.SystemException;
73  
74      public java.util.List<Object> dynamicQuery(
75          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
76          int end) throws com.liferay.portal.SystemException;
77  
78      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
79      public com.liferay.portal.model.Organization getOrganization(
80          long organizationId)
81          throws com.liferay.portal.SystemException,
82              com.liferay.portal.PortalException;
83  
84      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
85      public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
86          int start, int end) throws com.liferay.portal.SystemException;
87  
88      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
89      public int getOrganizationsCount()
90          throws com.liferay.portal.SystemException;
91  
92      public com.liferay.portal.model.Organization updateOrganization(
93          com.liferay.portal.model.Organization organization)
94          throws com.liferay.portal.SystemException;
95  
96      public com.liferay.portal.model.Organization updateOrganization(
97          com.liferay.portal.model.Organization organization, boolean merge)
98          throws com.liferay.portal.SystemException;
99  
100     public void addGroupOrganizations(long groupId, long[] organizationIds)
101         throws com.liferay.portal.SystemException;
102 
103     public com.liferay.portal.model.Organization addOrganization(long userId,
104         long parentOrganizationId, java.lang.String name,
105         java.lang.String type, boolean recursable, long regionId,
106         long countryId, int statusId, java.lang.String comments,
107         com.liferay.portal.service.ServiceContext serviceContext)
108         throws com.liferay.portal.PortalException,
109             com.liferay.portal.SystemException;
110 
111     public void addOrganizationResources(long userId,
112         com.liferay.portal.model.Organization organization)
113         throws com.liferay.portal.PortalException,
114             com.liferay.portal.SystemException;
115 
116     public void addPasswordPolicyOrganizations(long passwordPolicyId,
117         long[] organizationIds) throws com.liferay.portal.SystemException;
118 
119     public void deleteLogo(long organizationId)
120         throws com.liferay.portal.PortalException,
121             com.liferay.portal.SystemException;
122 
123     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
124     public java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
125         long groupId) throws com.liferay.portal.SystemException;
126 
127     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
128     public com.liferay.portal.model.Organization getOrganization(
129         long companyId, java.lang.String name)
130         throws com.liferay.portal.PortalException,
131             com.liferay.portal.SystemException;
132 
133     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
134     public long getOrganizationId(long companyId, java.lang.String name)
135         throws com.liferay.portal.SystemException;
136 
137     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
138     public java.util.List<com.liferay.portal.model.Organization> getOrganizations(
139         long[] organizationIds)
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> getParentOrganizations(
145         long organizationId)
146         throws com.liferay.portal.PortalException,
147             com.liferay.portal.SystemException;
148 
149     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
150     public java.util.List<com.liferay.portal.model.Organization> getSuborganizations(
151         java.util.List<com.liferay.portal.model.Organization> organizations)
152         throws com.liferay.portal.SystemException;
153 
154     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
155     public java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations(
156         java.util.List<com.liferay.portal.model.Organization> allOrganizations,
157         java.util.List<com.liferay.portal.model.Organization> availableOrganizations);
158 
159     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160     public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
161         long userId) throws com.liferay.portal.SystemException;
162 
163     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164     public java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
165         long userId, int start, int end)
166         throws com.liferay.portal.SystemException;
167 
168     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
169     public int getUserOrganizationsCount(long userId)
170         throws com.liferay.portal.SystemException;
171 
172     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
173     public boolean hasGroupOrganization(long groupId, long organizationId)
174         throws com.liferay.portal.SystemException;
175 
176     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
177     public boolean hasUserOrganization(long userId, long organizationId)
178         throws com.liferay.portal.SystemException;
179 
180     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
181     public boolean hasUserOrganization(long userId, long organizationId,
182         boolean inherited, boolean includeSpecifiedOrganization)
183         throws com.liferay.portal.PortalException,
184             com.liferay.portal.SystemException;
185 
186     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
187     public boolean hasPasswordPolicyOrganization(long passwordPolicyId,
188         long organizationId) throws com.liferay.portal.SystemException;
189 
190     public void rebuildTree(long companyId, boolean force)
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 keywords,
196         java.lang.String type, java.lang.Long regionId,
197         java.lang.Long countryId,
198         java.util.LinkedHashMap<String, Object> params, int start, int end)
199         throws com.liferay.portal.SystemException;
200 
201     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
202     public java.util.List<com.liferay.portal.model.Organization> search(
203         long companyId, long parentOrganizationId, java.lang.String keywords,
204         java.lang.String type, java.lang.Long regionId,
205         java.lang.Long countryId,
206         java.util.LinkedHashMap<String, Object> params, int start, int end,
207         com.liferay.portal.kernel.util.OrderByComparator obc)
208         throws com.liferay.portal.SystemException;
209 
210     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211     public java.util.List<com.liferay.portal.model.Organization> search(
212         long companyId, long parentOrganizationId, java.lang.String name,
213         java.lang.String type, java.lang.String street, java.lang.String city,
214         java.lang.String zip, java.lang.Long regionId,
215         java.lang.Long countryId,
216         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
217         int start, int end) throws com.liferay.portal.SystemException;
218 
219     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
220     public java.util.List<com.liferay.portal.model.Organization> search(
221         long companyId, long parentOrganizationId, java.lang.String name,
222         java.lang.String type, java.lang.String street, java.lang.String city,
223         java.lang.String zip, java.lang.Long regionId,
224         java.lang.Long countryId,
225         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
226         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
227         throws com.liferay.portal.SystemException;
228 
229     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230     public int searchCount(long companyId, long parentOrganizationId,
231         java.lang.String keywords, java.lang.String type,
232         java.lang.Long regionId, java.lang.Long countryId,
233         java.util.LinkedHashMap<String, Object> params)
234         throws com.liferay.portal.SystemException;
235 
236     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
237     public int searchCount(long companyId, long parentOrganizationId,
238         java.lang.String name, java.lang.String type, java.lang.String street,
239         java.lang.String city, java.lang.String zip, java.lang.Long regionId,
240         java.lang.Long countryId,
241         java.util.LinkedHashMap<String, Object> params, boolean andOperator)
242         throws com.liferay.portal.SystemException;
243 
244     public void setGroupOrganizations(long groupId, long[] organizationIds)
245         throws com.liferay.portal.SystemException;
246 
247     public void unsetGroupOrganizations(long groupId, long[] organizationIds)
248         throws com.liferay.portal.SystemException;
249 
250     public void unsetPasswordPolicyOrganizations(long passwordPolicyId,
251         long[] organizationIds) throws com.liferay.portal.SystemException;
252 
253     public com.liferay.portal.model.Organization updateOrganization(
254         long companyId, long organizationId, long parentOrganizationId,
255         java.lang.String name, java.lang.String type, boolean recursable,
256         long regionId, long countryId, int statusId, java.lang.String comments,
257         com.liferay.portal.service.ServiceContext serviceContext)
258         throws com.liferay.portal.PortalException,
259             com.liferay.portal.SystemException;
260 
261     public void updateTagsAsset(long userId,
262         com.liferay.portal.model.Organization organization,
263         java.lang.String[] tagsCategories, java.lang.String[] tagsEntries)
264         throws com.liferay.portal.PortalException,
265             com.liferay.portal.SystemException;
266 }