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

import java.sql.Timestamp;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.bankaudit.dto.DataTableResponse;
import com.bankaudit.model.MaintAuditParameter;
import com.bankaudit.model.MaintAuditParameterWrk;
import com.bankaudit.process.model.MaintAuditParameterWrapper;


/**
 * The Interface {@link MaintAuditParameterService} 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 MaintAuditParameterService {
	
	/**
	 * This method is use to Creates the maint address.
	 *
	 * @param maintAuditParameter
	 *            specify the maint audit parameter
	 * @throws Exception
	 *             the exception
	 */
	void createMaintAddress(MaintAuditParameter maintAuditParameter) throws Exception;

	/**
	 * This method is use to Update maint audit parameter.
	 *
	 * @param maintAuditParameter
	 *            specify the maint audit parameter
	 */
	void updateMaintAuditParameter(MaintAuditParameter maintAuditParameter);
	 
 	/**
	 * This method is use to Update maint audits parameters.
	 *
	 * @param maintAuditParameterList
	 *            specify the maint audit parameter list
	 * @param d
	 *            specify the d
	 * @param t
	 *            specify the t
	 * @return true, if successful
	 */
 	boolean updateMaintAuditsParameters(List<MaintAuditParameter> maintAuditParameterList,Date d,Timestamp t);
	
	/**
	 * This method is use to Gets the audit parameter.
	 *
	 * @param legalEntityCode
	 *            specify the legal entity code
	 * @param auditTypeCode
	 *            specify the audit type code
	 * @param entitlement
	 *            specify the entitlement
	 * @param userName
	 *            specify the user name
	 * @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 getAuditParameter( Integer legalEntityCode,String auditTypeCode,String entitlement,String userName, String search, Integer orderColumn,
			String orderDirection, Integer page, Integer size);
	
	/**
	 * This method is use to Gets the maint audit parameterby audit type.
	 *
	 * @param legalEntityCode
	 *            specify the legal entity code
	 * @param auditTypeCode
	 *            specify the audit type code
	 * @return the list .
	 */
	List<MaintAuditParameter> getMaintAuditParameterbyAuditType(Integer legalEntityCode, String auditTypeCode);

	/**
	 * This method is use to Gets the maint audit parameter by audit type code
	 * criticality and unit type.
	 *
	 * @param legalEntityCode
	 *            specify the legal entity code
	 * @param auditTypeCode
	 *            specify the audit type code
	 * @param uCriticality
	 *            specify the u criticality
	 * @param unitType
	 *            specify the unit type
	 * @param status
	 *            specify the status
	 * @return the maint audit parameter .
	 */
	MaintAuditParameter getMaintAuditParameterByAuditTypeCodeCriticalityAndUnitType(Integer legalEntityCode,String auditTypeCode, Integer id, String status);

	List<Object[]> getMaintAuditParametersPreviousRatingLov(Integer legalEntityCode, String auditTypeCode);
	
	boolean updateMaintAuditsParametersDerived(Integer legalEntityCode, String auditTypeCode);

	Map<String, Object> isMaintAuditParameterAlreadyExist(MaintAuditParameterWrk maintAuditParameter);
	
	DataTableResponse getAuditParameterDerived( Integer legalEntityCode,String auditTypeCode,String entitlement,String userName, String search, Integer orderColumn,
			String orderDirection, Integer page, Integer size);
	
	void deleteMaintAuditParameter(Integer legalEntityCode, String auditTypeCode, Integer id,
			String statusAuth);
	
}
