removing the usage of MultivaluedStringStringHashMap and ComponentExport

map

upstream improvements make this no longer necessary

Closes #20937
This commit is contained in:
Steve Hawkins 2023-06-14 11:07:18 -04:00 committed by Bruno Oliveira da Silva
parent 0dd7c4a515
commit 14747f45ca
4 changed files with 0 additions and 56 deletions

View file

@ -26,9 +26,7 @@ import io.sundr.builder.annotations.BuildableReference;
import io.quarkiverse.operatorsdk.bundle.runtime.CSVMetadata; import io.quarkiverse.operatorsdk.bundle.runtime.CSVMetadata;
import org.keycloak.operator.Constants; import org.keycloak.operator.Constants;
import org.keycloak.representations.idm.ComponentExportRepresentation; import org.keycloak.representations.idm.ComponentExportRepresentation;
import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.representations.idm.GroupRepresentation; import org.keycloak.representations.idm.GroupRepresentation;
import org.keycloak.representations.idm.RealmRepresentation;
import org.keycloak.representations.idm.authorization.ScopeRepresentation; import org.keycloak.representations.idm.authorization.ScopeRepresentation;
@CSVMetadata( @CSVMetadata(
@ -44,10 +42,7 @@ import org.keycloak.representations.idm.authorization.ScopeRepresentation;
@BuildableReference(KeycloakRealmImportSpec.class) @BuildableReference(KeycloakRealmImportSpec.class)
}) })
@SchemaSwap(originalType = GroupRepresentation.class, fieldName = "subGroups", targetType = org.keycloak.representations.overrides.NoSubGroupsGroupRepresentationList.class) @SchemaSwap(originalType = GroupRepresentation.class, fieldName = "subGroups", targetType = org.keycloak.representations.overrides.NoSubGroupsGroupRepresentationList.class)
@SchemaSwap(originalType = RealmRepresentation.class, fieldName = "components", targetType = org.keycloak.representations.overrides.ComponentExportRepresentationMap.class)
@SchemaSwap(originalType = CredentialRepresentation.class, fieldName = "config", targetType = org.keycloak.representations.overrides.MultivaluedStringStringHashMap.class)
@SchemaSwap(originalType = ComponentExportRepresentation.class, fieldName = "subComponents", targetType = org.keycloak.representations.overrides.NoSubcomponentsComponentExportRepresentationMap.class) @SchemaSwap(originalType = ComponentExportRepresentation.class, fieldName = "subComponents", targetType = org.keycloak.representations.overrides.NoSubcomponentsComponentExportRepresentationMap.class)
@SchemaSwap(originalType = ComponentExportRepresentation.class, fieldName = "config", targetType = org.keycloak.representations.overrides.MultivaluedStringStringHashMap.class)
@SchemaSwap(originalType = ScopeRepresentation.class, fieldName = "policies") @SchemaSwap(originalType = ScopeRepresentation.class, fieldName = "policies")
@SchemaSwap(originalType = ScopeRepresentation.class, fieldName = "resources") @SchemaSwap(originalType = ScopeRepresentation.class, fieldName = "resources")
public class KeycloakRealmImport extends CustomResource<KeycloakRealmImportSpec, KeycloakRealmImportStatus> implements Namespaced { public class KeycloakRealmImport extends CustomResource<KeycloakRealmImportSpec, KeycloakRealmImportStatus> implements Namespaced {

View file

@ -1,25 +0,0 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.representations.overrides;
import java.util.HashMap;
import java.util.List;
import org.keycloak.representations.idm.ComponentExportRepresentation;
public class ComponentExportRepresentationMap extends HashMap<String, List<ComponentExportRepresentation>> {
}

View file

@ -1,24 +0,0 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.representations.overrides;
import java.util.HashMap;
import java.util.List;
public class MultivaluedStringStringHashMap extends HashMap<String, List<String>> {
}

View file

@ -18,7 +18,6 @@
package org.keycloak.representations.overrides; package org.keycloak.representations.overrides;
import org.keycloak.common.util.MultivaluedHashMap; import org.keycloak.common.util.MultivaluedHashMap;
import io.fabric8.crd.generator.annotation.SchemaFrom;
public class NoSubcomponentsComponentExportRepresentation { public class NoSubcomponentsComponentExportRepresentation {
@ -28,7 +27,6 @@ public class NoSubcomponentsComponentExportRepresentation {
private String subType; private String subType;
// TODO: eventually generate code for Nth levels of depth // TODO: eventually generate code for Nth levels of depth
// private MultivaluedHashMap<String, ComponentExportRepresentation> subComponents = new MultivaluedHashMap<>(); // private MultivaluedHashMap<String, ComponentExportRepresentation> subComponents = new MultivaluedHashMap<>();
@SchemaFrom(type = org.keycloak.representations.overrides.MultivaluedStringStringHashMap.class)
private MultivaluedHashMap<String, String> config = new MultivaluedHashMap<>(); private MultivaluedHashMap<String, String> config = new MultivaluedHashMap<>();
public String getId() { public String getId() {