/*
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Interface.java to edit this template
|
*/
|
package com.megatim.fdxconsultation.service.ifaces.abstracts;
|
|
import com.mgt.rs.security.core.common.Secured;
|
import javax.validation.Valid;
|
import javax.ws.rs.Consumes;
|
import javax.ws.rs.POST;
|
import javax.ws.rs.Path;
|
import javax.ws.rs.PathParam;
|
import javax.ws.rs.Produces;
|
import javax.ws.rs.core.Context;
|
import javax.ws.rs.core.HttpHeaders;
|
import javax.ws.rs.core.MediaType;
|
import javax.ws.rs.core.Response;
|
|
/**
|
*
|
* @author ASUS
|
*/
|
public interface AbstractCUDWithCriteriaEntityIFaces<T, K, ID> {
|
|
@POST
|
@Consumes({MediaType.APPLICATION_JSON})
|
@Produces({MediaType.APPLICATION_JSON})
|
@Path("add")
|
@Secured(action = "ajouter", enable = true)
|
public Response save(@Context HttpHeaders headers, @Valid T entity);
|
|
@POST
|
@Produces({MediaType.APPLICATION_JSON})
|
@Consumes({MediaType.APPLICATION_JSON})
|
@Path("update/{id}")
|
@Secured(action = "modifier", enable = true)
|
public Response update(@Context HttpHeaders headers, @PathParam("id") Long id, @Valid T entity);
|
|
@POST
|
@Produces({MediaType.APPLICATION_JSON})
|
@Path("delete/{id}")
|
@Secured(action = "ajouter", enable = true)
|
public Response delete(@Context HttpHeaders headers, @PathParam("id") Long id);
|
|
}
|