This is an automated email from the ASF dual-hosted git repository.

kusal pushed a commit to branch WW-5251-retrofit-compat
in repository https://gitbox.apache.org/repos/asf/struts.git

commit cda2a2b2310c72913f626cb3ecd14014cb4e378b
Author: Kusal Kithul-Godage <g...@kusal.io>
AuthorDate: Wed Mar 27 18:41:24 2024 +1100

    WW-5251 Reinstate deleted interfaces with transparent compat
---
 .../struts2/interceptor/ApplicationAware.java      | 32 ++++++++++++++++++++
 .../struts2/interceptor/HttpParametersAware.java   | 32 ++++++++++++++++++++
 .../apache/struts2/interceptor/ParameterAware.java | 34 ++++++++++++++++++++++
 .../apache/struts2/interceptor/PrincipalAware.java | 30 +++++++++++++++++++
 .../struts2/interceptor/ServletRequestAware.java   | 32 ++++++++++++++++++++
 .../struts2/interceptor/ServletResponseAware.java  | 32 ++++++++++++++++++++
 .../apache/struts2/interceptor/SessionAware.java   | 32 ++++++++++++++++++++
 .../apache/struts2/util/ServletContextAware.java   | 32 ++++++++++++++++++++
 .../portlet/interceptor/PortletContextAware.java   | 32 ++++++++++++++++++++
 .../interceptor/PortletPreferencesAware.java       | 32 ++++++++++++++++++++
 .../portlet/interceptor/PortletRequestAware.java   | 32 ++++++++++++++++++++
 .../portlet/interceptor/PortletResponseAware.java  | 32 ++++++++++++++++++++
 12 files changed, 384 insertions(+)

diff --git 
a/core/src/main/java/org/apache/struts2/interceptor/ApplicationAware.java 
b/core/src/main/java/org/apache/struts2/interceptor/ApplicationAware.java
new file mode 100644
index 000000000..166f484c9
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/interceptor/ApplicationAware.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.struts2.interceptor;
+
+import java.util.Map;
+
+@Deprecated
+public interface ApplicationAware extends 
org.apache.struts2.action.ApplicationAware {
+
+    void setApplication(Map<String, Object> application);
+
+    @Override
+    default void withApplication(Map<String, Object> application) {
+        setApplication(application);
+    }
+}
diff --git 
a/core/src/main/java/org/apache/struts2/interceptor/HttpParametersAware.java 
b/core/src/main/java/org/apache/struts2/interceptor/HttpParametersAware.java
new file mode 100644
index 000000000..1c4b758f7
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/interceptor/HttpParametersAware.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.struts2.interceptor;
+
+import org.apache.struts2.dispatcher.HttpParameters;
+
+@Deprecated
+public interface HttpParametersAware extends 
org.apache.struts2.action.ParametersAware {
+
+    void setParameters(HttpParameters parameters);
+
+    @Override
+    default void withParameters(HttpParameters parameters) {
+        setParameters(parameters);
+    }
+}
diff --git 
a/core/src/main/java/org/apache/struts2/interceptor/ParameterAware.java 
b/core/src/main/java/org/apache/struts2/interceptor/ParameterAware.java
new file mode 100644
index 000000000..13656436b
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/interceptor/ParameterAware.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.struts2.interceptor;
+
+import org.apache.struts2.dispatcher.HttpParameters;
+
+import java.util.Map;
+
+@Deprecated
+public interface ParameterAware extends 
org.apache.struts2.action.ParametersAware {
+
+    void setParameters(Map map);
+
+    @Override
+    default void withParameters(HttpParameters parameters) {
+        setParameters(parameters);
+    }
+}
diff --git 
a/core/src/main/java/org/apache/struts2/interceptor/PrincipalAware.java 
b/core/src/main/java/org/apache/struts2/interceptor/PrincipalAware.java
new file mode 100644
index 000000000..dfe4203ff
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/interceptor/PrincipalAware.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.struts2.interceptor;
+
+@Deprecated
+public interface PrincipalAware extends 
org.apache.struts2.action.PrincipalAware {
+
+    void setPrincipalProxy(PrincipalProxy principalProxy);
+
+    @Override
+    default void withPrincipalProxy(PrincipalProxy principalProxy) {
+        setPrincipalProxy(principalProxy);
+    }
+}
diff --git 
a/core/src/main/java/org/apache/struts2/interceptor/ServletRequestAware.java 
b/core/src/main/java/org/apache/struts2/interceptor/ServletRequestAware.java
new file mode 100644
index 000000000..f02ac90d1
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/interceptor/ServletRequestAware.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.struts2.interceptor;
+
+import javax.servlet.http.HttpServletRequest;
+
+@Deprecated
+public interface ServletRequestAware extends 
org.apache.struts2.action.ServletRequestAware {
+
+    void setServletRequest(HttpServletRequest httpServletRequest);
+
+    @Override
+    default void withServletRequest(HttpServletRequest request) {
+        setServletRequest(request);
+    }
+}
diff --git 
a/core/src/main/java/org/apache/struts2/interceptor/ServletResponseAware.java 
b/core/src/main/java/org/apache/struts2/interceptor/ServletResponseAware.java
new file mode 100644
index 000000000..d252621fe
--- /dev/null
+++ 
b/core/src/main/java/org/apache/struts2/interceptor/ServletResponseAware.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.struts2.interceptor;
+
+import javax.servlet.http.HttpServletResponse;
+
+@Deprecated
+public interface ServletResponseAware extends 
org.apache.struts2.action.ServletResponseAware {
+
+    void setServletResponse(HttpServletResponse httpServletResponse);
+
+    @Override
+    default void withServletResponse(HttpServletResponse response) {
+        setServletResponse(response);
+    }
+}
diff --git 
a/core/src/main/java/org/apache/struts2/interceptor/SessionAware.java 
b/core/src/main/java/org/apache/struts2/interceptor/SessionAware.java
new file mode 100644
index 000000000..828284d53
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/interceptor/SessionAware.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.struts2.interceptor;
+
+import java.util.Map;
+
+@Deprecated
+public interface SessionAware extends org.apache.struts2.action.SessionAware {
+
+    void setSession(Map<String, Object> session);
+
+    @Override
+    default void withSession(Map<String, Object> session) {
+        setSession(session);
+    }
+}
diff --git 
a/core/src/main/java/org/apache/struts2/util/ServletContextAware.java 
b/core/src/main/java/org/apache/struts2/util/ServletContextAware.java
new file mode 100644
index 000000000..c17bd9a7e
--- /dev/null
+++ b/core/src/main/java/org/apache/struts2/util/ServletContextAware.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.struts2.util;
+
+import javax.servlet.ServletContext;
+
+@Deprecated
+public interface ServletContextAware extends 
org.apache.struts2.action.ServletContextAware {
+
+    void setServletContext(ServletContext context);
+
+    @Override
+    default void withServletContext(ServletContext context) {
+        setServletContext(context);
+    }
+}
diff --git 
a/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletContextAware.java
 
