This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new a54f232 Remove deprecated code.
a54f232 is described below
commit a54f232d5ae3675f117f158e87e6c145d848de66
Author: JamesBognar <[email protected]>
AuthorDate: Tue Oct 13 17:08:42 2020 -0400
Remove deprecated code.
---
.../org/apache/juneau/rest/RestCallHandler.java | 117 ---------------------
.../java/org/apache/juneau/rest/RestContext.java | 10 --
.../org/apache/juneau/rest/RestContextBuilder.java | 28 -----
.../org/apache/juneau/rest/annotation/Rest.java | 11 --
.../juneau/rest/annotation/RestConfigApply.java | 3 -
5 files changed, 169 deletions(-)
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestCallHandler.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestCallHandler.java
deleted file mode 100644
index 026f059..0000000
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestCallHandler.java
+++ /dev/null
@@ -1,117 +0,0 @@
-//
***************************************************************************************************************************
-// * 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.juneau.rest;
-
-
-import java.io.*;
-import java.util.*;
-
-import javax.servlet.*;
-import javax.servlet.http.*;
-
-/**
- * Class that handles the basic lifecycle of an HTTP REST call.
- *
- * <div class='warn'>
- * <b>Deprecated</b> - Use {@link RestContext#REST_context} and override
methods.
- * </div>
- */
-@Deprecated
-public interface RestCallHandler {
-
- /**
- * Represents no RestCallHandler.
- */
- public interface Null extends RestCallHandler {}
-
- /**
- * The main service method.
- *
- * @param r1 The incoming HTTP servlet request object.
- * @param r2 The incoming HTTP servlet response object.
- * @throws ServletException Error occurred.
- * @throws IOException Thrown by underlying stream.
- */
- public void execute(HttpServletRequest r1, HttpServletResponse r2)
throws ServletException, IOException;
-
- /**
- * Wraps an incoming servlet request/response pair into a single {@link
RestCall} object.
- *
- * @param req The rest request.
- * @param res The rest response.
- * @return The wrapped request/response pair.
- */
- public RestCall createCall(HttpServletRequest req, HttpServletResponse
res);
-
- /**
- * Creates a {@link RestRequest} object based on the specified incoming
{@link HttpServletRequest} object.
- *
- * @param call The current REST call.
- * @return The wrapped request object.
- * @throws ServletException If any errors occur trying to interpret the
request.
- */
- public RestRequest createRequest(RestCall call) throws ServletException;
-
- /**
- * Creates a {@link RestResponse} object based on the specified
incoming {@link HttpServletResponse} object
- * and the request returned by {@link #createRequest(RestCall)}.
- *
- * @param call The current REST call.
- * @return The wrapped response object.
- * @throws ServletException If any errors occur trying to interpret the
request or response.
- */
- public RestResponse createResponse(RestCall call) throws
ServletException;
-
- /**
- * The main method for serializing POJOs passed in through the {@link
RestResponse#setOutput(Object)} method or
- * returned by the Java method.
- *
- * @param call The current REST call.
- * @throws Exception Can be thrown if error occurred while handling
response.
- */
- public void handleResponse(RestCall call) throws Exception;
-
- /**
- * Handle the case where a matching method was not found.
- *
- * @param call The current REST call.
- * @throws Exception Can be thrown if error occurred while handling
response.
- */
- public void handleNotFound(RestCall call) throws Exception;
-
- /**
- * Method for handling response errors.
- *
- * @param call The current REST call.
- * @param e The exception that occurred.
- * @throws Exception Can be thrown if error occurred while handling
response.
- */
- public void handleError(RestCall call, Throwable e) throws Exception;
-
- /**
- * Method for converting thrown exceptions into other types before they
are handled.
- *
- * @param t The thrown object.
- * @return The converted thrown object.
- */
- public Throwable convertThrowable(Throwable t);
-
- /**
- * Returns the session objects for the specified request.
- *
- * @param req The REST request.
- * @param res The REST response.
- * @return The session objects for that request.
- */
- public Map<String,Object> getSessionObjects(RestRequest req,
RestResponse res);
-}
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
index dd4b08b..8009a84 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
@@ -396,16 +396,6 @@ public class RestContext extends BeanContext {
public static final String REST_allowHeaderParams = PREFIX +
".allowHeaderParams.b";
/**
- * Configuration property: REST call handler.
- *
- * <div class='warn'>
- * <b>Deprecated</b> - Use {@link RestContext#REST_context} and
override methods.
- * </div>
- */
- @Deprecated
- public static final String REST_callHandler = PREFIX + ".callHandler.o";
-
- /**
* Configuration property: REST call logger.
*
* <h5 class='section'>Property:</h5>
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContextBuilder.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContextBuilder.java
index 4a7ab31..cf6d399 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContextBuilder.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContextBuilder.java
@@ -561,34 +561,6 @@ public class RestContextBuilder extends BeanContextBuilder
implements ServletCon
}
/**
- * <i><l>RestContext</l> configuration property: </i> REST call
handler.
- *
- * <div class='warn'>
- * <b>Deprecated</b> - Use {@link RestContext#REST_context} and
override methods.
- * </div>
- */
- @SuppressWarnings("javadoc")
- @FluentSetter
- @Deprecated
- public RestContextBuilder callHandler(Class<? extends RestCallHandler>
value) {
- return set(REST_callHandler, value);
- }
-
- /**
- * <i><l>RestContext</l> configuration property: </i> REST call
handler.
- *
- * <div class='warn'>
- * <b>Deprecated</b> - Use {@link RestContext#REST_context} and
override methods.
- * </div>
- */
- @SuppressWarnings("javadoc")
- @FluentSetter
- @Deprecated
- public RestContextBuilder callHandler(RestCallHandler value) {
- return set(REST_callHandler, value);
- }
-
- /**
* <i><l>RestContext</l> configuration property: </i> REST call
logger.
*
* <p>
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Rest.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Rest.java
index 438ad61..46a14fb 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Rest.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Rest.java
@@ -160,17 +160,6 @@ public @interface Rest {
String[] attrs() default {};
/**
- * REST call handler.
- *
- * <div class='warn'>
- * <b>Deprecated</b> - Use {@link RestContext#REST_context} and
override methods.
- * </div>
- * <p>
- */
- @Deprecated
- Class<? extends RestCallHandler> callHandler() default
RestCallHandler.Null.class;
-
- /**
* REST children.
*
* <p>
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestConfigApply.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestConfigApply.java
index 76daa0a..b1eea4f 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestConfigApply.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestConfigApply.java
@@ -267,9 +267,6 @@ public class RestConfigApply extends ConfigApply<Rest> {
psb.set(REST_callLoggerConfig, m);
}
- if (a.callHandler() != RestCallHandler.Null.class)
- psb.set(REST_callHandler, a.callHandler());
-
if (a.infoProvider() != RestInfoProvider.Null.class)
psb.set(REST_infoProvider, a.infoProvider());