class ChannelTypeResource implements RESTResource {

    @GET
    @Path("/{channelTypeUID}/linkableItemTypes")
    @Produces(MediaType.APPLICATION_JSON)
    @Operation(summary = "Gets the item types the given trigger channel type UID can be linked to.", responses = {
            @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class), uniqueItems = true))),
            @ApiResponse(responseCode = "204", description = "No content: channel type has no linkable items or is no trigger channel."),
            @ApiResponse(responseCode = "404", description = "Given channel type UID not found.") })
    public Response getLinkableItemTypes(
            @PathParam("channelTypeUID") @Parameter(description = "channelTypeUID") String channelTypeUID) {
        ChannelTypeUID ctUID = new ChannelTypeUID(channelTypeUID);
        ChannelType channelType = channelTypeRegistry.getChannelType(ctUID);
        if (channelType == null) {
            return Response.status(Status.NOT_FOUND).build();
        }
        if (channelType.getKind() != ChannelKind.TRIGGER) {
            return Response.noContent().build();
        }

        Set<String> result = new HashSet<>();
        for (ProfileType profileType : profileTypeRegistry.getProfileTypes()) {
            if (profileType instanceof TriggerProfileType) {
                if (((TriggerProfileType) profileType).getSupportedChannelTypeUIDs().contains(ctUID)) {
                    for (String itemType : profileType.getSupportedItemTypes()) {
                        result.add(itemType);
                    }
                }
            }
        }
        if (result.isEmpty()) {
            return Response.noContent().build();
        }

        return Response.ok(result).build();
    }

    @Activate public  ChannelTypeResource( //
            final @Reference ChannelTypeRegistry channelTypeRegistry,
            final @Reference ConfigDescriptionRegistry configDescriptionRegistry,
            final @Reference LocaleService localeService, //
            final @Reference ProfileTypeRegistry profileTypeRegistry);

}