/*
 * 
 */
package com.bankaudit.service;

import java.util.List;
import java.util.Map;
import java.util.Set;

import com.bankaudit.dto.DataTableResponse;
import com.bankaudit.dto.MaintUsergroupRolesDto;
import com.bankaudit.model.MaintUsergroupRoles;
import com.bankaudit.model.UserRoleMapping;

/**
 * The Interface {@link MaintUsergroupRolesService} define the methods that can
 * be exposed to controller layer in order to implements rest end-points and
 * define the business logic.
 *
 * @author amit.patel
 * @version 1.0
 */
public interface MaintUsergroupRolesService {

	/**
	 * This method is use to Creates the maint usergroup roles.
	 *
	 * @param maintUsergroupRolesDto
	 *            specify the maint usergroup roles dto
	 */
	void createMaintUsergroupRoles(MaintUsergroupRolesDto maintUsergroupRolesDto);

	/**
	 * This method is use to Update maint usergroup roles.
	 *
	 * @param maintUsergroupRolesDto
	 *            specify the maint usergroup roles dto
	 */
	void updateMaintUsergroupRoles(MaintUsergroupRolesDto maintUsergroupRolesDto);

	/**
	 * This method is use to Gets the maint usergroup role.
	 *
	 * @param legalEntityCode
	 *            specify the legal entity code
	 * @param ugRoleCode
	 *            specify the ug role code
	 * @param status
	 *            specify the status
	 * @return the maint usergroup roles .
	 */
	MaintUsergroupRoles getMaintUsergroupRole(Integer legalEntityCode, String ugRoleCode,String status);

	
	/**
	 * This method is use to Creates the user role mapping.
	 *
	 * @param userRoleMapping
	 *            specify the user role mapping
	 */
	void createUserRoleMapping(UserRoleMapping userRoleMapping);
	
	/**
	 * This method is use to Gets the maint usergroup roles by legal entity code
	 * and user id.
	 *
	 * @param legalEntityCode
	 *            specify the legal entity code
	 * @param userId
	 *            specify the user id
	 * @param status
	 *            specify the status
	 * @return the sets the .
	 */
	Set<MaintUsergroupRoles> getMaintUsergroupRolesByLegalEntityCodeAndUserId(Integer legalEntityCode, String userId,String status);

	/**
	 * This method is use to Gets the maint usergroup roles.
	 *
	 * @param legalEntityCode
	 *            specify the legal entity code
	 * @param userId
	 *            specify the user id
	 * @param search
	 *            specify the search
	 * @param orderColumn
	 *            specify the order column
	 * @param orderDirection
	 *            specify the order direction
	 * @param page
	 *            specify the page
	 * @param size
	 *            specify the size
	 * @return the data table response .
	 */
	DataTableResponse getMaintUsergroupRoles(Integer legalEntityCode,String userId, String search, Integer orderColumn,
			String orderDirection, Integer page, Integer size);
	
	/**
	 * This method is use to Delete roles by user.
	 *
	 * @param legalEntityCode
	 *            specify the legal entity code
	 * @param userId
	 *            specify the user id
	 */
	void deleteRolesByUser(Integer legalEntityCode , String userId );

	/**
	 * This method is use to Gets the user role mappings.
	 *
	 * @param legalEntityCode
	 *            specify the legal entity code
	 * @param userId
	 *            specify the user id
	 * @param statsusUnauth
	 *            specify the statsus unauth
	 * @return the list .
	 */
	List<UserRoleMapping> getUserRoleMappings(Integer legalEntityCode, String userId, String statsusUnauth);

	/**
	 * This method is use to Delete user role mapping.
	 *
	 * @param legalEntityCode
	 *            specify the legal entity code
	 * @param userId
	 *            specify the user id
	 * @param statsusUnauth
	 *            specify the statsus unauth
	 */
	void deleteUserRoleMapping(Integer legalEntityCode, String userId, String statsusUnauth);

	/**
	 * This method is use to Gets the maint usergroup roles by legal entity code
	 * and user id.
	 *
	 * @param legalEntityCode
	 *            specify the legal entity code
	 * @param status
	 *            specify the status
	 * @return the list .
	 */
	List<MaintUsergroupRoles> getMaintUsergroupRolesByLegalEntityCodeAndUserId(Integer legalEntityCode, String status);
	
	List<Map<String,Integer>> getTotalUsersPerRole(Integer legalEntityCode);
    
}
