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                    super();
030            }
031    
032            public RestoreEntryException(int type) {
033                    super();
034    
035                    _type = type;
036            }
037    
038            public RestoreEntryException(String msg) {
039                    super(msg);
040            }
041    
042            public RestoreEntryException(String msg, Throwable cause) {
043                    super(msg, cause);
044            }
045    
046            public RestoreEntryException(Throwable cause) {
047                    super(cause);
048            }
049    
050            public long getDuplicateEntryId() {
051                    return _duplicateEntryId;
052            }
053    
054            public String getOldName() {
055                    return _oldName;
056            }
057    
058            public long getTrashEntryId() {
059                    return _trashEntryId;
060            }
061    
062            public int getType() {
063                    return _type;
064            }
065    
066            public void setDuplicateEntryId(long duplicateEntryId) {
067                    _duplicateEntryId = duplicateEntryId;
068            }
069    
070            public void setOldName(String oldName) {
071                    _oldName = oldName;
072            }
073    
074            public void setTrashEntryId(long trashEntryId) {
075                    _trashEntryId = trashEntryId;
076            }
077    
078            public void setType(int type) {
079                    _type = type;
080            }
081    
082            private long _duplicateEntryId;
083            private String _oldName;
084            private long _trashEntryId;
085            private int _type;
086    
087    }