@Path(value="/") public class ODataRootLocator extends Object
/{odata path} e.g. http://host:port/webapp/odata.svc/$metadata
All path segments defined by a servlet mapping belong to the odata uri.
/{custom path}{odata path} e.g. http://host:port/webapp/bmw/odata.svc/$metadata
The first segment defined by a servlet mapping belong to customer context and the following segments are OData
specific.
| Constructor and Description |
|---|
ODataRootLocator() |
| Modifier and Type | Method and Description |
|---|---|
static ODataServiceFactory |
createServiceFactoryFromContext(javax.ws.rs.core.Application app,
javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.ServletConfig servletConfig) |
int |
getPathSplit() |
ODataServiceFactory |
getServiceFactory() |
Object |
handleRequest(List<javax.ws.rs.core.PathSegment> pathSegments,
String xHttpMethod,
String xHttpMethodOverride)
Default root behavior which will delegate all paths to a ODataLocator.
|
@Path(value="/{pathSegments: .*}")
public Object handleRequest(@Encoded @PathParam(value="pathSegments")
List<javax.ws.rs.core.PathSegment> pathSegments,
@HeaderParam(value="X-HTTP-Method")
String xHttpMethod,
@HeaderParam(value="X-HTTP-Method-Override")
String xHttpMethodOverride)
throws ODataException,
ClassNotFoundException,
InstantiationException,
IllegalAccessException
pathSegments - URI path segments - all segments have to be ODataxHttpMethod - HTTP Header X-HTTP-Method for tunneling through POSTxHttpMethodOverride - HTTP Header X-HTTP-Method-Override for tunneling through POSTODataExceptionClassNotFoundExceptionIllegalAccessExceptionInstantiationExceptionpublic ODataServiceFactory getServiceFactory()
public int getPathSplit()
public static ODataServiceFactory createServiceFactoryFromContext(javax.ws.rs.core.Application app, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.ServletConfig servletConfig)
Copyright © 2020. All rights reserved.