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 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 217 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 218 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext); 219 220 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 221 public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); 222 223 /** 224 * Returns the layout prototype with the primary key. 225 * 226 * @param layoutPrototypeId the primary key of the layout prototype 227 * @return the layout prototype 228 * @throws PortalException if a layout prototype with the primary key could not be found 229 */ 230 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 231 public com.liferay.portal.model.LayoutPrototype getLayoutPrototype( 232 long layoutPrototypeId) throws PortalException; 233 234 /** 235 * @deprecated As of 6.2.0, replaced by {@link 236 #getLayoutPrototypeByUuidAndCompanyId(String, long)} 237 */ 238 @java.lang.Deprecated 239 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 240 public com.liferay.portal.model.LayoutPrototype getLayoutPrototypeByUuid( 241 java.lang.String uuid) throws PortalException; 242 243 /** 244 * Returns the layout prototype with the matching UUID and company. 245 * 246 * @param uuid the layout prototype's UUID 247 * @param companyId the primary key of the company 248 * @return the matching layout prototype 249 * @throws PortalException if a matching layout prototype could not be found 250 */ 251 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 252 public com.liferay.portal.model.LayoutPrototype getLayoutPrototypeByUuidAndCompanyId( 253 java.lang.String uuid, long companyId) throws PortalException; 254 255 /** 256 * Returns a range of all the layout prototypes. 257 * 258 * <p> 259 * 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. 260 * </p> 261 * 262 * @param start the lower bound of the range of layout prototypes 263 * @param end the upper bound of the range of layout prototypes (not inclusive) 264 * @return the range of layout prototypes 265 */ 266 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 267 public java.util.List<com.liferay.portal.model.LayoutPrototype> getLayoutPrototypes( 268 int start, int end); 269 270 /** 271 * Returns the number of layout prototypes. 272 * 273 * @return the number of layout prototypes 274 */ 275 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 276 public int getLayoutPrototypesCount(); 277 278 /** 279 * Returns the OSGi service identifier. 280 * 281 * @return the OSGi service identifier 282 */ 283 public java.lang.String getOSGiServiceIdentifier(); 284 285 @Override 286 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 287 public com.liferay.portal.model.PersistedModel getPersistedModel( 288 java.io.Serializable primaryKeyObj) throws PortalException; 289 290 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 291 public java.util.List<com.liferay.portal.model.LayoutPrototype> search( 292 long companyId, java.lang.Boolean active, int start, int end, 293 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutPrototype> obc); 294 295 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 296 public int searchCount(long companyId, java.lang.Boolean active); 297 298 /** 299 * Updates the layout prototype in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 300 * 301 * @param layoutPrototype the layout prototype 302 * @return the layout prototype that was updated 303 */ 304 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 305 public com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 306 com.liferay.portal.model.LayoutPrototype layoutPrototype); 307 308 /** 309 * @deprecated As of 6.2.0, replaced by {@link #updateLayoutPrototype(long, 310 Map, String, boolean, ServiceContext)} 311 */ 312 @java.lang.Deprecated 313 public com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 314 long layoutPrototypeId, 315 java.util.Map<java.util.Locale, java.lang.String> nameMap, 316 java.lang.String description, boolean active) throws PortalException; 317 318 /** 319 * @deprecated As of 7.0.0, replaced by {@link #updateLayoutPrototype(long, 320 Map, Map, 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 com.liferay.portal.service.ServiceContext serviceContext) 328 throws PortalException; 329 330 public com.liferay.portal.model.LayoutPrototype updateLayoutPrototype( 331 long layoutPrototypeId, 332 java.util.Map<java.util.Locale, java.lang.String> nameMap, 333 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 334 boolean active, com.liferay.portal.service.ServiceContext serviceContext) 335 throws PortalException; 336 }