public class UserStatusChecker implements MessageSourceAware {
private MessageSourceAccessor messages;
public void check(UserStatus userStatus) {
if ((userStatus.getId() != null) && (userStatus.getId() == 1)) {
throw new CheckUserStatusException(messages.getMessage(
"user.superuser.edit", "不允许修改超级管理员"));
}
}