001
014
015 package com.liferay.portal.exception;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.util.StringUtil;
019
020
024 public class UserIdException extends PortalException {
025
026
029 @Deprecated
030 public UserIdException() {
031 }
032
033
036 @Deprecated
037 public UserIdException(String msg) {
038 super(msg);
039 }
040
041
044 @Deprecated
045 public UserIdException(String msg, Throwable cause) {
046 super(msg, cause);
047 }
048
049
052 @Deprecated
053 public UserIdException(Throwable cause) {
054 super(cause);
055 }
056
057 public static class MustNotBeNull extends UserIdException {
058
059 public MustNotBeNull() {
060 super("User ID must not be null");
061 }
062
063 }
064
065 public static class MustNotBeReserved extends UserIdException {
066
067 public MustNotBeReserved(long userId, String[] reservedUserIds) {
068 super(
069 String.format(
070 "User ID %s must not be a reserved one such as: %s", userId,
071 StringUtil.merge(reservedUserIds)));
072
073 this.userId = userId;
074 this.reservedUserIds = reservedUserIds;
075 }
076
077 public final String[] reservedUserIds;
078 public final long userId;
079
080 }
081
082 }