use of com.linkedin.restli.internal.server.methods.MethodAdapterRegistry in project rest.li by linkedin.
the class RestLiServer method buildRestLiArgumentBuilder.
/**
* Builder for building a {@link RestLiArgumentBuilder}
*
* @param method the REST method
* @param errorResponseBuilder the {@link ErrorResponseBuilder}
* @return a {@link RestLiArgumentBuilder}
*/
private RestLiArgumentBuilder buildRestLiArgumentBuilder(RoutingResult method, ErrorResponseBuilder errorResponseBuilder) {
ResourceMethodDescriptor resourceMethodDescriptor = method.getResourceMethod();
RestLiArgumentBuilder adapter = new MethodAdapterRegistry(errorResponseBuilder).getArgumentBuilder(resourceMethodDescriptor.getType());
if (adapter == null) {
throw new IllegalArgumentException("Unsupported method type: " + resourceMethodDescriptor.getType());
}
return adapter;
}
use of com.linkedin.restli.internal.server.methods.MethodAdapterRegistry in project rest.li by linkedin.
the class RestLiServerUtils method buildRestLiArgumentBuilder.
/**
* Builds a RestLiArgument builder
*
* @param method
* {@link RoutingResult}
* @param errorResponseBuilder
* {@link ErrorResponseBuilder}
* @return
*/
public static RestLiArgumentBuilder buildRestLiArgumentBuilder(RoutingResult method, ErrorResponseBuilder errorResponseBuilder) {
ResourceMethodDescriptor resourceMethodDescriptor = method.getResourceMethod();
RestLiArgumentBuilder adapter = new MethodAdapterRegistry(errorResponseBuilder).getArgumentBuilder(resourceMethodDescriptor.getType());
if (adapter == null) {
throw new IllegalArgumentException("Unsupported method type: " + resourceMethodDescriptor.getType());
}
return adapter;
}
Aggregations