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