package com.ejie.ad74a.service;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.multipart.MultipartFile;

import com.ejie.ad74a.model.Avisos;
import com.ejie.ad74a.model.Direcciones;
import com.ejie.ad74a.model.DocuAvisos;
import com.ejie.x38.dto.JerarquiaDto;
import com.ejie.x38.dto.TableRequestDto;
import com.ejie.x38.dto.TableResponseDto;
import com.ejie.x38.dto.TableRowDto;

/**
 * AvisosService generated by UDA, 12-may-2023 11:16:38.
 * 
 * @author UDA
 */

public interface AvisosService {

	/**
	 * Inserts a single row in the Avisos table.
	 *
	 * @param avisos Avisos
	 * @return Avisos
	 */
	Avisos add(Avisos avisos);

	/**
	 * Updates a single row in the Avisos table.
	 *
	 * @param avisos Avisos
	 * @return Avisos
	 */
	Avisos update(Avisos avisos);

	/**
	 * Finds a single row in the Avisos table.
	 *
	 * @param avisos Avisos
	 * @return Avisos
	 */
	Avisos find(Avisos avisos);

	/**
	 * Deletes a single row in the Avisos table.
	 *
	 * @param avisos Avisos
	 */
	void remove(Avisos avisos);

	/**
	 * Finds a list of rows in the Avisos table.
	 *
	 * @param avisos          Avisos
	 * @param tableRequestDto TableRequestDto
	 * @return List<Avisos>
	 */
	List<Avisos> findAll(Avisos avisos, TableRequestDto tableRequestDto);

	/**
	 * Finds rows in the Avisos table using like.
	 *
	 * @param avisos          Avisos
	 * @param tableRequestDto TableRequestDto
	 * @param startsWith      Boolean
	 * @return List<Avisos>
	 */
	List<Avisos> findAllLike(Avisos avisos, TableRequestDto tableRequestDto, Boolean startsWith);

	/*
	 * OPERACIONES RUP_TABLE
	 */

	/**
	 * Removes rows from the Avisos table.
	 *
	 * @param tableRequestDto TableRequestDto
	 */
	void removeMultiple(TableRequestDto tableRequestDto);

	/**
	 * Filter method in the Avisos table.
	 *
	 * @param filterAvisos    Avisos
	 * @param tableRequestDto TableRequestDto
	 * @param startsWith      Boolean
	 * @param usuario
	 * @return TableResponseDto<Avisos>
	 */
	TableResponseDto<Avisos> filter(Avisos filterAvisos, TableRequestDto tableRequestDto, Boolean startsWith,
			Integer usuario);

	/**
	 * Searches rows in the Avisos table.
	 *
	 * @param filterAvisos    Avisos
	 * @param searchAvisos    Avisos
	 * @param tableRequestDto TableRequestDto
	 * @param startsWith      Boolean
	 * @return List<TableRowDto<Avisos>>
	 */
	List<TableRowDto<Avisos>> search(Avisos filterAvisos, Avisos searchAvisos, TableRequestDto tableRequestDto,
			Boolean startsWith);

	/**
	 * Reorder the selection made in Avisos table.
	 *
	 * @param filterAvisos    Avisos
	 * @param tableRequestDto TableRequestDto
	 * @param startsWith      Boolean
	 * @return Object
	 */
	Object reorderSelection(Avisos filterAvisos, TableRequestDto tableRequestDto, Boolean startsWith);

	/*
	 * OPERACIONES RUP_TABLE JERARQUIA
	 */

	/**
	 * Finder method in the hierarchical the Avisos table.
	 *
	 * @param filterAvisos    Avisos
	 * @param tableRequestDto TableRequestDto
	 * @param startsWith      Boolean
	 * @return TableResponseDto<JerarquiaDto<Avisos>>
	 */
	TableResponseDto<JerarquiaDto<Avisos>> jerarquia(Avisos filterAvisos, TableRequestDto tableRequestDto,
			Boolean startsWith);

	/**
	 * Finder method for siblings rows in the hierarchical the Avisos table.
	 *
	 * @param filterAvisos    Avisos
	 * @param tableRequestDto TableRequestDto
	 * @return TableResponseDto<JerarquiaDto<Avisos>>
	 */
	TableResponseDto<JerarquiaDto<Avisos>> jerarquiaChildren(Avisos filterAvisos, TableRequestDto tableRequestDto);

	/**
	 * Exporta Datos al clipBoard
	 *
	 */
	List<Avisos> getMultiple(Avisos filterAvisos, TableRequestDto tableRequestDto, Boolean startsWith);

	/**
	 * Exporta Datos en su formato
	 *
	 */
	void generateReport(Avisos filterAvisos, String[] columns, String[] columnsName, String fileName, String sheetTitle,
			TableRequestDto tableRequestDto, HttpServletRequest request, HttpServletResponse response);

	List<Avisos> avisosComplete(Avisos filterAvisos, TableRequestDto tableRequestDto);

	public Avisos procesarAvisos(Avisos filterAvisos);

	public Avisos updateAvisos(Avisos avisos);

	public Avisos insertAvisos(Avisos avisos);

	String informeDeIntervencionDSS(Avisos aviso);

	Avisos aportarExpediente(Avisos aviso);

	Avisos solicitarPS(Avisos aviso);

	public Avisos aportar(Avisos avisos, MultipartFile documento, Long idTipoDoc36);

	Avisos aportarDocumento(MultipartFile documento);

	public DocuAvisos subirDocumentoAPif(DocuAvisos docuAvisos, MultipartFile documento);

	public Avisos correoSSB(Avisos aviso);

	public Direcciones getDireccionDesdeXML(Direcciones direcciones);

}
