package org.gluu.oxtrust.ws.rs.scim2;

import org.gluu.oxtrust.model.scim2.user.UserResource;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import static org.gluu.oxtrust.model.scim2.Constants.*;

/**
 * Created by jgomer on 2017-09-01.
 *
 * Shared (rest-easy) interface of the SCIM service.
 * Besides SCIM server code, this class is also used by SCIM java client, edit carefully.
 * The class org.gluu.oxtrust.service.scim2.interceptor.UserServiceDecorator uses this interface as well
 */
public interface UserService {

    @Path("/scim/v2/Users")
    @POST
    @Consumes({MEDIA_TYPE_SCIM_JSON, MediaType.APPLICATION_JSON})
    @Produces({MEDIA_TYPE_SCIM_JSON + UTF8_CHARSET_FRAGMENT, MediaType.APPLICATION_JSON + UTF8_CHARSET_FRAGMENT})
    @HeaderParam("Accept") @DefaultValue(MEDIA_TYPE_SCIM_JSON)
    Response createUser(
            UserResource user,
            @QueryParam(QUERY_PARAM_ATTRIBUTES) String attrsList,
            @QueryParam(QUERY_PARAM_EXCLUDED_ATTRS) String excludedAttrsList,
            @HeaderParam("Authorization") String authorization) throws Exception;

    @Path("/scim/v2/Users/{id}")
    @PUT
    @Consumes({MEDIA_TYPE_SCIM_JSON, MediaType.APPLICATION_JSON})
    @Produces({MEDIA_TYPE_SCIM_JSON + UTF8_CHARSET_FRAGMENT, MediaType.APPLICATION_JSON + UTF8_CHARSET_FRAGMENT})
    @HeaderParam("Accept") @DefaultValue(MEDIA_TYPE_SCIM_JSON)
    Response updateUser(
            UserResource user,
            @QueryParam(QUERY_PARAM_ATTRIBUTES) String attrsList,
            @QueryParam(QUERY_PARAM_EXCLUDED_ATTRS) String excludedAttrsList,
            @PathParam("id") String id,
            @HeaderParam("Authorization") String authorization) throws Exception;

    /*
    Response patchUser(String authorization, String id, ScimPatchUser user,final String attributesArray) throws Exception;
    Response deleteUser(String authorization, String id) throws Exception;
    Response getUserById(String authorization, String id, final String attributesArray) throws Exception;
    Response searchUsers(String authorization, final String filterString, final int startIndex, Integer count, final String sortBy, final String sortOrder, final String attributesArray) throws Exception;
    */
}
@@ -1124,24 +1124,536 @@
 Exception;%0A%0A
+    @Path(%22/scim/v2/Users/%7Bid%7D%22)%0A    @GET%0A    @Produces(%7BMEDIA_TYPE_SCIM_JSON + UTF8_CHARSET_FRAGMENT, MediaType.APPLICATION_JSON + UTF8_CHARSET_FRAGMENT%7D)%0A    @HeaderParam(%22Accept%22) @DefaultValue(MEDIA_TYPE_SCIM_JSON)%0A    Response getUserById(%0A            @PathParam(%22id%22) String id,%0A            @QueryParam(QUERY_PARAM_ATTRIBUTES) String attrsList,%0A            @QueryParam(QUERY_PARAM_EXCLUDED_ATTRS) String excludedAttrsList,%0A            @HeaderParam(%22Authorization%22) String authorization) throws Exception;%0A%0A
     @Path(%22/
@@ -1973,32 +1973,72 @@
 rResource user,%0A
+            @PathParam(%22id%22) String id,%0A
             @Que
@@ -2157,32 +2157,362 @@
 ludedAttrsList,%0A
+            @HeaderParam(%22Authorization%22) String authorization) throws Exception;%0A%0A    @Path(%22/scim/v2/Users/%7Bid%7D%22)%0A    @DELETE%0A    @Produces(%7BMEDIA_TYPE_SCIM_JSON + UTF8_CHARSET_FRAGMENT, MediaType.APPLICATION_JSON + UTF8_CHARSET_FRAGMENT%7D)%0A    @HeaderParam(%22Accept%22) @DefaultValue(MEDIA_TYPE_SCIM_JSON)%0A    Response deleteUser(%0A
             @Pat
@@ -2752,83 +2752,8 @@
 on;%0A
-    Response deleteUser(String authorization, String id) throws Exception;%0A
     

Add user by Id to interface