Class DefaultProxyService
java.lang.Object
de.hybris.platform.xyformsservices.proxy.impl.DefaultProxyService
- All Implemented Interfaces:
ProxyService
Default implementation for proxy service.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextractNamespace(javax.servlet.http.HttpServletRequest request) Extracts the namespace from the client request.Returns the extra headers configured for the application.Generates a random namespace.voidproxy(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String namespace, String url, boolean forceGetMethod, Map<String, String> headers) Proxies content.rewriteURL(String url, boolean embeddable) Rewrites a URL to be used for the proxy.rewriteURL(String applicationId, String formId, String formDataId) Rewrites a URL to be used for the proxy.rewriteURL(String applicationId, String formId, String formDataId, boolean editable) Rewrites a URL to be used for the proxy.rewriteURL(String applicationId, String formId, String formDataId, boolean editable, boolean withEmptyData) Rewrites a URL to be used for the proxy.voidsetExtraHeaders(Map<String, String> extraHeaders) voidsetOrbeonAddress(String orbeonAddress) voidsetProxyEngine(ProxyEngine proxyEngine)
-
Field Details
-
NEW_COMMAND
- See Also:
-
EDIT_COMMAND
- See Also:
-
VIEW_COMMAND
- See Also:
-
SERVICE_PREFIX
- See Also:
-
ORBEON_PREFIX
- See Also:
-
ORBEON_WEB_PREFIX
- See Also:
-
orbeonAddress
-
extraHeaders
-
proxyEngine
-
-
Constructor Details
-
DefaultProxyService
public DefaultProxyService()
-
-
Method Details
-
rewriteURL
Description copied from interface:ProxyServiceRewrites a URL to be used for the proxy.- Specified by:
rewriteURLin interfaceProxyService- Parameters:
url- the url path to be rewrittenembeddable- the flag that specifies if the rewriter should produce a URL that produces embeddable content- Returns:
- the URL of the proxy
- Throws:
MalformedURLException- if result URL is invalid
-
rewriteURL
public String rewriteURL(String applicationId, String formId, String formDataId, boolean editable, boolean withEmptyData) throws MalformedURLException Description copied from interface:ProxyServiceRewrites a URL to be used for the proxy.- Specified by:
rewriteURLin interfaceProxyService- Parameters:
applicationId- the application IdformId- the form IdformDataId- the form data Ideditable- the flag that specifies whether form should be editable or notwithEmptyData- the flag that specifies whether create empty data for form via background api- Returns:
- the URL of the proxy
- Throws:
MalformedURLException- if result URL is invalid
-
rewriteURL
public String rewriteURL(String applicationId, String formId, String formDataId, boolean editable) throws MalformedURLException Description copied from interface:ProxyServiceRewrites a URL to be used for the proxy.- Specified by:
rewriteURLin interfaceProxyService- Parameters:
applicationId- the application IdformId- the form IdformDataId- the form data Ideditable- the flag that specifies whether form should be editable or not- Returns:
- the URL of the proxy
- Throws:
MalformedURLException- if result URL is invalid
-
rewriteURL
public String rewriteURL(String applicationId, String formId, String formDataId) throws MalformedURLException Description copied from interface:ProxyServiceRewrites a URL to be used for the proxy.- Specified by:
rewriteURLin interfaceProxyService- Parameters:
applicationId- the application IdformId- the form IdformDataId- the form data Id- Returns:
- the URL of the proxy
- Throws:
MalformedURLException- if result URL is invalid
-
getNextRandomNamespace
Description copied from interface:ProxyServiceGenerates a random namespace.- Specified by:
getNextRandomNamespacein interfaceProxyService- Returns:
- the random namespace string
-
proxy
public void proxy(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String namespace, String url, boolean forceGetMethod, Map<String, String> headers) throws ProxyExceptionDescription copied from interface:ProxyServiceProxies content.- Specified by:
proxyin interfaceProxyService- Parameters:
request- theHttpServletRequestassociated to the callresponse- theHttpServletResponseassociated to the callnamespace- the namespace for HTML element's id generationurl- the url to be calledforceGetMethod- the flag for specifying if only "GET" method should be used, useful when proxying contentheaders- extra headers to be passed to the proxy service- Throws:
ProxyException- if request cannot be proxied
-
extractNamespace
Description copied from interface:ProxyServiceExtracts the namespace from the client request.- Specified by:
extractNamespacein interfaceProxyService- Parameters:
request- the request to get namespace from- Returns:
- the extracted namespace
-
setOrbeonAddress
- Throws:
MalformedURLException
-
getExtraHeaders
Description copied from interface:ProxyServiceReturns the extra headers configured for the application.- Specified by:
getExtraHeadersin interfaceProxyService- Returns:
- the extra headers as map
-
setExtraHeaders
-
setProxyEngine
-