package io.gmss.fiscad.interfaces.infocad.metier;

import com.fasterxml.jackson.databind.JsonNode;
import io.gmss.fiscad.entities.infocad.metier.Enquete;
import io.gmss.fiscad.entities.infocad.metier.ParcelleGeom;
import io.gmss.fiscad.entities.infocad.metier.Upload;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Optional;

public interface ParcelleGeomService {
    int createParcelleFromGeoJsonFile(MultipartFile file,String reference,String description) throws BadRequestException;
    ParcelleGeom createOnParcelleFromGeoJson(JsonNode jsonNode, Upload upload) throws BadRequestException;
    ParcelleGeom updateParcelleGeom(MultipartFile file) throws NotFoundException;
    void deleteParcelle(Long id) throws NotFoundException;
    Page<ParcelleGeom> getParcelleGeomList(Pageable pageable);
    List<ParcelleGeom> getParcelleGeomList();
    List<ParcelleGeom> getParcelleGeomListUnQuatier(String codeQuartier);

    Optional<ParcelleGeom> getParcelleGeomById(Long id);


    void setStatutParcelleGeomFromGeoJson(ParcelleGeom parcelleGeom);

    void setStatutParcelleGeomFromEnquete(Enquete enquete);
    void linkParcelleToParcelleGeom(String nupProvisoir,Long parcelleId);

    ///List<ParcelleGeom> getListParcelle(String nupProvisoir);
}
