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 import com.liferay.portal.model.SystemEventConstants; 026 027 /** 028 * Provides the local service interface for LayoutPrototype. Methods of this 029 * service will not have security checks based on the propagated JAAS 030 * credentials because this service can only be accessed from within the same 031 * VM. 032 * 033 * @author Brian Wing Shun Chan 034 * @see LayoutPrototypeLocalServiceUtil 035 * @see com.liferay.portal.service.base.LayoutPrototypeLocalServiceBaseImpl 036 * @see com.liferay.portal.service.impl.LayoutPrototypeLocalServiceImpl 037 * @generated 038 */ 039 @ProviderType 040 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 041 PortalException.class, SystemException.class}) 042 public interface LayoutPrototypeLocalService extends BaseLocalService, 043 PersistedModelLocalService { 044 /* 045 * NOTE FOR DEVELOPERS: 046 * 047 * Never modify or reference this interface directly. Always use {@link LayoutPrototypeLocalServiceUtil} to access the layout prototype local service. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutPrototypeLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 048 */ 049 050 /** 051 * Adds the layout prototype to the database. Also notifies the appropriate model listeners. 052 * 053 * @param layoutPrototype the layout prototype 054 * @return the layout prototype that was added 055 */ 056 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 057 public com.liferay.portal.model.LayoutPrototype addLayoutPrototype( 058 com.liferay.portal.model.LayoutPrototype layoutPrototype); 059 060 /** 061 * @deprecated As of 6.2.0, replaced by {@link #addLayoutPrototype(long, 062 long, Map, String, boolean, ServiceContext)} 063 */ 064 @java.lang.Deprecated 065 public com.liferay.portal.model.LayoutPrototype addLayoutPrototype( 066 long userId, long companyId, 067 java.util.Map<java.util.Locale, java.lang.String> nameMap, 068 java.lang.String description, boolean active) 069 throws com.liferay.portal.kernel.exception.PortalException; 070 071 /** 072 * @deprecated As of 7.0.0, replaced by {@link #addLayoutPrototype(long, 073 long, Map, Map, boolean, ServiceContext)} 074 */ 075 @java.lang.Deprecated 076 public com.liferay.portal.model.LayoutPrototype addLayoutPrototype( 077 long userId, long companyId, 078 java.util.Map<java.util.Locale, java.lang.String> nameMap, 079 java.lang.String description, boolean active, 080 com.liferay.portal.service.ServiceContext serviceContext) 081 throws com.liferay.portal.kernel.exception.PortalException; 082 083 public com.liferay.portal.model.LayoutPrototype addLayoutPrototype( 084 long userId, long companyId, 085 java.util.Map<java.util.Locale, java.lang.String> nameMap, 086 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 087 boolean active, com.liferay.portal.service.ServiceContext serviceContext) 088 throws com.liferay.portal.kernel.exception.PortalException; 089 090 /** 091 * Creates a new layout prototype with the primary key. Does not add the layout prototype to the database. 092 * 093 * @param layoutPrototypeId the primary key for the new layout prototype 094 * @return the new layout prototype 095 */ 096 public com.liferay.portal.model.LayoutPrototype createLayoutPrototype( 097 long layoutPrototypeId); 098 099 /** 100 * Deletes the layout prototype from the database. Also notifies the appropriate model listeners. 101 * 102 * @param layoutPrototype the layout prototype 103 * @return the layout prototype that was removed 104 * @throws PortalException 105 */ 106 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 107 @com.liferay.portal.kernel.systemevent.SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE) 108 public com.liferay.portal.model.LayoutPrototype deleteLayoutPrototype( 109 com.liferay.portal.model.LayoutPrototype layoutPrototype) 110 throws com.liferay.portal.kernel.exception.PortalException; 111 112 /** 113 * Deletes the layout prototype with the primary key from the database. Also notifies the appropriate model listeners. 114 * 115 * @param layoutPrototypeId the primary key of the layout prototype 116 * @return the layout prototype that was removed 117 * @throws PortalException if a layout prototype with the primary key could not be found 118 */ 119 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 120 public com.liferay.portal.model.LayoutPrototype deleteLayoutPrototype( 121 long layoutPrototypeId) 122 throws com.liferay.portal.kernel.exception.PortalException; 123 124 public void deleteNondefaultLayoutPrototypes(long companyId) 125 throws com.liferay.portal.kernel.exception.PortalException; 126 127 /** 128 * @throws PortalException 129 */ 130 @Override 131 public com.liferay.portal.model.PersistedModel deletePersistedModel( 132 com.liferay.portal.model.PersistedModel persistedModel) 133 throws com.liferay.portal.kernel.exception.PortalException; 134 135 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 136 137 /** 138 * Performs a dynamic query on the database and returns the matching rows. 139 * 140 * @param dynamicQuery the dynamic query 141 * @return the matching rows 142 */ 143 public <T> java.util.List<T> dynamicQuery( 144 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 145 146 /** 147 * Performs a dynamic query on the database and returns a range of the matching rows. 148 * 149 * <p> 150 * 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.LayoutPrototypeModelImpl}. 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. 151 * </p> 152 * 153 * @param dynamicQuery the dynamic query 154 * @param start the lower bound of the range of model instances 155 * @param end the upper bound of the range of model instances (not inclusive) 156 * @return the range of matching rows 157 */ 158 public <T> java.util.List<T> dynamicQuery( 159 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 160 int end); 161 162 /** 163 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 164 * 165 * <p> 166 * 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.LayoutPrototypeModelImpl}. 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. 167 * </p> 168 * 169 * @param dynamicQuery the dynamic query 170 * @param start the lower bound of the range of model instances 171 * @param end the upper bound of the range of model instances (not inclusive) 172 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 173 * @return the ordered range of matching rows 174 */ 175 public <T> java.util.List<T> dynamicQuery( 176 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 177 int end, 178 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator); 179 180 /** 181 * Returns the number of rows matching the dynamic query. 182 * 183 * @param dynamicQuery the dynamic query 184 * @return the number of rows matching the dynamic query 185 */ 186 public long dynamicQueryCount( 187 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 188 189 /** 190 * Returns the number of rows matching the dynamic query. 191 * 192 * @param dynamicQuery the dynamic query 193 * @param projection the projection to apply to the query 194 * @return the number of rows matching the dynamic query 195 */ 196 public long dynamicQueryCount( 197 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 198 com.liferay.portal.kernel.dao.orm.Projection projection); 199 200 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 201 public com.liferay.portal.model.LayoutPrototype fetchLayoutPrototype( 202 long layoutPrototypeId); 203 204 /** 205 * Returns the layout prototype with the matching UUID and company. 206 * 207 * @param uuid the layout prototype's UUID 208 * @param companyId the primary key of the company 209 * @return the matching layout prototype, or <code>null</code> if a matching layout prototype could not be found 210 */ 211 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 212 public com.liferay.portal.model.LayoutPrototype fetchLayoutPrototypeByUuidAndCompanyId( 213 java.lang.String uuid, long companyId); 214 215 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 216 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 217 218 /** 219 * Returns the Spring bean ID for this bean. 220 * 221 * @return the Spring bean ID for this bean 222 */ 223 public java.lang.String getBeanIdentifier(); 224 225 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 226 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 227 com.liferay.portal.kernel.lar.PortletDataContext portletDataContext); 228 229 /** 230 * Returns the layout prototype with the primary key. 231 * 232 * @param layoutPrototypeId the primary key of the layout prototype 233 * @return the layout prototype 234 * @throws PortalException if a layout prototype with the primary key could not be found 235 */ 236 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 237 public com.liferay.portal.model.LayoutPrototype getLayoutPrototype( 238 long layoutPrototypeId) 239 throws com.liferay.portal.kernel.exception.PortalException; 240 241 /** 242 * @deprecated As of 6.2.0, replaced by {@link 243 #getLayoutPrototypeByUuidAndCompanyId(String, long)} 244 */ 245 @java.lang.Deprecated 246 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 247 public com.liferay.portal.model.LayoutPrototype getLayoutPrototypeByUuid( 248 java.lang.String uuid) 249 throws com.liferay.portal.kernel.exception.PortalException; 250 251 /** 252 * Returns the layout prototype with the matching UUID and company. 253 * 254 * @param uuid the layout prototype's UUID 255 * @param companyId the primary key of the company 256 * @return the matching layout prototype 257 * @throws PortalException if a matching layout prototype could not be found 258 */ 259 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 260 public com.liferay.portal.model.LayoutPrototype getLayoutPrototypeByUuidAndCompanyId( 261 java.lang.String uuid, long companyId) 262 throws com.liferay.portal.kernel.exception.PortalException; 263 264 /** 265 * Returns a range of all the layout prototypes. 266 * 267 * <p> 268 * 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.LayoutPrototypeModelImpl}. 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. 269 * </p> 270 * 271 * @param start the lower bound of the range of layout prototypes 272 * @param end the upper bound of the range of layout prototypes (not inclusive) 273 * @return the range of layout prototypes 274 */ 275 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 276 public java.util.List<com.liferay.portal.model.LayoutPrototype> getLayoutPrototypes( 277 int start, int end); 278 279 /** 280 * Returns the number of layout prototypes. 281 * 282 * @return the number of layout prototypes 283 */ 284 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 285 public int getLayoutPrototypesCount(); 286 287 @Override 288 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 289 public com.liferay.portal.model.PersistedModel getPersistedModel( 290 java.io.Serializable primaryKeyObj) 291 throws com.liferay.portal.kernel.exception.PortalException; 292 293 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 294 public java.util.List<com.liferay.portal.model.LayoutPrototype> search( 295 long companyId, java.lang.Boolean active, int start, int end, 296 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutPrototype> obc); 297 298 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 299 public int searchCount(long companyId, java.lang.Boolean active); 300 301 /** 302 * Sets the Spring bean ID for this bean. 303 * 304 * @param beanIdentifier the Spring bean ID for this bean 305 */ 306 public void setBeanIdentifier(java.lang.String beanIdentifier); 307 308 /** 309 * Updates the layout prototype in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 310 * 311 * @param layoutPrototype the layout prototype 312 * @return the layout prototype that was updated 313 */ 314 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 315 public com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 316 com.liferay.portal.model.LayoutPrototype layoutPrototype); 317 318 /** 319 * @deprecated As of 6.2.0, replaced by {@link #updateLayoutPrototype(long, 320 Map, String, boolean, ServiceContext)} 321 */ 322 @java.lang.Deprecated 323 public com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 324 long layoutPrototypeId, 325 java.util.Map<java.util.Locale, java.lang.String> nameMap, 326 java.lang.String description, boolean active) 327 throws com.liferay.portal.kernel.exception.PortalException; 328 329 /** 330 * @deprecated As of 7.0.0, replaced by {@link #updateLayoutPrototype(long, 331 Map, Map, boolean, ServiceContext)} 332 */ 333 @java.lang.Deprecated 334 public com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 335 long layoutPrototypeId, 336 java.util.Map<java.util.Locale, java.lang.String> nameMap, 337 java.lang.String description, boolean active, 338 com.liferay.portal.service.ServiceContext serviceContext) 339 throws com.liferay.portal.kernel.exception.PortalException; 340 341 public com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 342 long layoutPrototypeId, 343 java.util.Map<java.util.Locale, java.lang.String> nameMap, 344 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 345 boolean active, com.liferay.portal.service.ServiceContext serviceContext) 346 throws com.liferay.portal.kernel.exception.PortalException; 347 }