<commit_before>package org.fiteagle.api.core.usermanagement;

import java.io.IOException;
import java.security.NoSuchAlgorithmException;
import java.util.List;

import org.fiteagle.api.core.IMessageBus;
import org.fiteagle.api.core.usermanagement.User.PublicKeyNotFoundException;
import org.fiteagle.api.core.usermanagement.User.Role;

public interface UserManager {
  
  public static final String GET_ALL_USERS = "getAllUsers";
  public static final String GET_USER = "getUser";
  public static final String MESSAGE_FILTER = IMessageBus.TYPE_REQUEST + " != '" + null + "'";
  
  public static final String TYPE_PARAMETER_USERNAME = "parameter_username";  
  
  public abstract void add(User user);
  
  public abstract User getUser(User user) ;
  
  public abstract User getUser(String username);
  
  public abstract void delete(User user);
  
  public abstract void delete(String username);
  
  public abstract void update(String username, String firstName, String lastName, String email, String affiliation,
      String password, List<UserPublicKey> publicKeys);
  
  public abstract void setRole(String username, Role role);
  
  public abstract void addKey(String username, UserPublicKey publicKey);
  
  public abstract void deleteKey(String username, String description);
  
  public abstract void renameKey(String username, String description, String newDescription);
  
  public abstract String createUserKeyPairAndCertificate(String username, String passphrase) throws Exception;
  
  public abstract String createUserCertificateForPublicKey(String username, String description) throws Exception, PublicKeyNotFoundException;
  
  public abstract boolean verifyCredentials(String username, String password) throws NoSuchAlgorithmException, IOException, UserNotFoundException;
  
  public abstract List<User> getAllUsers();<commit_msg>addUser is using message bus now<commit_after>package org.fiteagle.api.core.usermanagement;

import java.io.IOException;
import java.security.NoSuchAlgorithmException;
import java.util.List;

import org.fiteagle.api.core.usermanagement.User.PublicKeyNotFoundException;
import org.fiteagle.api.core.usermanagement.User.Role;

public interface UserManager {
  
  public static final String GET_ALL_USERS = "getAllUsers";
  public static final String GET_USER = "getUser";
  public static final String ADD_USER = "addUser";
  public static final String UPDATE_USER = "updateUser";
  public static final String DELETE_USER = "deleteUser";
  public static final String SET_ROLE = "setRole";
  public static final String ADD_PUBLIC_KEY = "addPublicKey";
  public static final String DELETE_PUBLIC_KEY = "deletePublicKey";
  public static final String RENAME_PUBLIC_KEY = "renamePublicKey";
  
  public static final String TYPE_PARAMETER_USERNAME = "parameter_username";
  public static final String TYPE_PARAMETER_USER_JSON = "parameter_user_json";
  public static final String TYPE_PARAMETER_PUBLIC_KEY = "parameter_public_key";
  
  public abstract void add(User user);
  
  public abstract User getUser(User user) ;
  
  public abstract User getUser(String username);
  
  public abstract void delete(User user);
  
  public abstract void delete(String username);
  
  public abstract void update(String username, String firstName, String lastName, String email, String affiliation,
      String password, List<UserPublicKey> publicKeys);
  
  public abstract void setRole(String username, Role role);
  
  public abstract void addKey(String username, UserPublicKey publicKey);
  
  public abstract void deleteKey(String username, String description);
  
  public abstract void renameKey(String username, String description, String newDescription);
  
  public abstract String createUserKeyPairAndCertificate(String username, String passphrase) throws Exception;
  
  public abstract String createUserCertificateForPublicKey(String username, String description) throws Exception, PublicKeyNotFoundException;
  
  public abstract boolean verifyCredentials(String username, String password) throws NoSuchAlgorithmException, IOException, UserNotFoundException;
  
  public abstract List<User> getAllUsers();
{'fraction_non_alphanumeric': 0.06485053037608486, 'fraction_numerical': 0.0, 'mean_word_length': 5.6384, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '16643', 'n_tokens_mistral': 1068, 'n_tokens_neox': 1067, 'n_words': 345}