001
014
015 package com.liferay.portal.kernel.exception;
016
017 import java.util.Collection;
018 import java.util.Locale;
019
020
023 public class LocaleException extends PortalException {
024
025 public static final int TYPE_CONTENT = 3;
026
027 public static final int TYPE_DEFAULT = 4;
028
029 public static final int TYPE_DISPLAY_SETTINGS = 1;
030
031 public static final int TYPE_EXPORT_IMPORT = 2;
032
033 public LocaleException() {
034 _type = 0;
035 }
036
037 public LocaleException(int type) {
038 _type = type;
039 }
040
041 public LocaleException(int type, String msg) {
042 super(msg);
043
044 _type = type;
045 }
046
047 public LocaleException(int type, String msg, Throwable cause) {
048 super(msg, cause);
049
050 _type = type;
051 }
052
053 public LocaleException(int type, Throwable cause) {
054 super(cause);
055
056 _type = type;
057 }
058
059 public Collection<Locale> getSourceAvailableLocales() {
060 return _sourceAvailableLocales;
061 }
062
063 public Collection<Locale> getTargetAvailableLocales() {
064 return _targetAvailableLocales;
065 }
066
067 public int getType() {
068 return _type;
069 }
070
071 public void setSourceAvailableLocales(
072 Collection<Locale> sourceAvailableLocales) {
073
074 _sourceAvailableLocales = sourceAvailableLocales;
075 }
076
077 public void setTargetAvailableLocales(
078 Collection<Locale> targetAvailableLocales) {
079
080 _targetAvailableLocales = targetAvailableLocales;
081 }
082
083 private Collection<Locale> _sourceAvailableLocales;
084 private Collection<Locale> _targetAvailableLocales;
085 private final int _type;
086
087 }