public class ServiceRequestHandler extends Object implements RequestHandler
RequestHandler which handles HttpServletRequests 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(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(Site site,
AccessibleApplication application,
Environment environment,
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 |
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(javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse,
Environment environment,
Site site,
PathInfo path)
throws IOException
RequestHandlerHttpServletRequest,handle in interface RequestHandlerservletRequest - the current HttpServletRequestservletResponse - the current HttpServletResponseenvironment - the current Environmentsite - the current Sitepath - the current PathInfoIOException - 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
IOExceptioncom.fasterxml.jackson.core.JsonGenerationExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionprotected void handleSoap(Site site, AccessibleApplication application, Environment environment, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse) throws Exception
Exceptionprotected void handleRest(Site site, AccessibleApplication application, Environment environment, javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse) throws Exception
Exceptionprotected 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
BusinessExceptionIOExceptionCopyright © 2011–2018 aiticon GmbH. All rights reserved.