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