001 /** 002 * Copyright (c) 2000-2013 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 com.liferay.portal.kernel.exception.PortalException; 018 import com.liferay.portal.kernel.exception.SystemException; 019 import com.liferay.portal.kernel.transaction.Isolation; 020 import com.liferay.portal.kernel.transaction.Propagation; 021 import com.liferay.portal.kernel.transaction.Transactional; 022 023 /** 024 * Provides the local service interface for LayoutSet. Methods of this 025 * service will not have security checks based on the propagated JAAS 026 * credentials because this service can only be accessed from within the same 027 * VM. 028 * 029 * @author Brian Wing Shun Chan 030 * @see LayoutSetLocalServiceUtil 031 * @see com.liferay.portal.service.base.LayoutSetLocalServiceBaseImpl 032 * @see com.liferay.portal.service.impl.LayoutSetLocalServiceImpl 033 * @generated 034 */ 035 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 036 PortalException.class, SystemException.class}) 037 public interface LayoutSetLocalService extends BaseLocalService, 038 PersistedModelLocalService { 039 /* 040 * NOTE FOR DEVELOPERS: 041 * 042 * Never modify or reference this interface directly. Always use {@link LayoutSetLocalServiceUtil} to access the layout set local service. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutSetLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 043 */ 044 045 /** 046 * Adds the layout set to the database. Also notifies the appropriate model listeners. 047 * 048 * @param layoutSet the layout set 049 * @return the layout set that was added 050 * @throws SystemException if a system exception occurred 051 */ 052 public com.liferay.portal.model.LayoutSet addLayoutSet( 053 com.liferay.portal.model.LayoutSet layoutSet) 054 throws com.liferay.portal.kernel.exception.SystemException; 055 056 /** 057 * Creates a new layout set with the primary key. Does not add the layout set to the database. 058 * 059 * @param layoutSetId the primary key for the new layout set 060 * @return the new layout set 061 */ 062 public com.liferay.portal.model.LayoutSet createLayoutSet(long layoutSetId); 063 064 /** 065 * Deletes the layout set with the primary key from the database. Also notifies the appropriate model listeners. 066 * 067 * @param layoutSetId the primary key of the layout set 068 * @return the layout set that was removed 069 * @throws PortalException if a layout set with the primary key could not be found 070 * @throws SystemException if a system exception occurred 071 */ 072 public com.liferay.portal.model.LayoutSet deleteLayoutSet(long layoutSetId) 073 throws com.liferay.portal.kernel.exception.PortalException, 074 com.liferay.portal.kernel.exception.SystemException; 075 076 /** 077 * Deletes the layout set from the database. Also notifies the appropriate model listeners. 078 * 079 * @param layoutSet the layout set 080 * @return the layout set that was removed 081 * @throws SystemException if a system exception occurred 082 */ 083 public com.liferay.portal.model.LayoutSet deleteLayoutSet( 084 com.liferay.portal.model.LayoutSet layoutSet) 085 throws com.liferay.portal.kernel.exception.SystemException; 086 087 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 088 089 /** 090 * Performs a dynamic query on the database and returns the matching rows. 091 * 092 * @param dynamicQuery the dynamic query 093 * @return the matching rows 094 * @throws SystemException if a system exception occurred 095 */ 096 @SuppressWarnings("rawtypes") 097 public java.util.List dynamicQuery( 098 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 099 throws com.liferay.portal.kernel.exception.SystemException; 100 101 /** 102 * Performs a dynamic query on the database and returns a range of the matching rows. 103 * 104 * <p> 105 * 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.LayoutSetModelImpl}. 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. 106 * </p> 107 * 108 * @param dynamicQuery the dynamic query 109 * @param start the lower bound of the range of model instances 110 * @param end the upper bound of the range of model instances (not inclusive) 111 * @return the range of matching rows 112 * @throws SystemException if a system exception occurred 113 */ 114 @SuppressWarnings("rawtypes") 115 public java.util.List dynamicQuery( 116 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 117 int end) throws com.liferay.portal.kernel.exception.SystemException; 118 119 /** 120 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 121 * 122 * <p> 123 * 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.LayoutSetModelImpl}. 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. 124 * </p> 125 * 126 * @param dynamicQuery the dynamic query 127 * @param start the lower bound of the range of model instances 128 * @param end the upper bound of the range of model instances (not inclusive) 129 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 130 * @return the ordered range of matching rows 131 * @throws SystemException if a system exception occurred 132 */ 133 @SuppressWarnings("rawtypes") 134 public java.util.List dynamicQuery( 135 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 136 int end, 137 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 138 throws com.liferay.portal.kernel.exception.SystemException; 139 140 /** 141 * Returns the number of rows that match the dynamic query. 142 * 143 * @param dynamicQuery the dynamic query 144 * @return the number of rows that match the dynamic query 145 * @throws SystemException if a system exception occurred 146 */ 147 public long dynamicQueryCount( 148 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 149 throws com.liferay.portal.kernel.exception.SystemException; 150 151 /** 152 * Returns the number of rows that match the dynamic query. 153 * 154 * @param dynamicQuery the dynamic query 155 * @param projection the projection to apply to the query 156 * @return the number of rows that match the dynamic query 157 * @throws SystemException if a system exception occurred 158 */ 159 public long dynamicQueryCount( 160 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 161 com.liferay.portal.kernel.dao.orm.Projection projection) 162 throws com.liferay.portal.kernel.exception.SystemException; 163 164 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 165 public com.liferay.portal.model.LayoutSet fetchLayoutSet(long layoutSetId) 166 throws com.liferay.portal.kernel.exception.SystemException; 167 168 /** 169 * Returns the layout set with the primary key. 170 * 171 * @param layoutSetId the primary key of the layout set 172 * @return the layout set 173 * @throws PortalException if a layout set with the primary key could not be found 174 * @throws SystemException if a system exception occurred 175 */ 176 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 177 public com.liferay.portal.model.LayoutSet getLayoutSet(long layoutSetId) 178 throws com.liferay.portal.kernel.exception.PortalException, 179 com.liferay.portal.kernel.exception.SystemException; 180 181 @Override 182 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 183 public com.liferay.portal.model.PersistedModel getPersistedModel( 184 java.io.Serializable primaryKeyObj) 185 throws com.liferay.portal.kernel.exception.PortalException, 186 com.liferay.portal.kernel.exception.SystemException; 187 188 /** 189 * Returns a range of all the layout sets. 190 * 191 * <p> 192 * 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.LayoutSetModelImpl}. 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. 193 * </p> 194 * 195 * @param start the lower bound of the range of layout sets 196 * @param end the upper bound of the range of layout sets (not inclusive) 197 * @return the range of layout sets 198 * @throws SystemException if a system exception occurred 199 */ 200 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 201 public java.util.List<com.liferay.portal.model.LayoutSet> getLayoutSets( 202 int start, int end) 203 throws com.liferay.portal.kernel.exception.SystemException; 204 205 /** 206 * Returns the number of layout sets. 207 * 208 * @return the number of layout sets 209 * @throws SystemException if a system exception occurred 210 */ 211 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 212 public int getLayoutSetsCount() 213 throws com.liferay.portal.kernel.exception.SystemException; 214 215 /** 216 * Updates the layout set in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 217 * 218 * @param layoutSet the layout set 219 * @return the layout set that was updated 220 * @throws SystemException if a system exception occurred 221 */ 222 public com.liferay.portal.model.LayoutSet updateLayoutSet( 223 com.liferay.portal.model.LayoutSet layoutSet) 224 throws com.liferay.portal.kernel.exception.SystemException; 225 226 /** 227 * Returns the Spring bean ID for this bean. 228 * 229 * @return the Spring bean ID for this bean 230 */ 231 public java.lang.String getBeanIdentifier(); 232 233 /** 234 * Sets the Spring bean ID for this bean. 235 * 236 * @param beanIdentifier the Spring bean ID for this bean 237 */ 238 public void setBeanIdentifier(java.lang.String beanIdentifier); 239 240 public com.liferay.portal.model.LayoutSet addLayoutSet(long groupId, 241 boolean privateLayout) 242 throws com.liferay.portal.kernel.exception.PortalException, 243 com.liferay.portal.kernel.exception.SystemException; 244 245 public void deleteLayoutSet(long groupId, boolean privateLayout, 246 com.liferay.portal.service.ServiceContext serviceContext) 247 throws com.liferay.portal.kernel.exception.PortalException, 248 com.liferay.portal.kernel.exception.SystemException; 249 250 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 251 public com.liferay.portal.model.LayoutSet fetchLayoutSet( 252 java.lang.String virtualHostname) 253 throws com.liferay.portal.kernel.exception.SystemException; 254 255 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 256 public com.liferay.portal.model.LayoutSet getLayoutSet(long groupId, 257 boolean privateLayout) 258 throws com.liferay.portal.kernel.exception.PortalException, 259 com.liferay.portal.kernel.exception.SystemException; 260 261 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 262 public com.liferay.portal.model.LayoutSet getLayoutSet( 263 java.lang.String virtualHostname) 264 throws com.liferay.portal.kernel.exception.PortalException, 265 com.liferay.portal.kernel.exception.SystemException; 266 267 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 268 public java.util.List<com.liferay.portal.model.LayoutSet> getLayoutSetsByLayoutSetPrototypeUuid( 269 java.lang.String layoutSetPrototypeUuid) 270 throws com.liferay.portal.kernel.exception.SystemException; 271 272 /** 273 * Updates the state of the layout set prototype link. 274 * 275 * <p> 276 * This method can disable the layout set prototype's link by setting 277 * <code>layoutSetPrototypeLinkEnabled</code> to <code>false</code>. 278 * However, this method can only enable the layout set prototype's link if 279 * the layout set prototype's current uuid is not <code>null</code>. Setting 280 * the <code>layoutSetPrototypeLinkEnabled</code> to <code>true</code> when 281 * the layout set prototype's current uuid is <code>null</code> will have no 282 * effect. 283 * </p> 284 * 285 * @param groupId the primary key of the group 286 * @param privateLayout whether the layout set is private to the group 287 * @param layoutSetPrototypeLinkEnabled whether the layout set 288 prototype is link enabled 289 * @throws PortalException if a portal exception occurred 290 * @throws SystemException if a system exception occurred 291 * @deprecated As of 6.1.0, replaced by {@link 292 #updateLayoutSetPrototypeLinkEnabled(long, boolean, boolean, 293 String)} 294 */ 295 public void updateLayoutSetPrototypeLinkEnabled(long groupId, 296 boolean privateLayout, boolean layoutSetPrototypeLinkEnabled) 297 throws com.liferay.portal.kernel.exception.PortalException, 298 com.liferay.portal.kernel.exception.SystemException; 299 300 /** 301 * Updates the state of the layout set prototype link. 302 * 303 * @param groupId the primary key of the group 304 * @param privateLayout whether the layout set is private to the group 305 * @param layoutSetPrototypeLinkEnabled whether the layout set prototype is 306 link enabled 307 * @param layoutSetPrototypeUuid the uuid of the layout set prototype to 308 link with 309 * @throws PortalException if a portal exception occurred 310 * @throws SystemException if a system exception occurred 311 */ 312 public void updateLayoutSetPrototypeLinkEnabled(long groupId, 313 boolean privateLayout, boolean layoutSetPrototypeLinkEnabled, 314 java.lang.String layoutSetPrototypeUuid) 315 throws com.liferay.portal.kernel.exception.PortalException, 316 com.liferay.portal.kernel.exception.SystemException; 317 318 public com.liferay.portal.model.LayoutSet updateLogo(long groupId, 319 boolean privateLayout, boolean logo, byte[] bytes) 320 throws com.liferay.portal.kernel.exception.PortalException, 321 com.liferay.portal.kernel.exception.SystemException; 322 323 public com.liferay.portal.model.LayoutSet updateLogo(long groupId, 324 boolean privateLayout, boolean logo, java.io.File file) 325 throws com.liferay.portal.kernel.exception.PortalException, 326 com.liferay.portal.kernel.exception.SystemException; 327 328 public com.liferay.portal.model.LayoutSet updateLogo(long groupId, 329 boolean privateLayout, boolean logo, java.io.InputStream is) 330 throws com.liferay.portal.kernel.exception.PortalException, 331 com.liferay.portal.kernel.exception.SystemException; 332 333 public com.liferay.portal.model.LayoutSet updateLogo(long groupId, 334 boolean privateLayout, boolean logo, java.io.InputStream is, 335 boolean cleanUpStream) 336 throws com.liferay.portal.kernel.exception.PortalException, 337 com.liferay.portal.kernel.exception.SystemException; 338 339 public com.liferay.portal.model.LayoutSet updateLookAndFeel(long groupId, 340 boolean privateLayout, java.lang.String themeId, 341 java.lang.String colorSchemeId, java.lang.String css, boolean wapTheme) 342 throws com.liferay.portal.kernel.exception.PortalException, 343 com.liferay.portal.kernel.exception.SystemException; 344 345 public void updateLookAndFeel(long groupId, java.lang.String themeId, 346 java.lang.String colorSchemeId, java.lang.String css, boolean wapTheme) 347 throws com.liferay.portal.kernel.exception.PortalException, 348 com.liferay.portal.kernel.exception.SystemException; 349 350 public com.liferay.portal.model.LayoutSet updatePageCount(long groupId, 351 boolean privateLayout) 352 throws com.liferay.portal.kernel.exception.PortalException, 353 com.liferay.portal.kernel.exception.SystemException; 354 355 public com.liferay.portal.model.LayoutSet updateSettings(long groupId, 356 boolean privateLayout, java.lang.String settings) 357 throws com.liferay.portal.kernel.exception.PortalException, 358 com.liferay.portal.kernel.exception.SystemException; 359 360 public com.liferay.portal.model.LayoutSet updateVirtualHost(long groupId, 361 boolean privateLayout, java.lang.String virtualHostname) 362 throws com.liferay.portal.kernel.exception.PortalException, 363 com.liferay.portal.kernel.exception.SystemException; 364 }