001
014
015 package com.liferay.portal.kernel.service;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
020 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021 import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
022 import com.liferay.portal.kernel.dao.orm.Projection;
023 import com.liferay.portal.kernel.exception.PortalException;
024 import com.liferay.portal.kernel.exception.SystemException;
025 import com.liferay.portal.kernel.model.PersistedModel;
026 import com.liferay.portal.kernel.model.Portlet;
027 import com.liferay.portal.kernel.model.PortletPreferences;
028 import com.liferay.portal.kernel.model.PortletPreferencesIds;
029 import com.liferay.portal.kernel.search.Indexable;
030 import com.liferay.portal.kernel.search.IndexableType;
031 import com.liferay.portal.kernel.spring.aop.Property;
032 import com.liferay.portal.kernel.spring.aop.Retry;
033 import com.liferay.portal.kernel.spring.aop.Skip;
034 import com.liferay.portal.kernel.transaction.Isolation;
035 import com.liferay.portal.kernel.transaction.Propagation;
036 import com.liferay.portal.kernel.transaction.Transactional;
037 import com.liferay.portal.kernel.util.OrderByComparator;
038
039 import java.io.Serializable;
040
041 import java.util.List;
042
043
055 @ProviderType
056 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
057 PortalException.class, SystemException.class})
058 public interface PortletPreferencesLocalService extends BaseLocalService,
059 PersistedModelLocalService {
060
065 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
066 public ActionableDynamicQuery getActionableDynamicQuery();
067
068 public DynamicQuery dynamicQuery();
069
070 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
071 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
072
073
076 @Override
077 public PersistedModel deletePersistedModel(PersistedModel persistedModel)
078 throws PortalException;
079
080 @Override
081 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
082 public PersistedModel getPersistedModel(Serializable primaryKeyObj)
083 throws PortalException;
084
085
091 @Indexable(type = IndexableType.REINDEX)
092 public PortletPreferences addPortletPreferences(
093 PortletPreferences portletPreferences);
094
095 public PortletPreferences addPortletPreferences(long companyId,
096 long ownerId, int ownerType, long plid, java.lang.String portletId,
097 Portlet portlet, java.lang.String defaultPreferences);
098
099
105 public PortletPreferences createPortletPreferences(
106 long portletPreferencesId);
107
108
114 @Indexable(type = IndexableType.DELETE)
115 public PortletPreferences deletePortletPreferences(
116 PortletPreferences portletPreferences);
117
118
125 @Indexable(type = IndexableType.DELETE)
126 public PortletPreferences deletePortletPreferences(
127 long portletPreferencesId) throws PortalException;
128
129 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
130 public PortletPreferences fetchPortletPreferences(long portletPreferencesId);
131
132 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
133 public PortletPreferences getPortletPreferences(long ownerId,
134 int ownerType, long plid, java.lang.String portletId)
135 throws PortalException;
136
137
144 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
145 public PortletPreferences getPortletPreferences(long portletPreferencesId)
146 throws PortalException;
147
148
154 @Indexable(type = IndexableType.REINDEX)
155 public PortletPreferences updatePortletPreferences(
156 PortletPreferences portletPreferences);
157
158 public PortletPreferences updatePreferences(long ownerId, int ownerType,
159 long plid, java.lang.String portletId, java.lang.String xml);
160
161 public PortletPreferences updatePreferences(long ownerId, int ownerType,
162 long plid, java.lang.String portletId,
163 javax.portlet.PortletPreferences portletPreferences);
164
165
170 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
171 public int getPortletPreferencesesCount();
172
173
178 public java.lang.String getOSGiServiceIdentifier();
179
180
186 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
187
188
200 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
201 int end);
202
203
216 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
217 int end, OrderByComparator<T> orderByComparator);
218
219 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
220 public List<PortletPreferences> getPortletPreferences();
221
222 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
223 public List<PortletPreferences> getPortletPreferences(int ownerType,
224 long plid, java.lang.String portletId);
225
226 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
227 public List<PortletPreferences> getPortletPreferences(long companyId,
228 long groupId, long ownerId, int ownerType, java.lang.String portletId,
229 boolean privateLayout);
230
231 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
232 public List<PortletPreferences> getPortletPreferences(long ownerId,
233 int ownerType, long plid);
234
235 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
236 public List<PortletPreferences> getPortletPreferences(long plid,
237 java.lang.String portletId);
238
239 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
240 public List<PortletPreferences> getPortletPreferencesByPlid(long plid);
241
242
253 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254 public List<PortletPreferences> getPortletPreferenceses(int start, int end);
255
256 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
257 public javax.portlet.PortletPreferences fetchPreferences(
258 PortletPreferencesIds portletPreferencesIds);
259
260 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
261 public javax.portlet.PortletPreferences fetchPreferences(long companyId,
262 long ownerId, int ownerType, long plid, java.lang.String portletId);
263
264 @Skip
265 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
266 public javax.portlet.PortletPreferences getDefaultPreferences(
267 long companyId, java.lang.String portletId);
268
269 @Retry(acceptor = ExceptionRetryAcceptor.class, properties = {
270 @Property(name = ExceptionRetryAcceptor.EXCEPTION_NAME, value = "org.springframework.dao.DataIntegrityViolationException")
271 }
272 )
273 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274 public javax.portlet.PortletPreferences getPreferences(
275 PortletPreferencesIds portletPreferencesIds);
276
277 @Retry(acceptor = ExceptionRetryAcceptor.class, properties = {
278 @Property(name = ExceptionRetryAcceptor.EXCEPTION_NAME, value = "org.springframework.dao.DataIntegrityViolationException")
279 }
280 )
281 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
282 public javax.portlet.PortletPreferences getPreferences(long companyId,
283 long ownerId, int ownerType, long plid, java.lang.String portletId);
284
285 @Retry(acceptor = ExceptionRetryAcceptor.class, properties = {
286 @Property(name = ExceptionRetryAcceptor.EXCEPTION_NAME, value = "org.springframework.dao.DataIntegrityViolationException")
287 }
288 )
289 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
290 public javax.portlet.PortletPreferences getPreferences(long companyId,
291 long ownerId, int ownerType, long plid, java.lang.String portletId,
292 java.lang.String defaultPreferences);
293
294 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
295 public javax.portlet.PortletPreferences getStrictPreferences(
296 PortletPreferencesIds portletPreferencesIds);
297
298 @Retry(acceptor = ExceptionRetryAcceptor.class, properties = {
299 @Property(name = ExceptionRetryAcceptor.EXCEPTION_NAME, value = "org.springframework.dao.DataIntegrityViolationException")
300 }
301 )
302 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
303 public javax.portlet.PortletPreferences getStrictPreferences(
304 long companyId, long ownerId, int ownerType, long plid,
305 java.lang.String portletId);
306
307
313 public long dynamicQueryCount(DynamicQuery dynamicQuery);
314
315
322 public long dynamicQueryCount(DynamicQuery dynamicQuery,
323 Projection projection);
324
325 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
326 public long getPortletPreferencesCount(int ownerType,
327 java.lang.String portletId);
328
329 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
330 public long getPortletPreferencesCount(int ownerType, long plid,
331 java.lang.String portletId);
332
333 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
334 public long getPortletPreferencesCount(long ownerId, int ownerType,
335 java.lang.String portletId, boolean excludeDefaultPreferences);
336
337 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
338 public long getPortletPreferencesCount(long ownerId, int ownerType,
339 long plid, Portlet portlet, boolean excludeDefaultPreferences);
340
341 public void deletePortletPreferences(long ownerId, int ownerType, long plid);
342
343 public void deletePortletPreferences(long ownerId, int ownerType,
344 long plid, java.lang.String portletId) throws PortalException;
345
346 public void deletePortletPreferencesByPlid(long plid);
347 }