Removed SearchResourceFilters and UserGroupJson
Change-Id: I75779cf68ce0eec54a78cb4f20cd206d2f79ad77
diff --git a/Changes b/Changes
index 8b05de4..00bcacb 100644
--- a/Changes
+++ b/Changes
@@ -9,6 +9,7 @@
- Add new web-service: delete role by query and group (#763)
- Remove soft delete group and group status deleted (#765)
- Remove soft delete group member and member status deleted (#765)
+- Removed SearchResourceFilters and UserGroupJson
# version 0.74
diff --git a/src/main/java/de/ids_mannheim/korap/web/input/UserGroupJson.java b/src/main/java/de/ids_mannheim/korap/web/input/UserGroupJson.java
deleted file mode 100644
index 0cc4922..0000000
--- a/src/main/java/de/ids_mannheim/korap/web/input/UserGroupJson.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package de.ids_mannheim.korap.web.input;
-
-import de.ids_mannheim.korap.web.controller.UserGroupController;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * Java POJO of JSON input used in the user group controller for
- * creating user group and managing group members.
- *
- * @author margaretha
- * @see UserGroupController
- */
-@Deprecated
-@Getter
-@Setter
-public class UserGroupJson {
-
- private int id;
- private String name;
- private String[] members;
-}
diff --git a/src/main/java/de/ids_mannheim/korap/web/utils/SearchResourceFilters.java b/src/main/java/de/ids_mannheim/korap/web/utils/SearchResourceFilters.java
deleted file mode 100644
index 249793b..0000000
--- a/src/main/java/de/ids_mannheim/korap/web/utils/SearchResourceFilters.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package de.ids_mannheim.korap.web.utils;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Defines the list of
- * {@link jakarta.ws.rs.container.ContainerRequestFilter}
- * and {@link jakarta.ws.rs.container.ContainerResponseFilter}
- * classes associated with a resource method.
- * <p>
- * This annotation can be specified on a class or on method(s).
- * Specifying it
- * at a class level means that it applies to all the methods in the
- * class.
- * Specifying it on a method means that it is applicable to that
- * method only.
- * If applied at both the class and methods level , the method value
- * overrides
- * the class value.
- */
-@Deprecated
-@Target({ ElementType.TYPE, ElementType.METHOD })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface SearchResourceFilters {}
diff --git a/src/main/java/de/ids_mannheim/korap/web/utils/SearchResourceFiltersFeature.java b/src/main/java/de/ids_mannheim/korap/web/utils/SearchResourceFiltersFeature.java
deleted file mode 100644
index 341817e..0000000
--- a/src/main/java/de/ids_mannheim/korap/web/utils/SearchResourceFiltersFeature.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package de.ids_mannheim.korap.web.utils;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.glassfish.jersey.model.internal.CommonConfig;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-import de.ids_mannheim.korap.web.filter.APIVersionFilter;
-import jakarta.ws.rs.container.DynamicFeature;
-import jakarta.ws.rs.container.ResourceInfo;
-import jakarta.ws.rs.core.FeatureContext;
-import jakarta.ws.rs.ext.Provider;
-
-/**
- * Registers {@link jakarta.ws.rs.container.ContainerRequestFilter}
- * and {@link jakarta.ws.rs.container.ContainerResponseFilter}
- * classes for a resource method annotated with
- * {@link ResourceFilters}.
- */
-@Deprecated
-@Provider
-@Component
-public class SearchResourceFiltersFeature implements DynamicFeature {
-
- @Value("${search.resource.filters:AuthenticationFilter,DemoUserFilter}")
- private String[] resourceFilters;
-
- @Override
- public void configure (ResourceInfo resourceInfo, FeatureContext context) {
- SearchResourceFilters filters = resourceInfo.getResourceMethod()
- .getAnnotation(SearchResourceFilters.class);
- if (filters != null) {
- CommonConfig con = (CommonConfig) context.getConfiguration();
- con.getComponentBag().clear();
- }
- else {
- filters = resourceInfo.getResourceClass()
- .getAnnotation(SearchResourceFilters.class);
- }
-
- if (filters != null) {
- List<?> list = Arrays.asList(resourceFilters);
- if (!list.contains("APIVersionFilter")) {
- context.register(APIVersionFilter.class);
- }
-
- for (String c : resourceFilters) {
- try {
- context.register(Class
- .forName("de.ids_mannheim.korap.web.filter." + c));
- }
- catch (ClassNotFoundException e) {
- e.printStackTrace();
- }
- }
- }
- }
-}