org.keycloak.services.resources.admin

## Class ComponentResource

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

-     public class ComponentResource
      extends Object

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ClientConnection` | `clientConnection`
    `protected javax.ws.rs.core.HttpHeaders` | `headers`
    `protected static org.jboss.logging.Logger` | `logger`
    `protected RealmModel` | `realm`
    `protected KeycloakSession` | `session`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ComponentResource(RealmModel realm, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.ws.rs.core.Response` | `create(ComponentRepresentation rep)`
    `ComponentRepresentation` | `getComponent(String id)`
    `Stream<ComponentRepresentation>` | `getComponents(String parent, String type, String name)`
    `List<ComponentTypeRepresentation>` | `getSubcomponentConfig(String parentId, String subtype)` List of subcomponent types that are available to configure for a particular parent component.
    `void` | `removeComponent(String id)`
    `javax.ws.rs.core.Response` | `updateComponent(String id, ComponentRepresentation 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

    - #### realm

          protected RealmModel realm

    - #### clientConnection

          @Context
          protected ClientConnection clientConnection

    - #### session

          @Context
          protected KeycloakSession session

    - #### headers

          @Context
          protected javax.ws.rs.core.HttpHeaders headers

  - ### Constructor Detail

    - #### ComponentResource

          public ComponentResource(RealmModel realm,
                                   AdminPermissionEvaluator auth,
                                   AdminEventBuilder adminEvent)

  - ### Method Detail

    - #### getComponents

          @GET
           @Produces(value="application/json")
          public Stream<ComponentRepresentation> getComponents(@QueryParam(value="parent")
                                                                                                         String parent,
                                                                                                         @QueryParam(value="type")
                                                                                                         String type,
                                                                                                         @QueryParam(value="name")
                                                                                                         String name)

    - #### create

          @POST
           @Consumes(value="application/json")
          public javax.ws.rs.core.Response create(ComponentRepresentation rep)

    - #### getComponent

          @GET
           @Path(value="{id}")
           @Produces(value="application/json")
          public ComponentRepresentation getComponent(@PathParam(value="id")
                                                                                                                     String id)

    - #### updateComponent

          @PUT
           @Path(value="{id}")
           @Consumes(value="application/json")
          public javax.ws.rs.core.Response updateComponent(@PathParam(value="id")
                                                                                                                          String id,
                                                                                                                          ComponentRepresentation rep)

    - #### removeComponent

          @DELETE
           @Path(value="{id}")
          public void removeComponent(@PathParam(value="id")
                                                                   String id)

    - #### getSubcomponentConfig

          @GET
           @Path(value="{id}/sub-component-types")
           @Produces(value="application/json")
          public List<ComponentTypeRepresentation> getSubcomponentConfig(@PathParam(value="id")
                                                                                                                                                            String parentId,
                                                                                                                                                            @QueryParam(value="type")
                                                                                                                                                            String subtype)

      List of subcomponent types that are available to configure for a particular parent component.
      Parameters:
        `parentId` -
        `subtype` -
      Returns:

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