b/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletContextAware.java
new file mode 100644
index 000000000..67e360a39
--- /dev/null
+++ 
b/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletContextAware.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.struts2.portlet.interceptor;
+
+import javax.portlet.PortletContext;
+
+@Deprecated
+public interface PortletContextAware extends 
org.apache.struts2.portlet.action.PortletContextAware {
+
+    void setPortletContext(PortletContext portletContext);
+
+    @Override
+    default void withPortletContext(PortletContext context) {
+        setPortletContext(context);
+    }
+}
diff --git 
a/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletPreferencesAware.java
 
b/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletPreferencesAware.java
new file mode 100644
index 000000000..fae552c91
--- /dev/null
+++ 
b/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletPreferencesAware.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.struts2.portlet.interceptor;
+
+import javax.portlet.PortletPreferences;
+
+@Deprecated
+public interface PortletPreferencesAware extends 
org.apache.struts2.portlet.action.PortletPreferencesAware {
+
+    void setPortletPreferences(PortletPreferences prefs);
+
+    @Override
+    default void withPortletPreferences(PortletPreferences prefs) {
+        setPortletPreferences(prefs);
+    }
+}
diff --git 
a/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletRequestAware.java
 
b/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletRequestAware.java
new file mode 100644
index 000000000..5565ecf70
--- /dev/null
+++ 
b/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletRequestAware.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.struts2.portlet.interceptor;
+
+import javax.portlet.PortletRequest;
+
+@Deprecated
+public interface PortletRequestAware extends 
org.apache.struts2.portlet.action.PortletRequestAware {
+
+    void setPortletRequest(PortletRequest request);
+
+    @Override
+    default void withPortletRequest(PortletRequest request) {
+        setPortletRequest(request);
+    }
+}
diff --git 
a/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletResponseAware.java
 
b/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletResponseAware.java
new file mode 100644
index 000000000..8f9641936
--- /dev/null
+++ 
b/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletResponseAware.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.apache.struts2.portlet.interceptor;
+
+import javax.portlet.PortletResponse;
+
+@Deprecated
+public interface PortletResponseAware extends 
org.apache.struts2.portlet.action.PortletResponseAware {
+
+    void setPortletResponse(PortletResponse response);
+
+    @Override
+    default void withPortletResponse(PortletResponse response) {
+        setPortletResponse(response);
+    }
+}

Reply via email to