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.trash.kernel.exception;
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 static final int INVALID_NAME = 3;
029    
030            public static final int INVALID_STATUS = 4;
031    
032            public RestoreEntryException() {
033            }
034    
035            public RestoreEntryException(int type) {
036                    _type = type;
037            }
038    
039            public RestoreEntryException(int type, Throwable cause) {
040                    super(cause);
041    
042                    _type = type;
043            }
044    
045            public RestoreEntryException(String msg) {
046                    super(msg);
047            }
048    
049            public RestoreEntryException(String msg, Throwable cause) {
050                    super(msg, cause);
051            }
052    
053            public RestoreEntryException(Throwable cause) {
054                    super(cause);
055            }
056    
057            public long getDuplicateEntryId() {
058                    return _duplicateEntryId;
059            }
060    
061            public String getErrorMessage() {
062                    return _errorMessage;
063            }
064    
065            public String getOldName() {
066                    return _oldName;
067            }
068    
069            public long getTrashEntryId() {
070                    return _trashEntryId;
071            }
072    
073            public int getType() {
074                    return _type;
075            }
076    
077            public boolean isOverridable() {
078                    return _overridable;
079            }
080    
081            public void setDuplicateEntryId(long duplicateEntryId) {
082                    _duplicateEntryId = duplicateEntryId;
083            }
084    
085            public void setErrorMessage(String errorMessage) {
086                    _errorMessage = errorMessage;
087            }
088    
089            public void setOldName(String oldName) {
090                    _oldName = oldName;
091            }
092    
093            public void setOverridable(boolean overridable) {
094                    _overridable = overridable;
095            }
096    
097            public void setTrashEntryId(long trashEntryId) {
098                    _trashEntryId = trashEntryId;
099            }
100    
101            public void setType(int type) {
102                    _type = type;
103            }
104    
105            private long _duplicateEntryId;
106            private String _errorMessage;
107            private String _oldName;
108            private boolean _overridable = true;
109            private long _trashEntryId;
110            private int _type;
111    
112    }