class AuthenticatedUserUtil {

   public static AuthenticatedUser createFromString(String user)
   {
       switch (user)
       {
           case AuthenticatedUser.SYSTEM_USERNAME:
               return AuthenticatedUser.SYSTEM_USER;
           case AuthenticatedUser.ANONYMOUS_USERNAME:
               return AuthenticatedUser.ANONYMOUS_USER;
           default:
               return new AuthenticatedUser(user);
       }
   }

   private  AuthenticatedUserUtil();

}