001         package com.croftsoft.apps.chat.user;
002    
003         import com.croftsoft.core.security.Authentication;
004    
005         /*********************************************************************
006         * Stores User objects.
007         *
008         * @version
009         *   2003-06-07
010         * @since
011         *   2003-06-07
012         * @author
013         *   <a href="https://www.croftsoft.com/">David Wallace Croft</a>
014         *********************************************************************/
015    
016         public interface  UserStore
017         //////////////////////////////////////////////////////////////////////
018         //////////////////////////////////////////////////////////////////////
019         {
020    
021         public User        getUser    ( Authentication  authentication );
022    
023         public User        getUser    ( UserId  userId   );
024    
025         public UserId      getUserId  ( String  username );
026    
027         public UserId [ ]  getUserIds ( );
028    
029         //////////////////////////////////////////////////////////////////////
030         //////////////////////////////////////////////////////////////////////
031    
032         public UserId   createUser ( Authentication  authentication );
033    
034         public boolean  removeUser ( UserId  userId );
035    
036         //////////////////////////////////////////////////////////////////////
037         //////////////////////////////////////////////////////////////////////
038         }