public abstract class AbstractCmisProxyServlet extends HttpServlet
This servlet forwards CMIS requests to the SAP HANA Cloud document service.
Usage:
getRepositoryUniqueName()
and
getRepositoryKey()
.init(ServletConfig)
method, make sure you call
super.init(ServletConfig)
.
Sample web.xml snippet:
<servlet>
<servlet-name>cmisproxy</servlet-name>
<servlet-class>my.app.CMISProxyServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>cmisproxy</servlet-name>
<url-pattern>/cmis/*</url-pattern>
</servlet-mapping>
Constructor and Description |
---|
AbstractCmisProxyServlet() |
Modifier and Type | Method and Description |
---|---|
protected String |
authenticate(HttpServletRequest request,
HttpServletResponse response)
Checks the user or the credentials that are included in the request.
|
protected int |
getConnectTimeout()
Returns the connect timeout in milliseconds.
|
protected String |
getDestinationName()
Returns the destination name.
|
protected int |
getReadTimeout()
Returns the read timeout in milliseconds.
|
protected abstract String |
getRepositoryKey()
Returns the repository key.
|
protected abstract String |
getRepositoryUniqueName()
Returns the repository unique name.
|
void |
init(ServletConfig config) |
protected boolean |
readOnlyMode()
Indicates if the proxy should only forward read-only Browser binding requests.
|
protected boolean |
requireAuthentication()
Indicates if the request must be authenticated.
|
protected void |
service(HttpServletRequest request,
HttpServletResponse response) |
protected boolean |
supportAtomPubBinding()
Indicates if the CMIS AtomPub Binding should be exposed.
|
protected boolean |
supportBrowserBinding()
Indicates if the CMIS Browser Binding should be exposed.
|
protected boolean |
supportCMIS_1_0()
Indicates if the CMIS 1.0 endpoints should be exposed.
|
protected boolean |
supportCMIS_1_1()
Indicates if the CMIS 1.1 endpoints should be exposed.
|
protected boolean |
supportWebServicesBinding()
Indicates if the CMIS Web Services Binding should be exposed.
|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
public void init(ServletConfig config) throws ServletException
init
in interface Servlet
init
in class GenericServlet
ServletException
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
service
in class HttpServlet
ServletException
IOException
protected String getDestinationName()
null
null
for the default destination.protected abstract String getRepositoryUniqueName()
protected abstract String getRepositoryKey()
null
.protected boolean supportWebServicesBinding()
true
true
if the CMIS Web Services Binding should be exposed,
false
otherwiseprotected boolean supportAtomPubBinding()
true
true
if the CMIS AtomPub Binding should be exposed, false
otherwiseprotected boolean supportBrowserBinding()
true
true
if the CMIS Browser Binding should be exposed, false
otherwiseprotected boolean supportCMIS_1_0()
true
true
if CMIS 1.0 endpoints should be exposed, false
otherwiseprotected boolean supportCMIS_1_1()
true
true
if CMIS 1.1 endpoints should be exposed, false
otherwiseprotected boolean requireAuthentication()
true
, the method
authenticate(HttpServletRequest, HttpServletResponse)
is called to handle the
authentication of the user.
Default: true
true
if user authentication is required, false
if anonymous
access should be grantedprotected String authenticate(HttpServletRequest request, HttpServletResponse response) throws LoginException
request
- the HTTP request objectresponse
- the HTTP response objectnull
for anonymous loginLoginException
- if the authentication failedprotected boolean readOnlyMode()
false
true
if only read-only request should be forwarded, false
for
full accessprotected int getConnectTimeout()
protected int getReadTimeout()
Copyright © 2016 SAP. All Rights Reserved.