org.keycloak.services.resources.admin

## Class ProtocolMappersResource

- java.lang.Object
- - org.keycloak.services.resources.admin.ProtocolMappersResource

-     public class ProtocolMappersResource
      extends Object

  Base resource for managing users
  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected AdminEventBuilder` | `adminEvent`
    `protected RealmAuth` | `auth`
    `protected ProtocolMapperContainerModel` | `client`
    `protected static ServicesLogger` | `logger`
    `protected KeycloakSession` | `session`
    `protected javax.ws.rs.core.UriInfo` | `uriInfo`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProtocolMappersResource(ProtocolMapperContainerModel client, RealmAuth auth, AdminEventBuilder adminEvent)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `createMapper(List<ProtocolMapperRepresentation> reps)` Create multiple mappers
    `javax.ws.rs.core.Response` | `createMapper(ProtocolMapperRepresentation rep)` Create a mapper
    `void` | `delete(String id)` Delete the mapper
    `ProtocolMapperRepresentation` | `getMapperById(String id)` Get mapper by id
    `List<ProtocolMapperRepresentation>` | `getMappers()` Get mappers
    `List<ProtocolMapperRepresentation>` | `getMappersPerProtocol(String protocol)` Get mappers by name for a specific protocol
    `void` | `update(String id, ProtocolMapperRepresentation rep)` Update the mapper

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### logger

          protected static final ServicesLogger logger

    - #### client

          protected ProtocolMapperContainerModel client

    - #### auth

          protected RealmAuth auth

    - #### adminEvent

          protected AdminEventBuilder adminEvent

    - #### uriInfo

          @Context
          protected javax.ws.rs.core.UriInfo uriInfo

    - #### session

          @Context
          protected KeycloakSession session

  - ### Constructor Detail

    - #### ProtocolMappersResource

          public ProtocolMappersResource(ProtocolMapperContainerModel client,
                                         RealmAuth auth,
                                         AdminEventBuilder adminEvent)

  - ### Method Detail

    - #### getMappersPerProtocol

          @GET
           @Path(value="protocol/{protocol}")
           @Produces(value="application/json")
          public List<ProtocolMapperRepresentation> getMappersPerProtocol(@PathParam(value="protocol")
                                                                                                                                                        String protocol)

      Get mappers by name for a specific protocol
      Parameters:
        `protocol` -
      Returns:

    - #### createMapper

          @Path(value="models")
           @POST
           @Consumes(value="application/json")
          public javax.ws.rs.core.Response createMapper(ProtocolMapperRepresentation rep)

      Create a mapper
      Parameters:
        `rep` -

    - #### createMapper

          @Path(value="add-models")
           @POST
           @Consumes(value="application/json")
          public void createMapper(List<ProtocolMapperRepresentation> reps)

      Create multiple mappers

    - #### getMappers

          @GET
           @Path(value="models")
           @Produces(value="application/json")
          public List<ProtocolMapperRepresentation> getMappers()

      Get mappers
      Returns:

    - #### getMapperById

          @GET
           @Path(value="models/{id}")
           @Produces(value="application/json")
          public ProtocolMapperRepresentation getMapperById(@PathParam(value="id")
                                                                                                                                  String id)

      Get mapper by id
      Parameters:
        `id` - Mapper id
      Returns:

    - #### update

          @PUT
           @Path(value="models/{id}")
           @Consumes(value="application/json")
          public void update(@PathParam(value="id")
                                                                                                   String id,
                                                                                                   ProtocolMapperRepresentation rep)

      Update the mapper
      Parameters:
        `id` - Mapper id
        `rep` -

    - #### delete

          @DELETE
           @Path(value="models/{id}")
          public void delete(@PathParam(value="id")
                                                                 String id)

      Delete the mapper
      Parameters:
        `id` - Mapper id

Copyright © 2016 JBoss by Red Hat. All rights reserved.