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