001 /** 002 * Copyright (c) 2000-present Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.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.ExportActionableDynamicQuery; 022 import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery; 023 import com.liferay.portal.kernel.dao.orm.Projection; 024 import com.liferay.portal.kernel.exception.PortalException; 025 import com.liferay.portal.kernel.exception.SystemException; 026 import com.liferay.portal.kernel.search.Indexable; 027 import com.liferay.portal.kernel.search.IndexableType; 028 import com.liferay.portal.kernel.transaction.Isolation; 029 import com.liferay.portal.kernel.transaction.Propagation; 030 import com.liferay.portal.kernel.transaction.Transactional; 031 import com.liferay.portal.kernel.util.OrderByComparator; 032 import com.liferay.portal.model.LayoutFriendlyURL; 033 import com.liferay.portal.model.PersistedModel; 034 035 import com.liferay.portlet.exportimport.lar.PortletDataContext; 036 037 import java.io.Serializable; 038 039 import java.util.List; 040 import java.util.Locale; 041 import java.util.Map; 042 043 /** 044 * Provides the local service interface for LayoutFriendlyURL. Methods of this 045 * service will not have security checks based on the propagated JAAS 046 * credentials because this service can only be accessed from within the same 047 * VM. 048 * 049 * @author Brian Wing Shun Chan 050 * @see LayoutFriendlyURLLocalServiceUtil 051 * @see com.liferay.portal.service.base.LayoutFriendlyURLLocalServiceBaseImpl 052 * @see com.liferay.portal.service.impl.LayoutFriendlyURLLocalServiceImpl 053 * @generated 054 */ 055 @ProviderType 056 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 057 PortalException.class, SystemException.class}) 058 public interface LayoutFriendlyURLLocalService extends BaseLocalService, 059 PersistedModelLocalService { 060 /* 061 * NOTE FOR DEVELOPERS: 062 * 063 * Never modify or reference this interface directly. Always use {@link LayoutFriendlyURLLocalServiceUtil} to access the layout friendly u r l local service. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutFriendlyURLLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 064 */ 065 066 /** 067 * Adds the layout friendly u r l to the database. Also notifies the appropriate model listeners. 068 * 069 * @param layoutFriendlyURL the layout friendly u r l 070 * @return the layout friendly u r l that was added 071 */ 072 @Indexable(type = IndexableType.REINDEX) 073 public LayoutFriendlyURL addLayoutFriendlyURL( 074 LayoutFriendlyURL layoutFriendlyURL); 075 076 public LayoutFriendlyURL addLayoutFriendlyURL(long userId, long companyId, 077 long groupId, long plid, boolean privateLayout, 078 java.lang.String friendlyURL, java.lang.String languageId, 079 com.liferay.portal.service.ServiceContext serviceContext) 080 throws PortalException; 081 082 public List<LayoutFriendlyURL> addLayoutFriendlyURLs(long userId, 083 long companyId, long groupId, long plid, boolean privateLayout, 084 Map<Locale, java.lang.String> friendlyURLMap, 085 com.liferay.portal.service.ServiceContext serviceContext) 086 throws PortalException; 087 088 /** 089 * Creates a new layout friendly u r l with the primary key. Does not add the layout friendly u r l to the database. 090 * 091 * @param layoutFriendlyURLId the primary key for the new layout friendly u r l 092 * @return the new layout friendly u r l 093 */ 094 public LayoutFriendlyURL createLayoutFriendlyURL(long layoutFriendlyURLId); 095 096 /** 097 * Deletes the layout friendly u r l from the database. Also notifies the appropriate model listeners. 098 * 099 * @param layoutFriendlyURL the layout friendly u r l 100 * @return the layout friendly u r l that was removed 101 */ 102 @Indexable(type = IndexableType.DELETE) 103 public LayoutFriendlyURL deleteLayoutFriendlyURL( 104 LayoutFriendlyURL layoutFriendlyURL); 105 106 /** 107 * Deletes the layout friendly u r l with the primary key from the database. Also notifies the appropriate model listeners. 108 * 109 * @param layoutFriendlyURLId the primary key of the layout friendly u r l 110 * @return the layout friendly u r l that was removed 111 * @throws PortalException if a layout friendly u r l with the primary key could not be found 112 */ 113 @Indexable(type = IndexableType.DELETE) 114 public LayoutFriendlyURL deleteLayoutFriendlyURL(long layoutFriendlyURLId) 115 throws PortalException; 116 117 public void deleteLayoutFriendlyURL(long plid, java.lang.String languageId); 118 119 public void deleteLayoutFriendlyURLs(long plid); 120 121 /** 122 * @throws PortalException 123 */ 124 @Override 125 public PersistedModel deletePersistedModel(PersistedModel persistedModel) 126 throws PortalException; 127 128 public DynamicQuery dynamicQuery(); 129 130 /** 131 * Performs a dynamic query on the database and returns the matching rows. 132 * 133 * @param dynamicQuery the dynamic query 134 * @return the matching rows 135 */ 136 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery); 137 138 /** 139 * Performs a dynamic query on the database and returns a range of the matching rows. 140 * 141 * <p> 142 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LayoutFriendlyURLModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 143 * </p> 144 * 145 * @param dynamicQuery the dynamic query 146 * @param start the lower bound of the range of model instances 147 * @param end the upper bound of the range of model instances (not inclusive) 148 * @return the range of matching rows 149 */ 150 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, 151 int end); 152 153 /** 154 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 155 * 156 * <p> 157 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LayoutFriendlyURLModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 158 * </p> 159 * 160 * @param dynamicQuery the dynamic query 161 * @param start the lower bound of the range of model instances 162 * @param end the upper bound of the range of model instances (not inclusive) 163 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 164 * @return the ordered range of matching rows 165 */ 166 public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, 167 int end, OrderByComparator<T> orderByComparator); 168 169 /** 170 * Returns the number of rows matching the dynamic query. 171 * 172 * @param dynamicQuery the dynamic query 173 * @return the number of rows matching the dynamic query 174 */ 175 public long dynamicQueryCount(DynamicQuery dynamicQuery); 176 177 /** 178 * Returns the number of rows matching the dynamic query. 179 * 180 * @param dynamicQuery the dynamic query 181 * @param projection the projection to apply to the query 182 * @return the number of rows matching the dynamic query 183 */ 184 public long dynamicQueryCount(DynamicQuery dynamicQuery, 185 Projection projection); 186 187 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 188 public LayoutFriendlyURL fetchFirstLayoutFriendlyURL(long groupId, 189 boolean privateLayout, java.lang.String friendlyURL); 190 191 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 192 public LayoutFriendlyURL fetchLayoutFriendlyURL(long groupId, 193 boolean privateLayout, java.lang.String friendlyURL, 194 java.lang.String languageId); 195 196 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 197 public LayoutFriendlyURL fetchLayoutFriendlyURL(long layoutFriendlyURLId); 198 199 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 200 public LayoutFriendlyURL fetchLayoutFriendlyURL(long plid, 201 java.lang.String languageId); 202 203 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 204 public LayoutFriendlyURL fetchLayoutFriendlyURL(long plid, 205 java.lang.String languageId, boolean useDefault); 206 207 /** 208 * Returns the layout friendly u r l matching the UUID and group. 209 * 210 * @param uuid the layout friendly u r l's UUID 211 * @param groupId the primary key of the group 212 * @return the matching layout friendly u r l, or <code>null</code> if a matching layout friendly u r l could not be found 213 */ 214 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 215 public LayoutFriendlyURL fetchLayoutFriendlyURLByUuidAndGroupId( 216 java.lang.String uuid, long groupId); 217 218 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 219 public ActionableDynamicQuery getActionableDynamicQuery(); 220 221 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 222 public ExportActionableDynamicQuery getExportActionableDynamicQuery( 223 PortletDataContext portletDataContext); 224 225 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 226 public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); 227 228 /** 229 * Returns the layout friendly u r l with the primary key. 230 * 231 * @param layoutFriendlyURLId the primary key of the layout friendly u r l 232 * @return the layout friendly u r l 233 * @throws PortalException if a layout friendly u r l with the primary key could not be found 234 */ 235 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 236 public LayoutFriendlyURL getLayoutFriendlyURL(long layoutFriendlyURLId) 237 throws PortalException; 238 239 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 240 public LayoutFriendlyURL getLayoutFriendlyURL(long plid, 241 java.lang.String languageId) throws PortalException; 242 243 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 244 public LayoutFriendlyURL getLayoutFriendlyURL(long plid, 245 java.lang.String languageId, boolean useDefault) 246 throws PortalException; 247 248 /** 249 * Returns the layout friendly u r l matching the UUID and group. 250 * 251 * @param uuid the layout friendly u r l's UUID 252 * @param groupId the primary key of the group 253 * @return the matching layout friendly u r l 254 * @throws PortalException if a matching layout friendly u r l could not be found 255 */ 256 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 257 public LayoutFriendlyURL getLayoutFriendlyURLByUuidAndGroupId( 258 java.lang.String uuid, long groupId) throws PortalException; 259 260 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 261 public List<LayoutFriendlyURL> getLayoutFriendlyURLs(long plid); 262 263 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 264 public List<LayoutFriendlyURL> getLayoutFriendlyURLs(long plid, 265 java.lang.String friendlyURL, int start, int end); 266 267 /** 268 * Returns a range of all the layout friendly u r ls. 269 * 270 * <p> 271 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.LayoutFriendlyURLModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 272 * </p> 273 * 274 * @param start the lower bound of the range of layout friendly u r ls 275 * @param end the upper bound of the range of layout friendly u r ls (not inclusive) 276 * @return the range of layout friendly u r ls 277 */ 278 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 279 public List<LayoutFriendlyURL> getLayoutFriendlyURLs(int start, int end); 280 281 /** 282 * Returns all the layout friendly u r ls matching the UUID and company. 283 * 284 * @param uuid the UUID of the layout friendly u r ls 285 * @param companyId the primary key of the company 286 * @return the matching layout friendly u r ls, or an empty list if no matches were found 287 */ 288 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 289 public List<LayoutFriendlyURL> getLayoutFriendlyURLsByUuidAndCompanyId( 290 java.lang.String uuid, long companyId); 291 292 /** 293 * Returns a range of layout friendly u r ls matching the UUID and company. 294 * 295 * @param uuid the UUID of the layout friendly u r ls 296 * @param companyId the primary key of the company 297 * @param start the lower bound of the range of layout friendly u r ls 298 * @param end the upper bound of the range of layout friendly u r ls (not inclusive) 299 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 300 * @return the range of matching layout friendly u r ls, or an empty list if no matches were found 301 */ 302 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 303 public List<LayoutFriendlyURL> getLayoutFriendlyURLsByUuidAndCompanyId( 304 java.lang.String uuid, long companyId, int start, int end, 305 OrderByComparator<LayoutFriendlyURL> orderByComparator); 306 307 /** 308 * Returns the number of layout friendly u r ls. 309 * 310 * @return the number of layout friendly u r ls 311 */ 312 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 313 public int getLayoutFriendlyURLsCount(); 314 315 /** 316 * Returns the OSGi service identifier. 317 * 318 * @return the OSGi service identifier 319 */ 320 public java.lang.String getOSGiServiceIdentifier(); 321 322 @Override 323 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 324 public PersistedModel getPersistedModel(Serializable primaryKeyObj) 325 throws PortalException; 326 327 /** 328 * Updates the layout friendly u r l in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 329 * 330 * @param layoutFriendlyURL the layout friendly u r l 331 * @return the layout friendly u r l that was updated 332 */ 333 @Indexable(type = IndexableType.REINDEX) 334 public LayoutFriendlyURL updateLayoutFriendlyURL( 335 LayoutFriendlyURL layoutFriendlyURL); 336 337 public LayoutFriendlyURL updateLayoutFriendlyURL(long userId, 338 long companyId, long groupId, long plid, boolean privateLayout, 339 java.lang.String friendlyURL, java.lang.String languageId, 340 com.liferay.portal.service.ServiceContext serviceContext) 341 throws PortalException; 342 343 public List<LayoutFriendlyURL> updateLayoutFriendlyURLs(long userId, 344 long companyId, long groupId, long plid, boolean privateLayout, 345 Map<Locale, java.lang.String> friendlyURLMap, 346 com.liferay.portal.service.ServiceContext serviceContext) 347 throws PortalException; 348 }