Interface ClientSideGroupService

  • All Superinterfaces:
    CloseableClient, IGroupWebService
    All Known Subinterfaces:
    ClientSideService

    public interface ClientSideGroupService
    extends IGroupWebService, CloseableClient
    An interface that exhibits operations to manipulate Group SCIM resources.

    Notes:

    The parameters attrsList and excludedAttrsList found in methods of this interface are aimed at specifying the "attributes" and "excludedAttributes" query params regarded in section 3.9 of SCIM spec protocol document (RFC 7644).

    Every SCIM service operation that returns resources (e.g Users, Groups, etc.) offers the possibility to specify which attributes can be included for every resource part of the response. The default behavior is returning those attributes that according to the resource Schema have returnability = "always" in addition to those with returnability = "default".

    attrsList is used to override the default attribute set, so when supplying a not-null or not empty String, the attributes included in the resource(s) of the response will be those with returnability = "always" as well as those specified by attrsList.

    This parameter consists of a comma-separated list of attribute names. An example of a valid value for attrsList when the resource of interest is User, could be: userName, active, name.familyName, addresses, emails.value, emails.type, urn:ietf:params:scim:schemas:extension:gluu:2.0:User:myCustomAttribute

    Note that attributes marked with returnability = "never" (such as a User password) will always be filtered out from the output, so including such attributes in attrsList has no effect.

    excludedAttrsList is used to specify the set of attributes that should be excluded from the default attribute set. In this sense, the resources found in the response will include the attributes whose returnability = "always" in addition to those with returnability = "default" except for those included in excludedAttrsList. As with attrsList, this parameter must be in the form of a comma-separated list of attribute names.

    attrsList and excludedAttrsList are mutually exclusive: if both are provided only attrsList will be taken into account to compute the output attribute set.

    • Method Detail

      • createGroup

        @Path("/scim/v2/Groups")
        @POST
        @Consumes({"application/scim+json","application/json"})
        @Produces({"application/scim+json; charset=utf-8","application/json; charset=utf-8"})
        @HeaderParam("Accept")
        @DefaultValue("application/scim+json")
        javax.ws.rs.core.Response createGroup​(String jsonGroup,
                                              @QueryParam("attributes")
                                              String attrsList,
                                              @QueryParam("excludedAttributes")
                                              String excludedAttrsList)
        Invokes a service method that allows creating a Group resource via POST (as per section 3.3 of RFC 7644).
        Parameters:
        jsonGroup - A String with the payload for the operation. It represents the Group resource to create
        attrsList - See notes about attributes query param
        excludedAttrsList - See notes about excludedAttributes query param
        Returns:
        An object abstracting the response obtained from the server to this request. A succesful response for this operation should contain a status code of 201 (created) and a GroupResource in the entity body (the resource just created)
      • updateGroup

        @Path("/scim/v2/Groups/{id}")
        @PUT
        @Consumes({"application/scim+json","application/json"})
        @Produces({"application/scim+json; charset=utf-8","application/json; charset=utf-8"})
        @HeaderParam("Accept")
        @DefaultValue("application/scim+json")
        javax.ws.rs.core.Response updateGroup​(String jsonGroup,
                                              @PathParam("id")
                                              String id,
                                              @QueryParam("attributes")
                                              String attrsList,
                                              @QueryParam("excludedAttributes")
                                              String excludedAttrsList)
        Invokes a service method that allows updating a Group resource via PUT (as per section 3.5.1 of RFC 7644).

        This operation is not suitable to delete/remove/nullify attributes. For this purpose you can use the PATCH operation instead. PUT is intended to do replacements using the (not-null) values supplied in fidoDeviceResource parameter.

        To learn more about how the update works, read the replacement rules found at method org.gluu.oxtrust.model.scim2.util.ScimResourceUtil#transferToResourceReplace.

        Parameters:
        jsonGroup - A String with the payload for the operation. It represents an object that contains the data to update on a destination resource. There is no need to supply a full resource, just provide one with the attributes which are intended to be replaced in the destination.
        id - The "id" attribute of the resource to update (destination)
        attrsList - See notes about attributes query param
        excludedAttrsList - See notes about excludedAttributes query param
        Returns:
        An object abstracting the response obtained from the server to this request. A succesful response for this operation should contain a status code of 200 and a GroupResource in the entity body (the resource after the update took place)
      • patchGroup

        @Path("/scim/v2/Groups/{id}")
        @Consumes({"application/scim+json","application/json"})
        @Produces({"application/scim+json; charset=utf-8","application/json; charset=utf-8"})
        @HeaderParam("Accept")
        @DefaultValue("application/scim+json")
        javax.ws.rs.core.Response patchGroup​(String jsonPatch,
                                             @PathParam("id")
                                             String id,
                                             @QueryParam("attributes")
                                             String attrsList,
                                             @QueryParam("excludedAttributes")
                                             String excludedAttrsList)
        Invokes a service method that allows to modify a Group resource via PATCH (see section 3.5.2 of RFC 7644).

        Note that patching offers a fine-grained control over the attributes to modify. While PUT is more intended to replace attribute values, PATCH allows to perform localized updates, removals and additions in certain portions of the target resource.

        Parameters:
        jsonPatch - A String with the payload for the operation. It represents a PatchRequest that contains the operations to apply upon the resource being updated
        id - The id of the resource to update
        attrsList - See notes about attributes query param
        excludedAttrsList - See notes about excludedAttributes query param
        Returns:
        An object abstracting the response obtained from the server to this request. A succesful response for this operation should contain a status code of 200 and a GroupResource in the entity body (the resource after modifications took place)