<commit_before>package edu.emory.cci.aiw.cvrg.eureka.services.config;

import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.google.inject.Inject;

import edu.emory.cci.aiw.cvrg.eureka.common.entity.Role;
import edu.emory.cci.aiw.cvrg.eureka.common.entity.User;
import edu.emory.cci.aiw.cvrg.eureka.services.dao.RoleDao;
import edu.emory.cci.aiw.cvrg.eureka.services.dao.UserDao;
import edu.emory.cci.aiw.cvrg.eureka.services.util.StringUtil;

/**
 * To be used for Demo purposes only. Bootstraps the data store with some test
 * items so the integration between the web application and the services layer
 * can be tested more fully.
 * 
 * @author hrathod
 * 
 */
public class Bootstrap {

	/**
	 * The role DAO class.
	 */
	private final RoleDao roleDao;
	/**
	 * The user DAO class.
	 */
	private final UserDao userDao;

	/**
	 * Create a Bootstrap class with an EntityManager.
	 * 
	 * @param inRoleDao The data access object to be used to work with user
	 *            objects in the data store.
	 * @param inUserDao The data access object to be used to work with role
	 *            objects in the data store.
	 */
	@Inject
	Bootstrap(final RoleDao inRoleDao, final UserDao inUserDao) {
		this.roleDao = inRoleDao;
		this.userDao = inUserDao;
	}

	/**
	 * The work method of the class, adds some roles and users to the data
	 * store.
	 * 
	 * @throws NoSuchAlgorithmException Thrown when the configuration can not be
	 *             sent to the ETL backend properly.
	 * @throws KeyManagementException Thrown when the configuration can not be
	 *             sent to the ETL backend properly.
	 */
	void configure() throws KeyManagementException, NoSuchAlgorithmException {
		addDefaultRoles();
		addDefaultUsers();<commit_msg>Removed unnecessary exception declarations, and made class package protected.<commit_after>package edu.emory.cci.aiw.cvrg.eureka.services.config;

import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.google.inject.Inject;

import edu.emory.cci.aiw.cvrg.eureka.common.entity.Role;
import edu.emory.cci.aiw.cvrg.eureka.common.entity.User;
import edu.emory.cci.aiw.cvrg.eureka.services.dao.RoleDao;
import edu.emory.cci.aiw.cvrg.eureka.services.dao.UserDao;
import edu.emory.cci.aiw.cvrg.eureka.services.util.StringUtil;

/**
 * To be used for Demo purposes only. Bootstraps the data store with some test
 * items so the integration between the web application and the services layer
 * can be tested more fully.
 * 
 * @author hrathod
 * 
 */
class Bootstrap {

	/**
	 * The role DAO class.
	 */
	private final RoleDao roleDao;
	/**
	 * The user DAO class.
	 */
	private final UserDao userDao;

	/**
	 * Create a Bootstrap class with an EntityManager.
	 * 
	 * @param inRoleDao The data access object to be used to work with user
	 *            objects in the data store.
	 * @param inUserDao The data access object to be used to work with role
	 *            objects in the data store.
	 */
	@Inject
	Bootstrap(final RoleDao inRoleDao, final UserDao inUserDao) {
		this.roleDao = inRoleDao;
		this.userDao = inUserDao;
	}

	/**
	 * The work method of the class, adds some roles and users to the data
	 * store.
	 * 
	 * @throws NoSuchAlgorithmException Thrown when the configuration can not be
	 *             sent to the ETL backend properly.
	 */
	void configure() throws NoSuchAlgorithmException {
		addDefaultRoles();
		addDefaultUsers();
{'fraction_non_alphanumeric': 0.0888268156424581, 'fraction_numerical': 0.0, 'mean_word_length': 3.420987654320988, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1798061', 'n_tokens_mistral': 1163, 'n_tokens_neox': 1127, 'n_words': 352}