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 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 220 public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); 221 222 /** 223 * Returns the layout friendly u r l with the primary key. 224 * 225 * @param layoutFriendlyURLId the primary key of the layout friendly u r l 226 * @return the layout friendly u r l 227 * @throws PortalException if a layout friendly u r l with the primary key could not be found 228 */ 229 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 230 public com.liferay.portal.model.LayoutFriendlyURL getLayoutFriendlyURL( 231 long layoutFriendlyURLId) throws PortalException; 232 233 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 234 public com.liferay.portal.model.LayoutFriendlyURL getLayoutFriendlyURL( 235 long plid, java.lang.String languageId) throws PortalException; 236 237 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 238 public com.liferay.portal.model.LayoutFriendlyURL getLayoutFriendlyURL( 239 long plid, java.lang.String languageId, boolean useDefault) 240 throws PortalException; 241 242 /** 243 * Returns the layout friendly u r l matching the UUID and group. 244 * 245 * @param uuid the layout friendly u r l's UUID 246 * @param groupId the primary key of the group 247 * @return the matching layout friendly u r l 248 * @throws PortalException if a matching layout friendly u r l could not be found 249 */ 250 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 251 public com.liferay.portal.model.LayoutFriendlyURL getLayoutFriendlyURLByUuidAndGroupId( 252 java.lang.String uuid, long groupId) throws PortalException; 253 254 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 255 public java.util.List<com.liferay.portal.model.LayoutFriendlyURL> getLayoutFriendlyURLs( 256 long plid); 257 258 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 259 public java.util.List<com.liferay.portal.model.LayoutFriendlyURL> getLayoutFriendlyURLs( 260 long plid, java.lang.String friendlyURL, int start, int end); 261 262 /** 263 * Returns a range of all the layout friendly u r ls. 264 * 265 * <p> 266 * 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. 267 * </p> 268 * 269 * @param start the lower bound of the range of layout friendly u r ls 270 * @param end the upper bound of the range of layout friendly u r ls (not inclusive) 271 * @return the range of layout friendly u r ls 272 */ 273 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 274 public java.util.List<com.liferay.portal.model.LayoutFriendlyURL> getLayoutFriendlyURLs( 275 int start, int end); 276 277 /** 278 * Returns all the layout friendly u r ls matching the UUID and company. 279 * 280 * @param uuid the UUID of the layout friendly u r ls 281 * @param companyId the primary key of the company 282 * @return the matching layout friendly u r ls, or an empty list if no matches were found 283 */ 284 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 285 public java.util.List<com.liferay.portal.model.LayoutFriendlyURL> getLayoutFriendlyURLsByUuidAndCompanyId( 286 java.lang.String uuid, long companyId); 287 288 /** 289 * Returns a range of layout friendly u r ls matching the UUID and company. 290 * 291 * @param uuid the UUID of the layout friendly u r ls 292 * @param companyId the primary key of the company 293 * @param start the lower bound of the range of layout friendly u r ls 294 * @param end the upper bound of the range of layout friendly u r ls (not inclusive) 295 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 296 * @return the range of matching layout friendly u r ls, or an empty list if no matches were found 297 */ 298 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 299 public java.util.List<com.liferay.portal.model.LayoutFriendlyURL> getLayoutFriendlyURLsByUuidAndCompanyId( 300 java.lang.String uuid, long companyId, int start, int end, 301 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutFriendlyURL> orderByComparator); 302 303 /** 304 * Returns the number of layout friendly u r ls. 305 * 306 * @return the number of layout friendly u r ls 307 */ 308 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 309 public int getLayoutFriendlyURLsCount(); 310 311 /** 312 * Returns the OSGi service identifier. 313 * 314 * @return the OSGi service identifier 315 */ 316 public java.lang.String getOSGiServiceIdentifier(); 317 318 @Override 319 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 320 public com.liferay.portal.model.PersistedModel getPersistedModel( 321 java.io.Serializable primaryKeyObj) throws PortalException; 322 323 /** 324 * 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. 325 * 326 * @param layoutFriendlyURL the layout friendly u r l 327 * @return the layout friendly u r l that was updated 328 */ 329 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 330 public com.liferay.portal.model.LayoutFriendlyURL updateLayoutFriendlyURL( 331 com.liferay.portal.model.LayoutFriendlyURL layoutFriendlyURL); 332 333 public com.liferay.portal.model.LayoutFriendlyURL updateLayoutFriendlyURL( 334 long userId, long companyId, long groupId, long plid, 335 boolean privateLayout, java.lang.String friendlyURL, 336 java.lang.String languageId, 337 com.liferay.portal.service.ServiceContext serviceContext) 338 throws PortalException; 339 340 public java.util.List<com.liferay.portal.model.LayoutFriendlyURL> updateLayoutFriendlyURLs( 341 long userId, long companyId, long groupId, long plid, 342 boolean privateLayout, 343 java.util.Map<java.util.Locale, java.lang.String> friendlyURLMap, 344 com.liferay.portal.service.ServiceContext serviceContext) 345 throws PortalException; 346 }