public class ServiceRequestHandler extends Object implements RequestHandler
RequestHandler
which handles HttpServletRequest
s for different types of services.
<site-domain>/<service-path>/<site-name>/<application-name>/<service-type/<service-name>/<additional-params>
SiteProperties.SERVICE_PATH
.Webservice
or AttachmentWebservice
.Application
.Application
.SoapService
provided by a Application
.RestController
offered by an
Application
Modifier and Type | Field and Description |
---|---|
protected static String |
FORMAT_JSON |
protected static String |
FORMAT_XML |
FORWARDED
Constructor and Description |
---|
ServiceRequestHandler(MarshallService marshallService) |
Modifier and Type | Method and Description |
---|---|
protected void |
callWebservice(javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse,
ApplicationRequest applicationRequest,
Environment env,
Site site,
ApplicationProvider application,
String webserviceName) |
void |
handle(javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse,
Environment environment,
Site site,
PathInfo path)
Handles the given
HttpServletRequest , |
protected void |
handleRest(AccessibleApplication application,
javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse) |
protected void |
handleSoap(Site site,
AccessibleApplication application,
Environment environment,
javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse) |
protected String |
writeJson(Object data) |
protected static final String FORMAT_JSON
protected static final String FORMAT_XML
public ServiceRequestHandler(MarshallService marshallService)
public void handle(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, Environment environment, Site site, PathInfo path) throws IOException
RequestHandler
HttpServletRequest
,handle
in interface RequestHandler
servletRequest
- the current HttpServletRequest
servletResponse
- the current HttpServletResponse
environment
- the current Environment
site
- the current Site
path
- the current PathInfo
IOException
- if a resource could not be foundprotected String writeJson(Object data) throws IOException, com.fasterxml.jackson.core.JsonGenerationException, com.fasterxml.jackson.databind.JsonMappingException
IOException
com.fasterxml.jackson.core.JsonGenerationException
com.fasterxml.jackson.databind.JsonMappingException
protected void handleSoap(Site site, AccessibleApplication application, Environment environment, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse) throws Exception
Exception
protected void handleRest(AccessibleApplication application, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse) throws Exception
Exception
protected void callWebservice(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse, ApplicationRequest applicationRequest, Environment env, Site site, ApplicationProvider application, String webserviceName) throws BusinessException, IOException
BusinessException
IOException
Copyright © 2011–2021 aiticon GmbH. All rights reserved.