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) throws PortalException; 069 070 /** 071 * @deprecated As of 7.0.0, replaced by {@link #addLayoutPrototype(long, 072 long, Map, Map, boolean, ServiceContext)} 073 */ 074 @java.lang.Deprecated 075 public com.liferay.portal.model.LayoutPrototype addLayoutPrototype( 076 long userId, long companyId, 077 java.util.Map<java.util.Locale, java.lang.String> nameMap, 078 java.lang.String description, boolean active, 079 com.liferay.portal.service.ServiceContext serviceContext) 080 throws PortalException; 081 082 public com.liferay.portal.model.LayoutPrototype addLayoutPrototype( 083 long userId, long companyId, 084 java.util.Map<java.util.Locale, java.lang.String> nameMap, 085 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 086 boolean active, com.liferay.portal.service.ServiceContext serviceContext) 087 throws PortalException; 088 089 /** 090 * Creates a new layout prototype with the primary key. Does not add the layout prototype to the database. 091 * 092 * @param layoutPrototypeId the primary key for the new layout prototype 093 * @return the new layout prototype 094 */ 095 public com.liferay.portal.model.LayoutPrototype createLayoutPrototype( 096 long layoutPrototypeId); 097 098 /** 099 * Deletes the layout prototype from the database. Also notifies the appropriate model listeners. 100 * 101 * @param layoutPrototype the layout prototype 102 * @return the layout prototype that was removed 103 * @throws PortalException 104 */ 105 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 106 @com.liferay.portal.kernel.systemevent.SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE) 107 public com.liferay.portal.model.LayoutPrototype deleteLayoutPrototype( 108 com.liferay.portal.model.LayoutPrototype layoutPrototype) 109 throws PortalException; 110 111 /** 112 * Deletes the layout prototype with the primary key from the database. Also notifies the appropriate model listeners. 113 * 114 * @param layoutPrototypeId the primary key of the layout prototype 115 * @return the layout prototype that was removed 116 * @throws PortalException if a layout prototype with the primary key could not be found 117 */ 118 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 119 public com.liferay.portal.model.LayoutPrototype deleteLayoutPrototype( 120 long layoutPrototypeId) throws PortalException; 121 122 public void deleteNondefaultLayoutPrototypes(long companyId) 123 throws PortalException; 124 125 /** 126 * @throws PortalException 127 */ 128 @Override 129 public com.liferay.portal.model.PersistedModel deletePersistedModel( 130 com.liferay.portal.model.PersistedModel persistedModel) 131 throws PortalException; 132 133 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 134 135 /** 136 * Performs a dynamic query on the database and returns the matching rows. 137 * 138 * @param dynamicQuery the dynamic query 139 * @return the matching rows 140 */ 141 public <T> java.util.List<T> dynamicQuery( 142 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 143 144 /** 145 * Performs a dynamic query on the database and returns a range of the matching rows. 146 * 147 * <p> 148 * 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. 149 * </p> 150 * 151 * @param dynamicQuery the dynamic query 152 * @param start the lower bound of the range of model instances 153 * @param end the upper bound of the range of model instances (not inclusive) 154 * @return the range of matching rows 155 */ 156 public <T> java.util.List<T> dynamicQuery( 157 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 158 int end); 159 160 /** 161 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 162 * 163 * <p> 164 * 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. 165 * </p> 166 * 167 * @param dynamicQuery the dynamic query 168 * @param start the lower bound of the range of model instances 169 * @param end the upper bound of the range of model instances (not inclusive) 170 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 171 * @return the ordered range of matching rows 172 */ 173 public <T> java.util.List<T> dynamicQuery( 174 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 175 int end, 176 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator); 177 178 /** 179 * Returns the number of rows matching the dynamic query. 180 * 181 * @param dynamicQuery the dynamic query 182 * @return the number of rows matching the dynamic query 183 */ 184 public long dynamicQueryCount( 185 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 186 187 /** 188 * Returns the number of rows matching the dynamic query. 189 * 190 * @param dynamicQuery the dynamic query 191 * @param projection the projection to apply to the query 192 * @return the number of rows matching the dynamic query 193 */ 194 public long dynamicQueryCount( 195 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 196 com.liferay.portal.kernel.dao.orm.Projection projection); 197 198 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 199 public com.liferay.portal.model.LayoutPrototype fetchLayoutPrototype( 200 long layoutPrototypeId); 201 202 /** 203 * Returns the layout prototype with the matching UUID and company. 204 * 205 * @param uuid the layout prototype's UUID 206 * @param companyId the primary key of the company 207 * @return the matching layout prototype, or <code>null</code> if a matching layout prototype could not be found 208 */ 209 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 210 public com.liferay.portal.model.LayoutPrototype fetchLayoutPrototypeByUuidAndCompanyId( 211 java.lang.String uuid, long companyId); 212 213 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 214 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 215 216 /** 217 * Returns the Spring bean ID for this bean. 218 * 219 * @return the Spring bean ID for this bean 220 */ 221 public java.lang.String getBeanIdentifier(); 222 223 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 224 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 225 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext); 226 227 /** 228 * Returns the layout prototype with the primary key. 229 * 230 * @param layoutPrototypeId the primary key of the layout prototype 231 * @return the layout prototype 232 * @throws PortalException if a layout prototype with the primary key could not be found 233 */ 234 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 235 public com.liferay.portal.model.LayoutPrototype getLayoutPrototype( 236 long layoutPrototypeId) throws PortalException; 237 238 /** 239 * @deprecated As of 6.2.0, replaced by {@link 240 #getLayoutPrototypeByUuidAndCompanyId(String, long)} 241 */ 242 @java.lang.Deprecated 243 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 244 public com.liferay.portal.model.LayoutPrototype getLayoutPrototypeByUuid( 245 java.lang.String uuid) throws PortalException; 246 247 /** 248 * Returns the layout prototype with the matching UUID and company. 249 * 250 * @param uuid the layout prototype's UUID 251 * @param companyId the primary key of the company 252 * @return the matching layout prototype 253 * @throws PortalException if a matching layout prototype could not be found 254 */ 255 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 256 public com.liferay.portal.model.LayoutPrototype getLayoutPrototypeByUuidAndCompanyId( 257 java.lang.String uuid, long companyId) throws PortalException; 258 259 /** 260 * Returns a range of all the layout prototypes. 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.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. 264 * </p> 265 * 266 * @param start the lower bound of the range of layout prototypes 267 * @param end the upper bound of the range of layout prototypes (not inclusive) 268 * @return the range of layout prototypes 269 */ 270 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 271 public java.util.List<com.liferay.portal.model.LayoutPrototype> getLayoutPrototypes( 272 int start, int end); 273 274 /** 275 * Returns the number of layout prototypes. 276 * 277 * @return the number of layout prototypes 278 */ 279 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 280 public int getLayoutPrototypesCount(); 281 282 @Override 283 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 284 public com.liferay.portal.model.PersistedModel getPersistedModel( 285 java.io.Serializable primaryKeyObj) throws PortalException; 286 287 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 288 public java.util.List<com.liferay.portal.model.LayoutPrototype> search( 289 long companyId, java.lang.Boolean active, int start, int end, 290 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutPrototype> obc); 291 292 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 293 public int searchCount(long companyId, java.lang.Boolean active); 294 295 /** 296 * Sets the Spring bean ID for this bean. 297 * 298 * @param beanIdentifier the Spring bean ID for this bean 299 */ 300 public void setBeanIdentifier(java.lang.String beanIdentifier); 301 302 /** 303 * Updates the layout prototype in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 304 * 305 * @param layoutPrototype the layout prototype 306 * @return the layout prototype that was updated 307 */ 308 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 309 public com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 310 com.liferay.portal.model.LayoutPrototype layoutPrototype); 311 312 /** 313 * @deprecated As of 6.2.0, replaced by {@link #updateLayoutPrototype(long, 314 Map, String, boolean, ServiceContext)} 315 */ 316 @java.lang.Deprecated 317 public com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 318 long layoutPrototypeId, 319 java.util.Map<java.util.Locale, java.lang.String> nameMap, 320 java.lang.String description, boolean active) throws PortalException; 321 322 /** 323 * @deprecated As of 7.0.0, replaced by {@link #updateLayoutPrototype(long, 324 Map, Map, boolean, ServiceContext)} 325 */ 326 @java.lang.Deprecated 327 public com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 328 long layoutPrototypeId, 329 java.util.Map<java.util.Locale, java.lang.String> nameMap, 330 java.lang.String description, boolean active, 331 com.liferay.portal.service.ServiceContext serviceContext) 332 throws PortalException; 333 334 public com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 335 long layoutPrototypeId, 336 java.util.Map<java.util.Locale, java.lang.String> nameMap, 337 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 338 boolean active, com.liferay.portal.service.ServiceContext serviceContext) 339 throws PortalException; 340 }