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 Description protected AdminEventBuilder
adminEvent
protected AdminPermissionEvaluator
auth
protected ProtocolMapperContainerModel
client
protected static org.jboss.logging.Logger
logger
protected AdminPermissionEvaluator.RequirePermissionCheck
managePermission
protected RealmModel
realm
protected KeycloakSession
session
protected AdminPermissionEvaluator.RequirePermissionCheck
viewPermission
-
Constructor Summary
Constructors Constructor Description ProtocolMappersResource(KeycloakSession session, ProtocolMapperContainerModel client, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent, AdminPermissionEvaluator.RequirePermissionCheck managePermission, AdminPermissionEvaluator.RequirePermissionCheck viewPermission)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createMapper(List<ProtocolMapperRepresentation> reps)
Create multiple mappersjavax.ws.rs.core.Response
createMapper(ProtocolMapperRepresentation rep)
Create a mappervoid
delete(String id)
Delete the mapperProtocolMapperRepresentation
getMapperById(String id)
Get mapper by idStream<ProtocolMapperRepresentation>
getMappers()
Get mappersStream<ProtocolMapperRepresentation>
getMappersPerProtocol(String protocol)
Get mappers by name for a specific protocolvoid
update(String id, ProtocolMapperRepresentation rep)
Update the mapper
-
-
-
Field Detail
-
logger
protected static final org.jboss.logging.Logger logger
-
realm
protected final RealmModel realm
-
client
protected final ProtocolMapperContainerModel client
-
auth
protected final AdminPermissionEvaluator auth
-
managePermission
protected final AdminPermissionEvaluator.RequirePermissionCheck managePermission
-
viewPermission
protected final AdminPermissionEvaluator.RequirePermissionCheck viewPermission
-
adminEvent
protected final AdminEventBuilder adminEvent
-
session
protected final KeycloakSession session
-
-
Constructor Detail
-
ProtocolMappersResource
public ProtocolMappersResource(KeycloakSession session, ProtocolMapperContainerModel client, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent, AdminPermissionEvaluator.RequirePermissionCheck managePermission, AdminPermissionEvaluator.RequirePermissionCheck viewPermission)
-
-
Method Detail
-
getMappersPerProtocol
@GET @Path("protocol/{protocol}") @Produces("application/json") public Stream<ProtocolMapperRepresentation> getMappersPerProtocol(@PathParam("protocol") String protocol)
Get mappers by name for a specific protocol- Parameters:
protocol
-- Returns:
-
createMapper
@Path("models") @POST @Consumes("application/json") public javax.ws.rs.core.Response createMapper(ProtocolMapperRepresentation rep)
Create a mapper- Parameters:
rep
-
-
createMapper
@Path("add-models") @POST @Consumes("application/json") public void createMapper(List<ProtocolMapperRepresentation> reps)
Create multiple mappers
-
getMappers
@GET @Path("models") @Produces("application/json") public Stream<ProtocolMapperRepresentation> getMappers()
Get mappers- Returns:
-
getMapperById
@GET @Path("models/{id}") @Produces("application/json") public ProtocolMapperRepresentation getMapperById(@PathParam("id") String id)
Get mapper by id- Parameters:
id
- Mapper id- Returns:
-
update
@PUT @Path("models/{id}") @Consumes("application/json") public void update(@PathParam("id") String id, ProtocolMapperRepresentation rep)
Update the mapper- Parameters:
id
- Mapper idrep
-
-
delete
@DELETE @Path("models/{id}") public void delete(@PathParam("id") String id)
Delete the mapper- Parameters:
id
- Mapper id
-
-