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 RealmAuth` | `auth`
    `protected ClientModel` | `client`
    `protected static org.jboss.logging.Logger` | `logger`
    `protected KeycloakSession` | `session`
    `protected javax.ws.rs.core.UriInfo` | `uriInfo`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProtocolMappersResource(ClientModel client, RealmAuth auth)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `createMapper(List<ProtocolMapperRepresentation> reps)` creates multiple mapper
    `javax.ws.rs.core.Response` | `createMapper(ProtocolMapperRepresentation rep)` creates mapper
    `void` | `delete(String id)`
    `ProtocolMapperRepresentation` | `getMapperById(String id)`
    `List<ProtocolMapperRepresentation>` | `getMappers()`
    `List<ProtocolMapperRepresentation>` | `getMappersPerProtocol(String protocol)` Map of mappers by name for a specific protocol
    `void` | `update(String id, ProtocolMapperRepresentation rep)`

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

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

- - ### Field Detail

    - #### logger

          protected static final org.jboss.logging.Logger logger

    - #### client

          protected ClientModel client

    - #### auth

          protected RealmAuth auth

    - #### uriInfo

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

    - #### session

          @Context
          protected KeycloakSession session

  - ### Constructor Detail

    - #### ProtocolMappersResource

          public ProtocolMappersResource(ClientModel client,
                                 RealmAuth auth)

  - ### Method Detail

    - #### getMappersPerProtocol

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

      Map of 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)

      creates mapper
      Parameters:
        `rep` -

    - #### createMapper

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

      creates multiple mapper

    - #### getMappers

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

    - #### getMapperById

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

    - #### update

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

    - #### delete

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

Copyright © 2015. All rights reserved.