001         package com.croftsoft.apps.chat.response;
002    
003         import com.croftsoft.core.lang.NullArgumentException;
004    
005         import com.croftsoft.apps.chat.user.UserId;
006    
007         /*********************************************************************
008         * Response to a CreateUserRequest.
009         *
010         * @version
011         *   2003-06-07
012         * @since
013         *   2003-06-07
014         * @author
015         *   <a href="https://www.croftsoft.com/">David Wallace Croft</a>
016         *********************************************************************/
017    
018         public final class  CreateUserResponse
019           extends AbstractResponse
020         //////////////////////////////////////////////////////////////////////
021         //////////////////////////////////////////////////////////////////////
022         {
023    
024         private static final long  serialVersionUID = 0L;
025    
026         //
027    
028         private final UserId   userId;
029    
030         private final boolean  usernameBad;
031    
032         //////////////////////////////////////////////////////////////////////
033         //////////////////////////////////////////////////////////////////////
034    
035         public  CreateUserResponse (
036           boolean  denied,
037           UserId   userId,
038           boolean  usernameBad )
039         //////////////////////////////////////////////////////////////////////
040         {
041           super ( denied );
042    
043           this.userId      = userId;
044    
045           this.usernameBad = usernameBad;
046         }
047    
048         public  CreateUserResponse ( UserId  userId )
049         //////////////////////////////////////////////////////////////////////
050         {
051           this ( false, userId, false );
052    
053           NullArgumentException.check ( userId );
054         }
055    
056         //////////////////////////////////////////////////////////////////////
057         //////////////////////////////////////////////////////////////////////
058    
059         public UserId   getUserId     ( ) { return userId;      }
060    
061         public boolean  isUsernameBad ( ) { return usernameBad; }
062    
063         //////////////////////////////////////////////////////////////////////
064         //////////////////////////////////////////////////////////////////////
065         }