Remove Provider annotation along with default constructors from org resources

Closes #34335

Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
This commit is contained in:
Stefan Guilhen 2024-11-01 12:52:50 -03:00 committed by Pedro Igor
parent 9a7cfb38ac
commit 2e51775acc
4 changed files with 0 additions and 30 deletions

View file

@ -48,7 +48,6 @@ import org.keycloak.services.ErrorResponse;
import org.keycloak.services.resources.KeycloakOpenAPI; import org.keycloak.services.resources.KeycloakOpenAPI;
import org.keycloak.services.resources.admin.AdminEventBuilder; import org.keycloak.services.resources.admin.AdminEventBuilder;
@Provider
@Extension(name = KeycloakOpenAPI.Profiles.ADMIN, value = "") @Extension(name = KeycloakOpenAPI.Profiles.ADMIN, value = "")
public class OrganizationIdentityProvidersResource { public class OrganizationIdentityProvidersResource {
@ -57,11 +56,6 @@ public class OrganizationIdentityProvidersResource {
private final OrganizationProvider organizationProvider; private final OrganizationProvider organizationProvider;
private final OrganizationModel organization; private final OrganizationModel organization;
public OrganizationIdentityProvidersResource() {
// needed for registering to the JAX-RS stack
this(null, null, null);
}
public OrganizationIdentityProvidersResource(KeycloakSession session, OrganizationModel organization, AdminEventBuilder adminEvent) { public OrganizationIdentityProvidersResource(KeycloakSession session, OrganizationModel organization, AdminEventBuilder adminEvent) {
this.realm = session == null ? null : session.getContext().getRealm(); this.realm = session == null ? null : session.getContext().getRealm();
this.session = session; this.session = session;

View file

@ -33,7 +33,6 @@ import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.Response.Status; import jakarta.ws.rs.core.Response.Status;
import jakarta.ws.rs.ext.Provider;
import org.eclipse.microprofile.openapi.annotations.Operation; import org.eclipse.microprofile.openapi.annotations.Operation;
import org.eclipse.microprofile.openapi.annotations.extensions.Extension; import org.eclipse.microprofile.openapi.annotations.extensions.Extension;
@ -58,7 +57,6 @@ import org.keycloak.services.resources.KeycloakOpenAPI;
import org.keycloak.services.resources.admin.AdminEventBuilder; import org.keycloak.services.resources.admin.AdminEventBuilder;
import org.keycloak.utils.StringUtil; import org.keycloak.utils.StringUtil;
@Provider
@Extension(name = KeycloakOpenAPI.Profiles.ADMIN, value = "") @Extension(name = KeycloakOpenAPI.Profiles.ADMIN, value = "")
public class OrganizationMemberResource { public class OrganizationMemberResource {
@ -68,14 +66,6 @@ public class OrganizationMemberResource {
private final OrganizationModel organization; private final OrganizationModel organization;
private final AdminEventBuilder adminEvent; private final AdminEventBuilder adminEvent;
public OrganizationMemberResource() {
this.session = null;
this.realm = null;
this.provider = null;
this.organization = null;
this.adminEvent = null;
}
public OrganizationMemberResource(KeycloakSession session, OrganizationModel organization, AdminEventBuilder adminEvent) { public OrganizationMemberResource(KeycloakSession session, OrganizationModel organization, AdminEventBuilder adminEvent) {
this.session = session; this.session = session;
this.realm = session.getContext().getRealm(); this.realm = session.getContext().getRealm();

View file

@ -26,7 +26,6 @@ import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.Response.Status; import jakarta.ws.rs.core.Response.Status;
import jakarta.ws.rs.ext.Provider;
import org.eclipse.microprofile.openapi.annotations.Operation; import org.eclipse.microprofile.openapi.annotations.Operation;
import org.eclipse.microprofile.openapi.annotations.extensions.Extension; import org.eclipse.microprofile.openapi.annotations.extensions.Extension;
import org.eclipse.microprofile.openapi.annotations.tags.Tag; import org.eclipse.microprofile.openapi.annotations.tags.Tag;
@ -46,7 +45,6 @@ import org.keycloak.services.ErrorResponse;
import org.keycloak.services.resources.KeycloakOpenAPI; import org.keycloak.services.resources.KeycloakOpenAPI;
import org.keycloak.services.resources.admin.AdminEventBuilder; import org.keycloak.services.resources.admin.AdminEventBuilder;
@Provider
@Extension(name = KeycloakOpenAPI.Profiles.ADMIN, value = "") @Extension(name = KeycloakOpenAPI.Profiles.ADMIN, value = "")
public class OrganizationResource { public class OrganizationResource {
@ -55,11 +53,6 @@ public class OrganizationResource {
private final AdminEventBuilder adminEvent; private final AdminEventBuilder adminEvent;
private final OrganizationModel organization; private final OrganizationModel organization;
public OrganizationResource() {
// needed for registering to the JAX-RS stack
this(null, null, null);
}
public OrganizationResource(KeycloakSession session, OrganizationModel organization, AdminEventBuilder adminEvent) { public OrganizationResource(KeycloakSession session, OrganizationModel organization, AdminEventBuilder adminEvent) {
this.session = session; this.session = session;
this.provider = session == null ? null : session.getProvider(OrganizationProvider.class); this.provider = session == null ? null : session.getProvider(OrganizationProvider.class);

View file

@ -32,7 +32,6 @@ import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.Response.Status; import jakarta.ws.rs.core.Response.Status;
import jakarta.ws.rs.ext.Provider;
import org.eclipse.microprofile.openapi.annotations.Operation; import org.eclipse.microprofile.openapi.annotations.Operation;
import org.eclipse.microprofile.openapi.annotations.extensions.Extension; import org.eclipse.microprofile.openapi.annotations.extensions.Extension;
import org.eclipse.microprofile.openapi.annotations.parameters.Parameter; import org.eclipse.microprofile.openapi.annotations.parameters.Parameter;
@ -60,7 +59,6 @@ import org.keycloak.utils.ReservedCharValidator;
import org.keycloak.utils.SearchQueryUtils; import org.keycloak.utils.SearchQueryUtils;
import org.keycloak.utils.StringUtil; import org.keycloak.utils.StringUtil;
@Provider
@Extension(name = KeycloakOpenAPI.Profiles.ADMIN, value = "") @Extension(name = KeycloakOpenAPI.Profiles.ADMIN, value = "")
public class OrganizationsResource { public class OrganizationsResource {
@ -71,11 +69,6 @@ public class OrganizationsResource {
private static final Logger logger = Logger.getLogger(OrganizationsResource.class); private static final Logger logger = Logger.getLogger(OrganizationsResource.class);
public OrganizationsResource() {
// needed for registering to the JAX-RS stack
this(null, null, null);
}
public OrganizationsResource(KeycloakSession session, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent) { public OrganizationsResource(KeycloakSession session, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent) {
this.session = session; this.session = session;
this.provider = session == null ? null : session.getProvider(OrganizationProvider.class); this.provider = session == null ? null : session.getProvider(OrganizationProvider.class);