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.portlet.trash.service; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.service.ServiceWrapper; 020 021 /** 022 * Provides a wrapper for {@link TrashEntryService}. 023 * 024 * @author Brian Wing Shun Chan 025 * @see TrashEntryService 026 * @generated 027 */ 028 @ProviderType 029 public class TrashEntryServiceWrapper implements TrashEntryService, 030 ServiceWrapper<TrashEntryService> { 031 public TrashEntryServiceWrapper(TrashEntryService trashEntryService) { 032 _trashEntryService = trashEntryService; 033 } 034 035 /** 036 * Deletes the trash entries with the primary keys. 037 * 038 * @param entryIds the primary keys of the trash entries 039 * @throws PortalException if a trash entry with the primary key could not 040 be found or if the user did not have permission to delete any one 041 of the trash entries 042 */ 043 @Override 044 public void deleteEntries(long[] entryIds) 045 throws com.liferay.portal.kernel.exception.PortalException { 046 _trashEntryService.deleteEntries(entryIds); 047 } 048 049 /** 050 * Deletes the trash entries with the matching group ID considering 051 * permissions. 052 * 053 * @param groupId the primary key of the group 054 * @throws PortalException if a portal exception occurred 055 */ 056 @Override 057 public void deleteEntries(long groupId) 058 throws com.liferay.portal.kernel.exception.PortalException { 059 _trashEntryService.deleteEntries(groupId); 060 } 061 062 /** 063 * Deletes the trash entry with the entity class name and class primary key. 064 * 065 * <p> 066 * This method throws a {@link TrashPermissionException} with type {@link 067 * TrashPermissionException#DELETE} if the user did not have permission to 068 * delete the trash entry. 069 * </p> 070 * 071 * @param className the class name of the entity 072 * @param classPK the primary key of the entity 073 * @throws PortalException if a trash entry with the entity class name and 074 primary key could not be found or if the user did not have 075 permission to delete the entry 076 */ 077 @Override 078 public void deleteEntry(java.lang.String className, long classPK) 079 throws com.liferay.portal.kernel.exception.PortalException { 080 _trashEntryService.deleteEntry(className, classPK); 081 } 082 083 /** 084 * Deletes the trash entry with the primary key. 085 * 086 * <p> 087 * This method throws a {@link TrashPermissionException} with type {@link 088 * TrashPermissionException#DELETE} if the user did not have permission to 089 * delete the trash entry. 090 * </p> 091 * 092 * @param entryId the primary key of the trash entry 093 * @throws PortalException if a trash entry with the primary key could not 094 be found or if the user did not have permission to delete the 095 trash entry 096 */ 097 @Override 098 public void deleteEntry(long entryId) 099 throws com.liferay.portal.kernel.exception.PortalException { 100 _trashEntryService.deleteEntry(entryId); 101 } 102 103 /** 104 * Returns the Spring bean ID for this bean. 105 * 106 * @return the Spring bean ID for this bean 107 */ 108 @Override 109 public java.lang.String getBeanIdentifier() { 110 return _trashEntryService.getBeanIdentifier(); 111 } 112 113 /** 114 * Returns the trash entries with the matching group ID. 115 * 116 * @param groupId the primary key of the group 117 * @return the matching trash entries 118 * @throws PrincipalException if a principal exception occurred 119 */ 120 @Override 121 public com.liferay.portlet.trash.model.TrashEntryList getEntries( 122 long groupId) 123 throws com.liferay.portal.security.auth.PrincipalException { 124 return _trashEntryService.getEntries(groupId); 125 } 126 127 /** 128 * Returns a range of all the trash entries matching the group ID. 129 * 130 * @param groupId the primary key of the group 131 * @param start the lower bound of the range of trash entries to return 132 * @param end the upper bound of the range of trash entries to return (not 133 inclusive) 134 * @param obc the comparator to order the trash entries (optionally 135 <code>null</code>) 136 * @return the range of matching trash entries ordered by comparator 137 <code>obc</code> 138 * @throws PrincipalException if a system exception occurred 139 */ 140 @Override 141 public com.liferay.portlet.trash.model.TrashEntryList getEntries( 142 long groupId, int start, int end, 143 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.trash.model.TrashEntry> obc) 144 throws com.liferay.portal.security.auth.PrincipalException { 145 return _trashEntryService.getEntries(groupId, start, end, obc); 146 } 147 148 /** 149 * Moves the trash entry with the entity class name and primary key, 150 * restoring it to a new location identified by the destination container 151 * model ID. 152 * 153 * <p> 154 * This method throws a {@link TrashPermissionException} if the user did not 155 * have the permission to perform one of the necessary operations. The 156 * exception is created with a type specific to the operation: 157 * </p> 158 * 159 * <ul> 160 * <li> 161 * {@link TrashPermissionException#MOVE} - if the user did not have 162 * permission to move the trash entry to the new 163 * destination 164 * </li> 165 * <li> 166 * {@link TrashPermissionException#RESTORE} - if the user did not have 167 * permission to restore the trash entry 168 * </li> 169 * </ul> 170 * 171 * @param className the class name of the entity 172 * @param classPK the primary key of the entity 173 * @param destinationContainerModelId the primary key of the new location 174 * @param serviceContext the service context to be applied (optionally 175 <code>null</code>) 176 * @throws PortalException if a matching trash entry could not be found, if 177 the user did not have permission to move the trash entry to the 178 new location, if the user did not have permission to restore the 179 trash entry, if a duplicate trash entry exists at the new 180 location, or if a portal exception occurred 181 */ 182 @Override 183 public void moveEntry(java.lang.String className, long classPK, 184 long destinationContainerModelId, 185 com.liferay.portal.service.ServiceContext serviceContext) 186 throws com.liferay.portal.kernel.exception.PortalException { 187 _trashEntryService.moveEntry(className, classPK, 188 destinationContainerModelId, serviceContext); 189 } 190 191 @Override 192 public com.liferay.portlet.trash.model.TrashEntry restoreEntry( 193 java.lang.String className, long classPK) 194 throws com.liferay.portal.kernel.exception.PortalException { 195 return _trashEntryService.restoreEntry(className, classPK); 196 } 197 198 @Override 199 public com.liferay.portlet.trash.model.TrashEntry restoreEntry( 200 java.lang.String className, long classPK, long overrideClassPK, 201 java.lang.String name) 202 throws com.liferay.portal.kernel.exception.PortalException { 203 return _trashEntryService.restoreEntry(className, classPK, 204 overrideClassPK, name); 205 } 206 207 @Override 208 public com.liferay.portlet.trash.model.TrashEntry restoreEntry(long entryId) 209 throws com.liferay.portal.kernel.exception.PortalException { 210 return _trashEntryService.restoreEntry(entryId); 211 } 212 213 /** 214 * Restores the trash entry to its original location. In order to handle a 215 * duplicate trash entry already existing at the original location, either 216 * pass in the primary key of the existing trash entry's entity to overwrite 217 * or pass in a new name to give to the trash entry being restored. 218 * 219 * <p> 220 * This method throws a {@link TrashPermissionException} if the user did not 221 * have the permission to perform one of the necessary operations. The 222 * exception is created with a type specific to the operation: 223 * </p> 224 * 225 * <ul> 226 * <li> 227 * {@link TrashPermissionException#RESTORE} - if the user did not have 228 * permission to restore the trash entry 229 * </li> 230 * <li> 231 * {@link TrashPermissionException#RESTORE_OVERWRITE} - if the user did not 232 * have permission to delete the existing trash entry 233 * </li> 234 * <li> 235 * {@link TrashPermissionException#RESTORE_RENAME} - if the user did not 236 * have permission to rename the trash entry 237 * </li> 238 * </ul> 239 * 240 * @param entryId the primary key of the trash entry to restore 241 * @param overrideClassPK the primary key of the entity to overwrite 242 (optionally <code>0</code>) 243 * @param name a new name to give to the trash entry being restored 244 (optionally <code>null</code>) 245 * @return the restored trash entry 246 * @throws PortalException if a matching trash entry could not be found, if 247 the user did not have permission to overwrite an existing trash 248 entry, to rename the trash entry being restored, or to restore 249 the trash entry in general 250 */ 251 @Override 252 public com.liferay.portlet.trash.model.TrashEntry restoreEntry( 253 long entryId, long overrideClassPK, java.lang.String name) 254 throws com.liferay.portal.kernel.exception.PortalException { 255 return _trashEntryService.restoreEntry(entryId, overrideClassPK, name); 256 } 257 258 /** 259 * Sets the Spring bean ID for this bean. 260 * 261 * @param beanIdentifier the Spring bean ID for this bean 262 */ 263 @Override 264 public void setBeanIdentifier(java.lang.String beanIdentifier) { 265 _trashEntryService.setBeanIdentifier(beanIdentifier); 266 } 267 268 /** 269 * @deprecated As of 6.1.0, replaced by {@link #getWrappedService} 270 */ 271 @Deprecated 272 public TrashEntryService getWrappedTrashEntryService() { 273 return _trashEntryService; 274 } 275 276 /** 277 * @deprecated As of 6.1.0, replaced by {@link #setWrappedService} 278 */ 279 @Deprecated 280 public void setWrappedTrashEntryService(TrashEntryService trashEntryService) { 281 _trashEntryService = trashEntryService; 282 } 283 284 @Override 285 public TrashEntryService getWrappedService() { 286 return _trashEntryService; 287 } 288 289 @Override 290 public void setWrappedService(TrashEntryService trashEntryService) { 291 _trashEntryService = trashEntryService; 292 } 293 294 private TrashEntryService _trashEntryService; 295 }