Class ServiceContractRestService
- java.lang.Object
-
- fr.paris.lutece.plugins.identitystore.v3.web.rs.ServiceContractRestService
-
@Path("/rest/identitystore/v3") public class ServiceContractRestService extends ObjectServiceContractRest
-
-
Constructor Summary
Constructors Constructor Description ServiceContractRestService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponsecloseServiceContract(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.contract.ServiceContractDto serviceContract, Integer serviceContractId, String clientCode, String authorName, String authorType, String strHeaderAppCode)Closes a service contract by specifying an end date.
The service contract is updated from the providedServiceContractDto.javax.ws.rs.core.ResponsecreateServiceContract(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.contract.ServiceContractDto serviceContract, String clientCode, String authorName, String authorType, String strHeaderAppCode)Creates a service contract.
The service contract is created from the providedServiceContractDto.javax.ws.rs.core.ResponsegetActiveServiceContract(String strTargetClientCode, String headerClientCode, String authorName, String authorType, String strHeaderAppCode)Get ServiceContractjavax.ws.rs.core.ResponsegetAllServiceContractList(String clientCode, String authorName, String authorType, String strHeaderAppCode)Get ServiceContract Listjavax.ws.rs.core.ResponsegetServiceContract(String clientCode, String authorName, String authorType, Integer serviceContractId, String strHeaderAppCode)Get ServiceContractjavax.ws.rs.core.ResponsegetServiceContractList(String strTargetClientCode, String headerClientCode, String authorName, String authorType, String strHeaderAppCode)Get ServiceContract Listjavax.ws.rs.core.ResponseupdateServiceContract(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.contract.ServiceContractDto serviceContract, Integer serviceContractId, String clientCode, String authorName, String authorType, String strHeaderAppCode)Updates a service contract.
The service contract is updated from the providedServiceContractDto.
-
-
-
Method Detail
-
getAllServiceContractList
@Path("/contracts") @GET @Produces("application/json") public javax.ws.rs.core.Response getAllServiceContractList(@HeaderParam("client_code") String clientCode, @HeaderParam("author_name") String authorName, @HeaderParam("author_type") String authorType, @HeaderParam("application_code") @DefaultValue("") String strHeaderAppCode) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionGet ServiceContract List- Parameters:
clientCode- client code- Returns:
- the ServiceContract
- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
getServiceContractList
@Path("/contracts/list/{target_client_code}") @GET @Produces("application/json") public javax.ws.rs.core.Response getServiceContractList(@PathParam("target_client_code") String strTargetClientCode, @HeaderParam("client_code") String headerClientCode, @HeaderParam("author_name") String authorName, @HeaderParam("author_type") String authorType, @HeaderParam("application_code") @DefaultValue("") String strHeaderAppCode) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionGet ServiceContract List- Parameters:
headerClientCode- client code- Returns:
- the ServiceContract
- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
getActiveServiceContract
@Path("/contract/active/{target_client_code}") @GET @Produces("application/json") public javax.ws.rs.core.Response getActiveServiceContract(@PathParam("target_client_code") String strTargetClientCode, @HeaderParam("client_code") String headerClientCode, @HeaderParam("author_name") String authorName, @HeaderParam("author_type") String authorType, @HeaderParam("application_code") @DefaultValue("") String strHeaderAppCode) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionGet ServiceContract- Parameters:
headerClientCode- client code- Returns:
- the ServiceContract
- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
getServiceContract
@Path("/contracts/{service_contract_id}") @GET @Produces("application/json") public javax.ws.rs.core.Response getServiceContract(@HeaderParam("client_code") String clientCode, @HeaderParam("author_name") String authorName, @HeaderParam("author_type") String authorType, @PathParam("service_contract_id") Integer serviceContractId, @HeaderParam("application_code") @DefaultValue("") String strHeaderAppCode) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionGet ServiceContract- Parameters:
clientCode- client codeserviceContractId- service contract ID- Returns:
- the ServiceContract
- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
createServiceContract
@Path("/contracts") @POST @Consumes("application/json") public javax.ws.rs.core.Response createServiceContract(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.contract.ServiceContractDto serviceContract, @HeaderParam("client_code") String clientCode, @HeaderParam("author_name") String authorName, @HeaderParam("author_type") String authorType, @HeaderParam("application_code") @DefaultValue("") String strHeaderAppCode) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionCreates a service contract.
The service contract is created from the providedServiceContractDto.- Parameters:
serviceContract- the service contract to createclientCode- the application code in the HTTP header- Returns:
- http 200 if creation is ok with
ServiceContractChangeResponse - Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
updateServiceContract
@PUT @Path("/contracts/{service_contract_id}") @Consumes("application/json") public javax.ws.rs.core.Response updateServiceContract(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.contract.ServiceContractDto serviceContract, @PathParam("service_contract_id") Integer serviceContractId, @HeaderParam("client_code") String clientCode, @HeaderParam("author_name") String authorName, @HeaderParam("author_type") String authorType, @HeaderParam("application_code") @DefaultValue("") String strHeaderAppCode) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionUpdates a service contract.
The service contract is updated from the providedServiceContractDto.- Parameters:
serviceContract- the service contract to updateserviceContractId- the service contract IDclientCode- the application code in the HTTP header- Returns:
- http 200 if creation is ok with
ServiceContractChangeResponse - Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
closeServiceContract
@PUT @Path("/contracts/{service_contract_id}/enddate") @Consumes("application/json") public javax.ws.rs.core.Response closeServiceContract(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.contract.ServiceContractDto serviceContract, @PathParam("service_contract_id") Integer serviceContractId, @HeaderParam("client_code") String clientCode, @HeaderParam("author_name") String authorName, @HeaderParam("author_type") String authorType, @HeaderParam("application_code") @DefaultValue("") String strHeaderAppCode) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionCloses a service contract by specifying an end date.
The service contract is updated from the providedServiceContractDto.- Parameters:
serviceContract- the service contract to updateserviceContractId- the service contract IDclientCode- the application code in the HTTP header- Returns:
- http 200 if creation is ok with
ServiceContractChangeResponse - Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
-