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_HTML |
protected static String |
FORMAT_JSON |
protected static String |
FORMAT_XML |
FORWARDED
Constructor and Description |
---|
ServiceRequestHandler(MarshallService marshallService,
PlatformTransformer transformer) |
Modifier and Type | Method and Description |
---|---|
protected void |
callWebservice(HttpServletRequest servletRequest,
HttpServletResponse servletResponse,
ApplicationRequest applicationRequest,
Environment env,
Site site,
ApplicationProvider application,
String webserviceName) |
void |
handle(HttpServletRequest servletRequest,
HttpServletResponse servletResponse,
Environment environment,
Site site,
PathInfo path)
Handles the given
HttpServletRequest , |
protected void |
handleRest(Site site,
AccessibleApplication application,
Environment environment,
HttpServletRequest servletRequest,
HttpServletResponse servletResponse) |
protected void |
handleSoap(Site site,
AccessibleApplication application,
Environment environment,
HttpServletRequest servletRequest,
HttpServletResponse servletResponse) |
protected String |
processPlatform(Environment environment,
Path path,
Site siteToUse,
ApplicationProvider application,
Object element) |
protected String |
retrievePlatform(Environment environment,
Path path,
Site siteToUse,
Object element,
Properties platformProperties) |
protected String |
writeJson(Object data) |
protected static final String FORMAT_JSON
protected static final String FORMAT_HTML
protected static final String FORMAT_XML
public ServiceRequestHandler(MarshallService marshallService, PlatformTransformer transformer)
public void handle(HttpServletRequest servletRequest, 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 processPlatform(Environment environment, Path path, Site siteToUse, ApplicationProvider application, Object element) throws InvalidConfigurationException, ParserConfigurationException, JAXBException, TransformerException, FileNotFoundException, IOException
protected String retrievePlatform(Environment environment, Path path, Site siteToUse, Object element, Properties platformProperties) throws InvalidConfigurationException, ParserConfigurationException, JAXBException, TransformerException
protected 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, HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws Exception
Exception
protected void handleRest(Site site, AccessibleApplication application, Environment environment, HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws Exception
Exception
protected void callWebservice(HttpServletRequest servletRequest, HttpServletResponse servletResponse, ApplicationRequest applicationRequest, Environment env, Site site, ApplicationProvider application, String webserviceName) throws BusinessException, IOException
BusinessException
IOException
Copyright © 2011–2017 aiticon GmbH. All rights reserved.