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