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

import java.util.List;

import com.bankaudit.dto.DataTableResponse;
import com.bankaudit.model.MaintCriticality;

/**
 * The Interface {@link MaintCriticalityService} 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 MaintCriticalityService {

	/**
	 * This method is use to Creates the maint criticality.
	 *
	 * @param maintCriticality
	 *            specify the maint criticality
	 * @throws Exception
	 *             the exception
	 */
	void createMaintCriticality(MaintCriticality maintCriticality)throws Exception;

	/**
	 * This method is use to Update maint criticality.
	 *
	 * @param maintCriticality
	 *            specify the maint criticality
	 */
	void updateMaintCriticality(MaintCriticality maintCriticality);

    /**
	 * This method is use to Gets the maint criticality by criticality code and
	 * criticality of type.
	 *
	 * @param legalEntityCode
	 *            specify the legal entity code
	 * @param criticalityCode
	 *            specify the criticality code
	 * @param criticalityOfType
	 *            specify the criticality of type
	 * @param status
	 *            specify the status
	 * @return the maint criticality .
	 */
    MaintCriticality getMaintCriticalityByCriticalityCodeAndCriticalityOfType(Integer legalEntityCode,String criticalityCode,
			String criticalityOfType,String status);


	/**
	 * This method is use to Gets the maint criticality by criticality of type.
	 *
	 * @param legalEntityCode
	 *            specify the legal entity code
	 * @param criticalityOfType
	 *            specify the criticality of type
	 * @return the list .
	 */
	List<MaintCriticality> getMaintCriticalityByCriticalityOfType(Integer legalEntityCode ,String criticalityOfType);

	/**
	 * This method is use to Gets the all maint criticality.
	 *
	 * @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
	 * @param legalEntityCode
	 *            specify the legal entity code
	 * @return the data table response .
	 */
	DataTableResponse getAllMaintCriticality(String search, Integer orderColumn, String orderDirection, Integer page,
			Integer size,Integer legalEntityCode);
	
	/**
	 * This method is use to Gets the by criticality score.
	 *
	 * @param legalEntityCode
	 *            specify the legal entity code
	 * @param criticalityOfType
	 *            specify the criticality of type
	 * @param score
	 *            specify the score
	 * @param criticalityCode
	 *            specify the criticality code
	 * @return the list .
	 */
	List<MaintCriticality> getByCriticalityScore(Integer legalEntityCode ,String criticalityOfType, String score ,String criticalityCode);

	/**
	 * This method is use to Checks if is maint criticality.
	 *
	 * @param legalEntityCode
	 *            specify the legal entity code
	 * @param criticalityCode
	 *            specify the criticality code
	 * @param criticalityOfType
	 *            specify the criticality of type
	 * @return the boolean .
	 */
	Boolean isMaintCriticality(Integer legalEntityCode, String criticalityCode, String criticalityOfType);
	
	Boolean validateScore(MaintCriticality maintCriticality);
	
	void deleteCriticalityByCodeAndType(Integer legalEntityCode,  String criticalityCode, String criticalityOfType, String userId);

}
