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