1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.annotation.Isolation;
18  import com.liferay.portal.kernel.annotation.Propagation;
19  import com.liferay.portal.kernel.annotation.Transactional;
20  import com.liferay.portal.kernel.exception.PortalException;
21  import com.liferay.portal.kernel.exception.SystemException;
22  
23  /**
24   * <a href="ResourceLocalService.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This interface defines the service. The default implementation is
33   * {@link
34   * com.liferay.portal.service.impl.ResourceLocalServiceImpl}}.
35   * Modify methods in that class and rerun ServiceBuilder to populate this class
36   * and all other generated classes.
37   * </p>
38   *
39   * <p>
40   * 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.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       ResourceLocalServiceUtil
45   * @generated
46   */
47  @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
48      PortalException.class, SystemException.class})
49  public interface ResourceLocalService {
50      public com.liferay.portal.model.Resource addResource(
51          com.liferay.portal.model.Resource resource)
52          throws com.liferay.portal.kernel.exception.SystemException;
53  
54      public com.liferay.portal.model.Resource createResource(long resourceId);
55  
56      public void deleteResource(long resourceId)
57          throws com.liferay.portal.kernel.exception.PortalException,
58              com.liferay.portal.kernel.exception.SystemException;
59  
60      public void deleteResource(com.liferay.portal.model.Resource resource)
61          throws com.liferay.portal.kernel.exception.SystemException;
62  
63      public java.util.List<Object> dynamicQuery(
64          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65          throws com.liferay.portal.kernel.exception.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.kernel.exception.SystemException;
70  
71      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
72      public com.liferay.portal.model.Resource getResource(long resourceId)
73          throws com.liferay.portal.kernel.exception.PortalException,
74              com.liferay.portal.kernel.exception.SystemException;
75  
76      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
77      public java.util.List<com.liferay.portal.model.Resource> getResources(
78          int start, int end)
79          throws com.liferay.portal.kernel.exception.SystemException;
80  
81      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
82      public int getResourcesCount()
83          throws com.liferay.portal.kernel.exception.SystemException;
84  
85      public com.liferay.portal.model.Resource updateResource(
86          com.liferay.portal.model.Resource resource)
87          throws com.liferay.portal.kernel.exception.SystemException;
88  
89      public com.liferay.portal.model.Resource updateResource(
90          com.liferay.portal.model.Resource resource, boolean merge)
91          throws com.liferay.portal.kernel.exception.SystemException;
92  
93      public void addModelResources(long companyId, long groupId, long userId,
94          java.lang.String name, long primKey,
95          java.lang.String[] communityPermissions,
96          java.lang.String[] guestPermissions)
97          throws com.liferay.portal.kernel.exception.PortalException,
98              com.liferay.portal.kernel.exception.SystemException;
99  
100     public void addModelResources(long companyId, long groupId, long userId,
101         java.lang.String name, java.lang.String primKey,
102         java.lang.String[] communityPermissions,
103         java.lang.String[] guestPermissions)
104         throws com.liferay.portal.kernel.exception.PortalException,
105             com.liferay.portal.kernel.exception.SystemException;
106 
107     public com.liferay.portal.model.Resource addResource(long companyId,
108         java.lang.String name, int scope, java.lang.String primKey)
109         throws com.liferay.portal.kernel.exception.SystemException;
110 
111     public void addResources(long companyId, long groupId,
112         java.lang.String name, boolean portletActions)
113         throws com.liferay.portal.kernel.exception.PortalException,
114             com.liferay.portal.kernel.exception.SystemException;
115 
116     public void addResources(long companyId, long groupId, long userId,
117         java.lang.String name, long primKey, boolean portletActions,
118         boolean addCommunityPermissions, boolean addGuestPermissions)
119         throws com.liferay.portal.kernel.exception.PortalException,
120             com.liferay.portal.kernel.exception.SystemException;
121 
122     public void addResources(long companyId, long groupId, long userId,
123         java.lang.String name, java.lang.String primKey,
124         boolean portletActions, boolean addCommunityPermissions,
125         boolean addGuestPermissions)
126         throws com.liferay.portal.kernel.exception.PortalException,
127             com.liferay.portal.kernel.exception.SystemException;
128 
129     public void deleteResource(long companyId, java.lang.String name,
130         int scope, long primKey)
131         throws com.liferay.portal.kernel.exception.PortalException,
132             com.liferay.portal.kernel.exception.SystemException;
133 
134     public void deleteResource(long companyId, java.lang.String name,
135         int scope, java.lang.String primKey)
136         throws com.liferay.portal.kernel.exception.PortalException,
137             com.liferay.portal.kernel.exception.SystemException;
138 
139     public void deleteResources(java.lang.String name)
140         throws com.liferay.portal.kernel.exception.SystemException;
141 
142     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
143     public long getLatestResourceId()
144         throws com.liferay.portal.kernel.exception.SystemException;
145 
146     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
147     public com.liferay.portal.model.Resource getResource(long companyId,
148         java.lang.String name, int scope, java.lang.String primKey)
149         throws com.liferay.portal.kernel.exception.PortalException,
150             com.liferay.portal.kernel.exception.SystemException;
151 
152     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
153     public java.util.List<com.liferay.portal.model.Resource> getResources()
154         throws com.liferay.portal.kernel.exception.SystemException;
155 
156     public void updateResources(long companyId, long groupId,
157         java.lang.String name, long primKey,
158         java.lang.String[] communityPermissions,
159         java.lang.String[] guestPermissions)
160         throws com.liferay.portal.kernel.exception.PortalException,
161             com.liferay.portal.kernel.exception.SystemException;
162 
163     public void updateResources(long companyId, long groupId,
164         java.lang.String name, java.lang.String primKey,
165         java.lang.String[] communityPermissions,
166         java.lang.String[] guestPermissions)
167         throws com.liferay.portal.kernel.exception.PortalException,
168             com.liferay.portal.kernel.exception.SystemException;
169 }