45 if (!operation.get(OP).asString().equals(ADD)) {
46 throw new OperationFailedException(
"Unexpected operation for add Theme. operation=" + operation.toString());
49 PathAddress address = PathAddress.pathAddress(operation.get(ADDRESS));
50 PathElement last = address.getLastElement();
51 if (!last.getValue().equals(ThemeResourceDefinition.RESOURCE_NAME)) {
52 throw new OperationFailedException(
"Theme resource with name " + last.getValue() +
" not allowed.");
55 for (AttributeDefinition def : ALL_ATTRIBUTES) {
56 def.validateAndSet(operation, model);
59 KeycloakAdapterConfigService.INSTANCE.updateConfig(operation, model);