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;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    
019    /**
020     * @author Brian Wing Shun Chan
021     */
022    public class RestoreEntryException extends PortalException {
023    
024            public static final int DUPLICATE = 1;
025    
026            public static final int INVALID_CONTAINER = 2;
027    
028            public RestoreEntryException() {
029            }
030    
031            public RestoreEntryException(int type) {
032                    _type = type;
033            }
034    
035            public RestoreEntryException(String msg) {
036                    super(msg);
037            }
038    
039            public RestoreEntryException(String msg, Throwable cause) {
040                    super(msg, cause);
041            }
042    
043            public RestoreEntryException(Throwable cause) {
044                    super(cause);
045            }
046    
047            public long getDuplicateEntryId() {
048                    return _duplicateEntryId;
049            }
050    
051            public String getOldName() {
052                    return _oldName;
053            }
054    
055            public long getTrashEntryId() {
056                    return _trashEntryId;
057            }
058    
059            public int getType() {
060                    return _type;
061            }
062    
063            public void setDuplicateEntryId(long duplicateEntryId) {
064                    _duplicateEntryId = duplicateEntryId;
065            }
066    
067            public void setOldName(String oldName) {
068                    _oldName = oldName;
069            }
070    
071            public void setTrashEntryId(long trashEntryId) {
072                    _trashEntryId = trashEntryId;
073            }
074    
075            public void setType(int type) {
076                    _type = type;
077            }
078    
079            private long _duplicateEntryId;
080            private String _oldName;
081            private long _trashEntryId;
082            private int _type;
083    
084    }