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.exception.PortalException; 020 import com.liferay.portal.kernel.exception.SystemException; 021 import com.liferay.portal.kernel.search.IndexableType; 022 import com.liferay.portal.kernel.transaction.Isolation; 023 import com.liferay.portal.kernel.transaction.Propagation; 024 import com.liferay.portal.kernel.transaction.Transactional; 025 026 /** 027 * Provides the local service interface for LayoutFriendlyURL. Methods of this 028 * service will not have security checks based on the propagated JAAS 029 * credentials because this service can only be accessed from within the same 030 * VM. 031 * 032 * @author Brian Wing Shun Chan 033 * @see LayoutFriendlyURLLocalServiceUtil 034 * @see com.liferay.portal.service.base.LayoutFriendlyURLLocalServiceBaseImpl 035 * @see com.liferay.portal.service.impl.LayoutFriendlyURLLocalServiceImpl 036 * @generated 037 */ 038 @ProviderType 039 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 040 PortalException.class, SystemException.class}) 041 public interface LayoutFriendlyURLLocalService extends BaseLocalService, 042 PersistedModelLocalService { 043 /* 044 * NOTE FOR DEVELOPERS: 045 * 046 * 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. 047 */ 048 049 /** 050 * Adds the layout friendly u r l to the database. Also notifies the appropriate model listeners. 051 * 052 * @param layoutFriendlyURL the layout friendly u r l 053 * @return the layout friendly u r l that was added 054 */ 055 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 056 public com.liferay.portal.model.LayoutFriendlyURL addLayoutFriendlyURL( 057 com.liferay.portal.model.LayoutFriendlyURL layoutFriendlyURL); 058 059 public com.liferay.portal.model.LayoutFriendlyURL addLayoutFriendlyURL( 060 long userId, long companyId, long groupId, long plid, 061 boolean privateLayout, java.lang.String friendlyURL, 062 java.lang.String languageId, 063 com.liferay.portal.service.ServiceContext serviceContext) 064 throws PortalException; 065 066 public java.util.List<com.liferay.portal.model.LayoutFriendlyURL> addLayoutFriendlyURLs( 067 long userId, long companyId, long groupId, long plid, 068 boolean privateLayout, 069 java.util.Map<java.util.Locale, java.lang.String> friendlyURLMap, 070 com.liferay.portal.service.ServiceContext serviceContext) 071 throws PortalException; 072 073 /** 074 * Creates a new layout friendly u r l with the primary key. Does not add the layout friendly u r l to the database. 075 * 076 * @param layoutFriendlyURLId the primary key for the new layout friendly u r l 077 * @return the new layout friendly u r l 078 */ 079 public com.liferay.portal.model.LayoutFriendlyURL createLayoutFriendlyURL( 080 long layoutFriendlyURLId); 081 082 /** 083 * Deletes the layout friendly u r l from the database. Also notifies the appropriate model listeners. 084 * 085 * @param layoutFriendlyURL the layout friendly u r l 086 * @return the layout friendly u r l that was removed 087 */ 088 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 089 public com.liferay.portal.model.LayoutFriendlyURL deleteLayoutFriendlyURL( 090 com.liferay.portal.model.LayoutFriendlyURL layoutFriendlyURL); 091 092 /** 093 * Deletes the layout friendly u r l with the primary key from the database. Also notifies the appropriate model listeners. 094 * 095 * @param layoutFriendlyURLId the primary key of the layout friendly u r l 096 * @return the layout friendly u r l that was removed 097 * @throws PortalException if a layout friendly u r l with the primary key could not be found 098 */ 099 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 100 public com.liferay.portal.model.LayoutFriendlyURL deleteLayoutFriendlyURL( 101 long layoutFriendlyURLId) throws PortalException; 102 103 public void deleteLayoutFriendlyURL(long plid, java.lang.String languageId); 104 105 public void deleteLayoutFriendlyURLs(long plid); 106 107 /** 108 * @throws PortalException 109 */ 110 @Override 111 public com.liferay.portal.model.PersistedModel deletePersistedModel( 112 com.liferay.portal.model.PersistedModel persistedModel) 113 throws PortalException; 114 115 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 116 117 /** 118 * Performs a dynamic query on the database and returns the matching rows. 119 * 120 * @param dynamicQuery the dynamic query 121 * @return the matching rows 122 */ 123 public <T> java.util.List<T> dynamicQuery( 124 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 125 126 /** 127 * Performs a dynamic query on the database and returns a range of the matching rows. 128 * 129 * <p> 130 * 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. 131 * </p> 132 * 133 * @param dynamicQuery the dynamic query 134 * @param start the lower bound of the range of model instances 135 * @param end the upper bound of the range of model instances (not inclusive) 136 * @return the range of matching rows 137 */ 138 public <T> java.util.List<T> dynamicQuery( 139 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 140 int end); 141 142 /** 143 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 144 * 145 * <p> 146 * 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. 147 * </p> 148 * 149 * @param dynamicQuery the dynamic query 150 * @param start the lower bound of the range of model instances 151 * @param end the upper bound of the range of model instances (not inclusive) 152 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 153 * @return the ordered range of matching rows 154 */ 155 public <T> java.util.List<T> dynamicQuery( 156 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 157 int end, 158 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator); 159 160 /** 161 * Returns the number of rows matching the dynamic query. 162 * 163 * @param dynamicQuery the dynamic query 164 * @return the number of rows matching the dynamic query 165 */ 166 public long dynamicQueryCount( 167 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 168 169 /** 170 * Returns the number of rows matching the dynamic query. 171 * 172 * @param dynamicQuery the dynamic query 173 * @param projection the projection to apply to the query 174 * @return the number of rows matching the dynamic query 175 */ 176 public long dynamicQueryCount( 177 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 178 com.liferay.portal.kernel.dao.orm.Projection projection); 179 180 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 181 public com.liferay.portal.model.LayoutFriendlyURL fetchFirstLayoutFriendlyURL( 182 long groupId, boolean privateLayout, java.lang.String friendlyURL); 183 184 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 185 public com.liferay.portal.model.LayoutFriendlyURL fetchLayoutFriendlyURL( 186 long groupId, boolean privateLayout, java.lang.String friendlyURL, 187 java.lang.String languageId); 188 189 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 190 public com.liferay.portal.model.LayoutFriendlyURL fetchLayoutFriendlyURL( 191 long layoutFriendlyURLId); 192 193 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 194 public com.liferay.portal.model.LayoutFriendlyURL fetchLayoutFriendlyURL( 195 long plid, java.lang.String languageId); 196 197 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 198 public com.liferay.portal.model.LayoutFriendlyURL fetchLayoutFriendlyURL( 199 long plid, java.lang.String languageId, boolean useDefault); 200 201 /** 202 * Returns the layout friendly u r l matching the UUID and group. 203 * 204 * @param uuid the layout friendly u r l's UUID 205 * @param groupId the primary key of the group 206 * @return the matching layout friendly u r l, or <code>null</code> if a matching layout friendly u r l could not be found 207 */ 208 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 209 public com.liferay.portal.model.LayoutFriendlyURL fetchLayoutFriendlyURLByUuidAndGroupId( 210 java.lang.String uuid, long groupId); 211 212 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 213 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 214 215 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 216 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 217 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext); 218 219 /** 220 * Returns the layout friendly u r l with the primary key. 221 * 222 * @param layoutFriendlyURLId the primary key of the layout friendly u r l 223 * @return the layout friendly u r l 224 * @throws PortalException if a layout friendly u r l with the primary key could not be found 225 */ 226 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 227 public com.liferay.portal.model.LayoutFriendlyURL getLayoutFriendlyURL( 228 long layoutFriendlyURLId) throws PortalException; 229 230 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 231 public com.liferay.portal.model.LayoutFriendlyURL getLayoutFriendlyURL( 232 long plid, java.lang.String languageId) throws PortalException; 233 234 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 235 public com.liferay.portal.model.LayoutFriendlyURL getLayoutFriendlyURL( 236 long plid, java.lang.String languageId, boolean useDefault) 237 throws PortalException; 238 239 /** 240 * Returns the layout friendly u r l matching the UUID and group. 241 * 242 * @param uuid the layout friendly u r l's UUID 243 * @param groupId the primary key of the group 244 * @return the matching layout friendly u r l 245 * @throws PortalException if a matching layout friendly u r l could not be found 246 */ 247 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 248 public com.liferay.portal.model.LayoutFriendlyURL getLayoutFriendlyURLByUuidAndGroupId( 249 java.lang.String uuid, long groupId) throws PortalException; 250 251 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 252 public java.util.List<com.liferay.portal.model.LayoutFriendlyURL> getLayoutFriendlyURLs( 253 long plid); 254 255 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 256 public java.util.List<com.liferay.portal.model.LayoutFriendlyURL> getLayoutFriendlyURLs( 257 long plid, java.lang.String friendlyURL, int start, int end); 258 259 /** 260 * Returns a range of all the layout friendly u r ls. 261 * 262 * <p> 263 * 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. 264 * </p> 265 * 266 * @param start the lower bound of the range of layout friendly u r ls 267 * @param end the upper bound of the range of layout friendly u r ls (not inclusive) 268 * @return the range of layout friendly u r ls 269 */ 270 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 271 public java.util.List<com.liferay.portal.model.LayoutFriendlyURL> getLayoutFriendlyURLs( 272 int start, int end); 273 274 /** 275 * Returns all the layout friendly u r ls matching the UUID and company. 276 * 277 * @param uuid the UUID of the layout friendly u r ls 278 * @param companyId the primary key of the company 279 * @return the matching layout friendly u r ls, or an empty list if no matches were found 280 */ 281 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 282 public java.util.List<com.liferay.portal.model.LayoutFriendlyURL> getLayoutFriendlyURLsByUuidAndCompanyId( 283 java.lang.String uuid, long companyId); 284 285 /** 286 * Returns a range of layout friendly u r ls matching the UUID and company. 287 * 288 * @param uuid the UUID of the layout friendly u r ls 289 * @param companyId the primary key of the company 290 * @param start the lower bound of the range of layout friendly u r ls 291 * @param end the upper bound of the range of layout friendly u r ls (not inclusive) 292 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 293 * @return the range of matching layout friendly u r ls, or an empty list if no matches were found 294 */ 295 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 296 public java.util.List<com.liferay.portal.model.LayoutFriendlyURL> getLayoutFriendlyURLsByUuidAndCompanyId( 297 java.lang.String uuid, long companyId, int start, int end, 298 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutFriendlyURL> orderByComparator); 299 300 /** 301 * Returns the number of layout friendly u r ls. 302 * 303 * @return the number of layout friendly u r ls 304 */ 305 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 306 public int getLayoutFriendlyURLsCount(); 307 308 /** 309 * Returns the OSGi service identifier. 310 * 311 * @return the OSGi service identifier 312 */ 313 public java.lang.String getOSGiServiceIdentifier(); 314 315 @Override 316 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 317 public com.liferay.portal.model.PersistedModel getPersistedModel( 318 java.io.Serializable primaryKeyObj) throws PortalException; 319 320 /** 321 * 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. 322 * 323 * @param layoutFriendlyURL the layout friendly u r l 324 * @return the layout friendly u r l that was updated 325 */ 326 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 327 public com.liferay.portal.model.LayoutFriendlyURL updateLayoutFriendlyURL( 328 com.liferay.portal.model.LayoutFriendlyURL layoutFriendlyURL); 329 330 public com.liferay.portal.model.LayoutFriendlyURL updateLayoutFriendlyURL( 331 long userId, long companyId, long groupId, long plid, 332 boolean privateLayout, java.lang.String friendlyURL, 333 java.lang.String languageId, 334 com.liferay.portal.service.ServiceContext serviceContext) 335 throws PortalException; 336 337 public java.util.List<com.liferay.portal.model.LayoutFriendlyURL> updateLayoutFriendlyURLs( 338 long userId, long companyId, long groupId, long plid, 339 boolean privateLayout, 340 java.util.Map<java.util.Locale, java.lang.String> friendlyURLMap, 341 com.liferay.portal.service.ServiceContext serviceContext) 342 throws PortalException; 343 }