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