package com.iqser.red.service.persistence.service.v1.api.internal.resources;

import java.util.List;

import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;

import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.EntityLog;

@ResponseStatus(value = HttpStatus.OK)
public interface EntityLogResource {

    String ENTITY_LOG_PATH = "/entityLog";

    String FILE_ID = "fileId";
    String FILE_ID_PATH_VARIABLE = "/{" + FILE_ID + "}";

    String DOSSIER_ID = "dossierId";
    String DOSSIER_ID_PATH_VARIABLE = "/{" + DOSSIER_ID + "}";

    String FALSE = "false";


    @ResponseBody
    @GetMapping(value = InternalApi.BASE_PATH + ENTITY_LOG_PATH + DOSSIER_ID_PATH_VARIABLE + FILE_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
    EntityLog getEntityLog(@PathVariable(DOSSIER_ID) String dossierId,
                           @PathVariable(FILE_ID) String fileId,
                           @RequestParam(value = "excludedType", required = false, defaultValue = "") List<String> excludedTypes,
                           @RequestParam(value = "includeUnprocessed", required = false, defaultValue = FALSE) boolean includeUnprocessed);

}
