001 /** 002 * Copyright (c) 2000-2010 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.annotation.Isolation; 018 import com.liferay.portal.kernel.annotation.Propagation; 019 import com.liferay.portal.kernel.annotation.Transactional; 020 import com.liferay.portal.kernel.exception.PortalException; 021 import com.liferay.portal.kernel.exception.SystemException; 022 023 /** 024 * The interface for the layout set local service. 025 * 026 * <p> 027 * 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. 028 * </p> 029 * 030 * <p> 031 * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM. 032 * </p> 033 * 034 * @author Brian Wing Shun Chan 035 * @see LayoutSetLocalServiceUtil 036 * @see com.liferay.portal.service.base.LayoutSetLocalServiceBaseImpl 037 * @see com.liferay.portal.service.impl.LayoutSetLocalServiceImpl 038 * @generated 039 */ 040 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 041 PortalException.class, SystemException.class}) 042 public interface LayoutSetLocalService { 043 /** 044 * Adds the layout set to the database. Also notifies the appropriate model listeners. 045 * 046 * @param layoutSet the layout set to add 047 * @return the layout set that was added 048 * @throws SystemException if a system exception occurred 049 */ 050 public com.liferay.portal.model.LayoutSet addLayoutSet( 051 com.liferay.portal.model.LayoutSet layoutSet) 052 throws com.liferay.portal.kernel.exception.SystemException; 053 054 /** 055 * Creates a new layout set with the primary key. Does not add the layout set to the database. 056 * 057 * @param layoutSetId the primary key for the new layout set 058 * @return the new layout set 059 */ 060 public com.liferay.portal.model.LayoutSet createLayoutSet(long layoutSetId); 061 062 /** 063 * Deletes the layout set with the primary key from the database. Also notifies the appropriate model listeners. 064 * 065 * @param layoutSetId the primary key of the layout set to delete 066 * @throws PortalException if a layout set with the primary key could not be found 067 * @throws SystemException if a system exception occurred 068 */ 069 public void deleteLayoutSet(long layoutSetId) 070 throws com.liferay.portal.kernel.exception.PortalException, 071 com.liferay.portal.kernel.exception.SystemException; 072 073 /** 074 * Deletes the layout set from the database. Also notifies the appropriate model listeners. 075 * 076 * @param layoutSet the layout set to delete 077 * @throws SystemException if a system exception occurred 078 */ 079 public void deleteLayoutSet(com.liferay.portal.model.LayoutSet layoutSet) 080 throws com.liferay.portal.kernel.exception.SystemException; 081 082 /** 083 * Performs a dynamic query on the database and returns the matching rows. 084 * 085 * @param dynamicQuery the dynamic query to search with 086 * @return the matching rows 087 * @throws SystemException if a system exception occurred 088 */ 089 @SuppressWarnings("rawtypes") 090 public java.util.List dynamicQuery( 091 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 092 throws com.liferay.portal.kernel.exception.SystemException; 093 094 /** 095 * Performs a dynamic query on the database and returns a range of the matching rows. 096 * 097 * <p> 098 * 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. 099 * </p> 100 * 101 * @param dynamicQuery the dynamic query to search with 102 * @param start the lower bound of the range of model instances to return 103 * @param end the upper bound of the range of model instances to return (not inclusive) 104 * @return the range of matching rows 105 * @throws SystemException if a system exception occurred 106 */ 107 @SuppressWarnings("rawtypes") 108 public java.util.List dynamicQuery( 109 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 110 int end) throws com.liferay.portal.kernel.exception.SystemException; 111 112 /** 113 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 114 * 115 * <p> 116 * 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. 117 * </p> 118 * 119 * @param dynamicQuery the dynamic query to search with 120 * @param start the lower bound of the range of model instances to return 121 * @param end the upper bound of the range of model instances to return (not inclusive) 122 * @param orderByComparator the comparator to order the results by 123 * @return the ordered range of matching rows 124 * @throws SystemException if a system exception occurred 125 */ 126 @SuppressWarnings("rawtypes") 127 public java.util.List dynamicQuery( 128 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 129 int end, 130 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 131 throws com.liferay.portal.kernel.exception.SystemException; 132 133 /** 134 * Counts the number of rows that match the dynamic query. 135 * 136 * @param dynamicQuery the dynamic query to search with 137 * @return the number of rows that match the dynamic query 138 * @throws SystemException if a system exception occurred 139 */ 140 public long dynamicQueryCount( 141 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 142 throws com.liferay.portal.kernel.exception.SystemException; 143 144 /** 145 * Gets the layout set with the primary key. 146 * 147 * @param layoutSetId the primary key of the layout set to get 148 * @return the layout set 149 * @throws PortalException if a layout set with the primary key could not be found 150 * @throws SystemException if a system exception occurred 151 */ 152 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 153 public com.liferay.portal.model.LayoutSet getLayoutSet(long layoutSetId) 154 throws com.liferay.portal.kernel.exception.PortalException, 155 com.liferay.portal.kernel.exception.SystemException; 156 157 /** 158 * Gets a range of all the layout sets. 159 * 160 * <p> 161 * 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. 162 * </p> 163 * 164 * @param start the lower bound of the range of layout sets to return 165 * @param end the upper bound of the range of layout sets to return (not inclusive) 166 * @return the range of layout sets 167 * @throws SystemException if a system exception occurred 168 */ 169 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 170 public java.util.List<com.liferay.portal.model.LayoutSet> getLayoutSets( 171 int start, int end) 172 throws com.liferay.portal.kernel.exception.SystemException; 173 174 /** 175 * Gets the number of layout sets. 176 * 177 * @return the number of layout sets 178 * @throws SystemException if a system exception occurred 179 */ 180 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 181 public int getLayoutSetsCount() 182 throws com.liferay.portal.kernel.exception.SystemException; 183 184 /** 185 * Updates the layout set in the database. Also notifies the appropriate model listeners. 186 * 187 * @param layoutSet the layout set to update 188 * @return the layout set that was updated 189 * @throws SystemException if a system exception occurred 190 */ 191 public com.liferay.portal.model.LayoutSet updateLayoutSet( 192 com.liferay.portal.model.LayoutSet layoutSet) 193 throws com.liferay.portal.kernel.exception.SystemException; 194 195 /** 196 * Updates the layout set in the database. Also notifies the appropriate model listeners. 197 * 198 * @param layoutSet the layout set to update 199 * @param merge whether to merge the layout set with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation. 200 * @return the layout set that was updated 201 * @throws SystemException if a system exception occurred 202 */ 203 public com.liferay.portal.model.LayoutSet updateLayoutSet( 204 com.liferay.portal.model.LayoutSet layoutSet, boolean merge) 205 throws com.liferay.portal.kernel.exception.SystemException; 206 207 public com.liferay.portal.model.LayoutSet addLayoutSet(long groupId, 208 boolean privateLayout) 209 throws com.liferay.portal.kernel.exception.PortalException, 210 com.liferay.portal.kernel.exception.SystemException; 211 212 public void deleteLayoutSet(long groupId, boolean privateLayout) 213 throws com.liferay.portal.kernel.exception.PortalException, 214 com.liferay.portal.kernel.exception.SystemException; 215 216 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 217 public com.liferay.portal.model.LayoutSet getLayoutSet(long groupId, 218 boolean privateLayout) 219 throws com.liferay.portal.kernel.exception.PortalException, 220 com.liferay.portal.kernel.exception.SystemException; 221 222 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 223 public com.liferay.portal.model.LayoutSet getLayoutSet( 224 java.lang.String virtualHost) 225 throws com.liferay.portal.kernel.exception.PortalException, 226 com.liferay.portal.kernel.exception.SystemException; 227 228 public void updateLogo(long groupId, boolean privateLayout, boolean logo, 229 java.io.File file) 230 throws com.liferay.portal.kernel.exception.PortalException, 231 com.liferay.portal.kernel.exception.SystemException; 232 233 public void updateLogo(long groupId, boolean privateLayout, boolean logo, 234 java.io.InputStream is) 235 throws com.liferay.portal.kernel.exception.PortalException, 236 com.liferay.portal.kernel.exception.SystemException; 237 238 public void updateLookAndFeel(long groupId, java.lang.String themeId, 239 java.lang.String colorSchemeId, java.lang.String css, boolean wapTheme) 240 throws com.liferay.portal.kernel.exception.PortalException, 241 com.liferay.portal.kernel.exception.SystemException; 242 243 public com.liferay.portal.model.LayoutSet updateLookAndFeel(long groupId, 244 boolean privateLayout, java.lang.String themeId, 245 java.lang.String colorSchemeId, java.lang.String css, boolean wapTheme) 246 throws com.liferay.portal.kernel.exception.PortalException, 247 com.liferay.portal.kernel.exception.SystemException; 248 249 public com.liferay.portal.model.LayoutSet updatePageCount(long groupId, 250 boolean privateLayout) 251 throws com.liferay.portal.kernel.exception.PortalException, 252 com.liferay.portal.kernel.exception.SystemException; 253 254 public com.liferay.portal.model.LayoutSet updateSettings(long groupId, 255 boolean privateLayout, java.lang.String settings) 256 throws com.liferay.portal.kernel.exception.PortalException, 257 com.liferay.portal.kernel.exception.SystemException; 258 259 public com.liferay.portal.model.LayoutSet updateVirtualHost(long groupId, 260 boolean privateLayout, java.lang.String virtualHost) 261 throws com.liferay.portal.kernel.exception.PortalException, 262 com.liferay.portal.kernel.exception.SystemException; 263 }