1   /**
2    * Copyright (c) 2000-2010 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   *
12   * 
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.PortalException;
18  import com.liferay.portal.SystemException;
19  import com.liferay.portal.kernel.annotation.Isolation;
20  import com.liferay.portal.kernel.annotation.Propagation;
21  import com.liferay.portal.kernel.annotation.Transactional;
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.SystemException;
53  
54      public com.liferay.portal.model.Resource createResource(long resourceId);
55  
56      public void deleteResource(long resourceId)
57          throws com.liferay.portal.PortalException,
58              com.liferay.portal.SystemException;
59  
60      public void deleteResource(com.liferay.portal.model.Resource resource)
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      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
72      public com.liferay.portal.model.Resource getResource(long resourceId)
73          throws com.liferay.portal.PortalException,
74              com.liferay.portal.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) throws com.liferay.portal.SystemException;
79  
80      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
81      public int getResourcesCount() throws com.liferay.portal.SystemException;
82  
83      public com.liferay.portal.model.Resource updateResource(
84          com.liferay.portal.model.Resource resource)
85          throws com.liferay.portal.SystemException;
86  
87      public com.liferay.portal.model.Resource updateResource(
88          com.liferay.portal.model.Resource resource, boolean merge)
89          throws com.liferay.portal.SystemException;
90  
91      public void addModelResources(long companyId, long groupId, long userId,
92          java.lang.String name, long primKey,
93          java.lang.String[] communityPermissions,
94          java.lang.String[] guestPermissions)
95          throws com.liferay.portal.PortalException,
96              com.liferay.portal.SystemException;
97  
98      public void addModelResources(long companyId, long groupId, long userId,
99          java.lang.String name, java.lang.String primKey,
100         java.lang.String[] communityPermissions,
101         java.lang.String[] guestPermissions)
102         throws com.liferay.portal.PortalException,
103             com.liferay.portal.SystemException;
104 
105     public com.liferay.portal.model.Resource addResource(long companyId,
106         java.lang.String name, int scope, java.lang.String primKey)
107         throws com.liferay.portal.SystemException;
108 
109     public void addResources(long companyId, long groupId,
110         java.lang.String name, boolean portletActions)
111         throws com.liferay.portal.PortalException,
112             com.liferay.portal.SystemException;
113 
114     public void addResources(long companyId, long groupId, long userId,
115         java.lang.String name, long primKey, boolean portletActions,
116         boolean addCommunityPermissions, boolean addGuestPermissions)
117         throws com.liferay.portal.PortalException,
118             com.liferay.portal.SystemException;
119 
120     public void addResources(long companyId, long groupId, long userId,
121         java.lang.String name, java.lang.String primKey,
122         boolean portletActions, boolean addCommunityPermissions,
123         boolean addGuestPermissions)
124         throws com.liferay.portal.PortalException,
125             com.liferay.portal.SystemException;
126 
127     public void deleteResource(long companyId, java.lang.String name,
128         int scope, long primKey)
129         throws com.liferay.portal.PortalException,
130             com.liferay.portal.SystemException;
131 
132     public void deleteResource(long companyId, java.lang.String name,
133         int scope, java.lang.String primKey)
134         throws com.liferay.portal.PortalException,
135             com.liferay.portal.SystemException;
136 
137     public void deleteResources(java.lang.String name)
138         throws com.liferay.portal.SystemException;
139 
140     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
141     public long getLatestResourceId() throws com.liferay.portal.SystemException;
142 
143     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
144     public com.liferay.portal.model.Resource getResource(long companyId,
145         java.lang.String name, int scope, java.lang.String primKey)
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.Resource> getResources()
151         throws com.liferay.portal.SystemException;
152 
153     public void updateResources(long companyId, long groupId,
154         java.lang.String name, long primKey,
155         java.lang.String[] communityPermissions,
156         java.lang.String[] guestPermissions)
157         throws com.liferay.portal.PortalException,
158             com.liferay.portal.SystemException;
159 
160     public void updateResources(long companyId, long groupId,
161         java.lang.String name, java.lang.String primKey,
162         java.lang.String[] communityPermissions,
163         java.lang.String[] guestPermissions)
164         throws com.liferay.portal.PortalException,
165             com.liferay.portal.SystemException;
166 }