Remove Piwik filter
Change-Id: Iaaf7a1ecfb0fa7240c6d68a58bb6d977509b3e7d
diff --git a/src/main/java/de/ids_mannheim/korap/core/web/controller/AnnotationController.java b/src/main/java/de/ids_mannheim/korap/core/web/controller/AnnotationController.java
index 1f75d3c..ae60dca 100644
--- a/src/main/java/de/ids_mannheim/korap/core/web/controller/AnnotationController.java
+++ b/src/main/java/de/ids_mannheim/korap/core/web/controller/AnnotationController.java
@@ -17,7 +17,6 @@
import de.ids_mannheim.korap.web.KustvaktResponseHandler;
import de.ids_mannheim.korap.web.filter.APIVersionFilter;
import de.ids_mannheim.korap.web.filter.DemoUserFilter;
-import de.ids_mannheim.korap.web.filter.PiwikFilter;
import de.ids_mannheim.korap.web.utils.ResourceFilters;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.GET;
@@ -34,8 +33,7 @@
*/
@Controller
@Path("/{version}/annotation/")
-@ResourceFilters({ APIVersionFilter.class, DemoUserFilter.class,
- PiwikFilter.class })
+@ResourceFilters({ APIVersionFilter.class, DemoUserFilter.class})
@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
public class AnnotationController {
diff --git a/src/main/java/de/ids_mannheim/korap/core/web/controller/SearchController.java b/src/main/java/de/ids_mannheim/korap/core/web/controller/SearchController.java
index 042f412..e78993d 100644
--- a/src/main/java/de/ids_mannheim/korap/core/web/controller/SearchController.java
+++ b/src/main/java/de/ids_mannheim/korap/core/web/controller/SearchController.java
@@ -27,7 +27,6 @@
import de.ids_mannheim.korap.web.filter.AdminFilter;
import de.ids_mannheim.korap.web.filter.AuthenticationFilter;
import de.ids_mannheim.korap.web.filter.DemoUserFilter;
-import de.ids_mannheim.korap.web.filter.PiwikFilter;
import de.ids_mannheim.korap.web.utils.ResourceFilters;
import de.ids_mannheim.korap.web.utils.SearchResourceFilters;
import jakarta.servlet.ServletContext;
@@ -55,7 +54,7 @@
@Controller
@Path("/")
@ResourceFilters({ APIVersionFilter.class, AuthenticationFilter.class,
- DemoUserFilter.class, PiwikFilter.class })
+ DemoUserFilter.class})
public class SearchController {
private static final boolean DEBUG = false;
diff --git a/src/main/java/de/ids_mannheim/korap/core/web/controller/StatisticController.java b/src/main/java/de/ids_mannheim/korap/core/web/controller/StatisticController.java
index 6f86d2c..0c90f2f 100644
--- a/src/main/java/de/ids_mannheim/korap/core/web/controller/StatisticController.java
+++ b/src/main/java/de/ids_mannheim/korap/core/web/controller/StatisticController.java
@@ -12,7 +12,6 @@
import de.ids_mannheim.korap.exceptions.KustvaktException;
import de.ids_mannheim.korap.web.CoreResponseHandler;
import de.ids_mannheim.korap.web.filter.APIVersionFilter;
-import de.ids_mannheim.korap.web.filter.PiwikFilter;
import de.ids_mannheim.korap.web.utils.ResourceFilters;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.GET;
@@ -36,7 +35,7 @@
*/
@Controller
@Path("{version}/statistics/")
-@ResourceFilters({ APIVersionFilter.class, PiwikFilter.class })
+@ResourceFilters({ APIVersionFilter.class})
@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
public class StatisticController {
diff --git a/src/main/java/de/ids_mannheim/korap/web/controller/AuthenticationController.java b/src/main/java/de/ids_mannheim/korap/web/controller/AuthenticationController.java
index 0b40e33..99ae42c 100644
--- a/src/main/java/de/ids_mannheim/korap/web/controller/AuthenticationController.java
+++ b/src/main/java/de/ids_mannheim/korap/web/controller/AuthenticationController.java
@@ -30,7 +30,6 @@
import de.ids_mannheim.korap.web.filter.AuthenticationFilter;
import de.ids_mannheim.korap.web.filter.BlockingFilter;
import de.ids_mannheim.korap.web.filter.DemoUserFilter;
-import de.ids_mannheim.korap.web.filter.PiwikFilter;
import de.ids_mannheim.korap.web.utils.ResourceFilters;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.GET;
@@ -60,7 +59,7 @@
*/
@Controller
@Path("/{version}/auth")
-@ResourceFilters({ APIVersionFilter.class, PiwikFilter.class })
+@ResourceFilters({ APIVersionFilter.class})
@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
public class AuthenticationController {
diff --git a/src/main/java/de/ids_mannheim/korap/web/controller/QueryReferenceController.java b/src/main/java/de/ids_mannheim/korap/web/controller/QueryReferenceController.java
index af9c395..5216963 100644
--- a/src/main/java/de/ids_mannheim/korap/web/controller/QueryReferenceController.java
+++ b/src/main/java/de/ids_mannheim/korap/web/controller/QueryReferenceController.java
@@ -18,7 +18,6 @@
import de.ids_mannheim.korap.web.filter.AuthenticationFilter;
import de.ids_mannheim.korap.web.filter.BlockingFilter;
import de.ids_mannheim.korap.web.filter.DemoUserFilter;
-import de.ids_mannheim.korap.web.filter.PiwikFilter;
import de.ids_mannheim.korap.web.input.QueryJson;
import de.ids_mannheim.korap.web.utils.ResourceFilters;
import jakarta.ws.rs.Consumes;
@@ -47,7 +46,7 @@
@Controller
@Path("{version}/query")
@ResourceFilters({ APIVersionFilter.class, AuthenticationFilter.class,
- BlockingFilter.class, PiwikFilter.class })
+ BlockingFilter.class})
@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
public class QueryReferenceController {
@@ -120,7 +119,7 @@
@GET
@Path("~{createdBy}/{qName}")
@ResourceFilters({ APIVersionFilter.class, AuthenticationFilter.class,
- DemoUserFilter.class, PiwikFilter.class })
+ DemoUserFilter.class})
public QueryDto retrieveQueryByName (
@Context SecurityContext securityContext,
@PathParam("createdBy") String createdBy,
diff --git a/src/main/java/de/ids_mannheim/korap/web/controller/ResourceController.java b/src/main/java/de/ids_mannheim/korap/web/controller/ResourceController.java
index 986f621..12f3bc2 100644
--- a/src/main/java/de/ids_mannheim/korap/web/controller/ResourceController.java
+++ b/src/main/java/de/ids_mannheim/korap/web/controller/ResourceController.java
@@ -8,7 +8,6 @@
import de.ids_mannheim.korap.dto.ResourceDto;
import de.ids_mannheim.korap.service.ResourceService;
import de.ids_mannheim.korap.web.filter.APIVersionFilter;
-import de.ids_mannheim.korap.web.filter.PiwikFilter;
import de.ids_mannheim.korap.web.utils.ResourceFilters;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
@@ -23,7 +22,7 @@
*/
@Controller
@Path("{version}/resource")
-@ResourceFilters({ APIVersionFilter.class, PiwikFilter.class })
+@ResourceFilters({ APIVersionFilter.class})
@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
public class ResourceController {
diff --git a/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java b/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java
index b54269a..00cbf9a 100644
--- a/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java
+++ b/src/main/java/de/ids_mannheim/korap/web/controller/UserGroupController.java
@@ -16,7 +16,6 @@
import de.ids_mannheim.korap.web.filter.APIVersionFilter;
import de.ids_mannheim.korap.web.filter.AuthenticationFilter;
import de.ids_mannheim.korap.web.filter.BlockingFilter;
-import de.ids_mannheim.korap.web.filter.PiwikFilter;
import de.ids_mannheim.korap.web.utils.ResourceFilters;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.DELETE;
@@ -47,7 +46,7 @@
@Controller
@Path("{version}/group")
@ResourceFilters({ APIVersionFilter.class, AuthenticationFilter.class,
- BlockingFilter.class, PiwikFilter.class })
+ BlockingFilter.class})
@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
public class UserGroupController {
diff --git a/src/main/java/de/ids_mannheim/korap/web/controller/UserSettingController.java b/src/main/java/de/ids_mannheim/korap/web/controller/UserSettingController.java
index af0199f..3f861ae 100644
--- a/src/main/java/de/ids_mannheim/korap/web/controller/UserSettingController.java
+++ b/src/main/java/de/ids_mannheim/korap/web/controller/UserSettingController.java
@@ -15,7 +15,6 @@
import de.ids_mannheim.korap.web.filter.APIVersionFilter;
import de.ids_mannheim.korap.web.filter.AuthenticationFilter;
import de.ids_mannheim.korap.web.filter.BlockingFilter;
-import de.ids_mannheim.korap.web.filter.PiwikFilter;
import de.ids_mannheim.korap.web.utils.ResourceFilters;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.DELETE;
@@ -40,8 +39,8 @@
*/
@Controller
@Path("{version}/{username: ~[a-zA-Z0-9_.]+}/setting")
-@ResourceFilters({ AuthenticationFilter.class, APIVersionFilter.class,
- PiwikFilter.class })
+@ResourceFilters({APIVersionFilter.class, BlockingFilter.class,
+ AuthenticationFilter.class})
@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
public class UserSettingController {
@@ -70,8 +69,6 @@
*/
@PUT
@Consumes(MediaType.APPLICATION_JSON)
- @ResourceFilters({ AuthenticationFilter.class, PiwikFilter.class,
- BlockingFilter.class })
public Response createDefaultSetting (@Context SecurityContext context,
@PathParam("username") String username, Map<String, Object> map) {
@@ -99,8 +96,6 @@
* @return the default setting of the given username
*/
@GET
- @ResourceFilters({ AuthenticationFilter.class, PiwikFilter.class,
- BlockingFilter.class })
public Response retrieveDefaultSetting (@Context SecurityContext context,
@PathParam("username") String username) {
TokenContext tokenContext = (TokenContext) context.getUserPrincipal();
@@ -139,8 +134,6 @@
@DELETE
@Path("{key}")
@Consumes(MediaType.APPLICATION_JSON)
- @ResourceFilters({ AuthenticationFilter.class, PiwikFilter.class,
- BlockingFilter.class })
public Response deleteDefaultSettingEntry (@Context SecurityContext context,
@PathParam("username") String username,
@PathParam("key") String key) {
@@ -169,8 +162,6 @@
* @return 200 if the request is successful
*/
@DELETE
- @ResourceFilters({ AuthenticationFilter.class, PiwikFilter.class,
- BlockingFilter.class })
public Response deleteDefaultSetting (@Context SecurityContext context,
@PathParam("username") String username) {
diff --git a/src/main/java/de/ids_mannheim/korap/web/controller/VirtualCorpusController.java b/src/main/java/de/ids_mannheim/korap/web/controller/VirtualCorpusController.java
index b69b09f..6c91dd6 100644
--- a/src/main/java/de/ids_mannheim/korap/web/controller/VirtualCorpusController.java
+++ b/src/main/java/de/ids_mannheim/korap/web/controller/VirtualCorpusController.java
@@ -23,7 +23,6 @@
import de.ids_mannheim.korap.web.filter.AuthenticationFilter;
import de.ids_mannheim.korap.web.filter.BlockingFilter;
import de.ids_mannheim.korap.web.filter.DemoUserFilter;
-import de.ids_mannheim.korap.web.filter.PiwikFilter;
import de.ids_mannheim.korap.web.input.QueryJson;
import de.ids_mannheim.korap.web.utils.ResourceFilters;
import jakarta.ws.rs.Consumes;
@@ -62,7 +61,7 @@
@Controller
@Path("{version}/vc")
@ResourceFilters({ APIVersionFilter.class, AuthenticationFilter.class,
- BlockingFilter.class, PiwikFilter.class })
+ BlockingFilter.class })
@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
public class VirtualCorpusController {
@@ -139,7 +138,7 @@
@GET
@Path("~{createdBy}/{vcName}")
@ResourceFilters({ APIVersionFilter.class, AuthenticationFilter.class,
- DemoUserFilter.class, PiwikFilter.class })
+ DemoUserFilter.class})
public QueryDto retrieveVCByName (@Context SecurityContext securityContext,
@PathParam("createdBy") String createdBy,
@PathParam("vcName") String vcName) {
diff --git a/src/main/resources/default-config.xml b/src/main/resources/default-config.xml
index 073bf26..9812de1 100644
--- a/src/main/resources/default-config.xml
+++ b/src/main/resources/default-config.xml
@@ -183,13 +183,6 @@
<bean id="authorizationDao"
class="de.ids_mannheim.korap.oauth2.dao.CachedAuthorizationDaoImpl" />
- <!-- Filters -->
- <!-- <bean id="authenticationFilter" class="de.ids_mannheim.korap.web.filter.AuthenticationFilter"
- > <property name="authenticationManager" ref="kustvakt_authenticationmanager"/>
- </bean> <bean id="piwikFilter" class="de.ids_mannheim.korap.web.filter.PiwikFilter"
- > <property name="authenticationManager" ref="kustvakt_authenticationmanager"/>
- </bean> -->
-
<!-- Services -->
<bean id="scopeService"
class="de.ids_mannheim.korap.oauth2.service.OAuth2ScopeServiceImpl" />