Class AbstractCmisProxyServlet

All Implemented Interfaces:
Servlet, ServletConfig, Serializable

public abstract class AbstractCmisProxyServlet extends HttpServlet
Abstract CMIS Proxy Servlet.

This servlet forwards CMIS requests to the SAP Cloud Platform document service.

Usage:

  • Create a servlet that extends this class.
  • Implement at least the methods getRepositoryUniqueName() and getRepositoryKey().
  • If you override the init(ServletConfig) method, make sure you call super.init(ServletConfig). However make sure to NOT modify the servlet's paths/uris/context, otherwise the AbstractCmisProxyServlet won't work correctly.
  • Add your servlet to the web.xml.

For samples, check https://help.sap.com/viewer/b0cc1109d03c4dc299c215871eed8c42/Cloud/en-US/ed1c6732d4214c68846ab9813b9df943.html

See Also:
  • Constructor Details

    • AbstractCmisProxyServlet

      public AbstractCmisProxyServlet()
  • Method Details

    • init

      public void init(ServletConfig config) throws ServletException
      Specified by:
      init in interface Servlet
      Overrides:
      init in class HttpServlet
      Throws:
      ServletException
    • service

      protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
      Overrides:
      service in class HttpServlet
      Throws:
      ServletException
      IOException
    • getDestinationName

      protected String getDestinationName()
      Returns the destination name. Default: null
      Returns:
      the destination name or null for the default destination.
    • getRepositoryUniqueName

      protected abstract String getRepositoryUniqueName()
      Returns the repository unique name.
      Returns:
      the repository unique name
    • getRepositoryKey

      protected abstract String getRepositoryKey()
      Returns the repository key. If a repository unique name is provided, then this method must not return null.
      Returns:
      the repository key
    • supportWebServicesBinding

      protected boolean supportWebServicesBinding()
      Indicates if the CMIS Web Services Binding should be exposed. Default: true
      Returns:
      true if the CMIS Web Services Binding should be exposed, false otherwise
    • supportAtomPubBinding

      protected boolean supportAtomPubBinding()
      Indicates if the CMIS AtomPub Binding should be exposed. Default: true
      Returns:
      true if the CMIS AtomPub Binding should be exposed, false otherwise
    • supportBrowserBinding

      protected boolean supportBrowserBinding()
      Indicates if the CMIS Browser Binding should be exposed. Default: true
      Returns:
      true if the CMIS Browser Binding should be exposed, false otherwise
    • supportCMIS_1_0

      protected boolean supportCMIS_1_0()
      Indicates if the CMIS 1.0 endpoints should be exposed. Default: true
      Returns:
      true if CMIS 1.0 endpoints should be exposed, false otherwise
    • supportCMIS_1_1

      protected boolean supportCMIS_1_1()
      Indicates if the CMIS 1.1 endpoints should be exposed. Default: true
      Returns:
      true if CMIS 1.1 endpoints should be exposed, false otherwise
    • requireAuthentication

      protected boolean requireAuthentication()
      Indicates if the request must be authenticated. If this method returns true, the method authenticate(HttpServletRequest, HttpServletResponse) is called to handle the authentication of the user. Default: true
      Returns:
      true if user authentication is required, false if anonymous access should be granted
    • authenticate

      protected String authenticate(HttpServletRequest request, HttpServletResponse response) throws LoginException
      Checks the user or the credentials that are included in the request. If this method throws an exception, the request processing is stopped. The default implementation checks if the platform delivered a remote user. If not, it asks for credentials via basic authentication.
      Parameters:
      request - the HTTP request object
      response - the HTTP response object
      Returns:
      the user id or null for anonymous login
      Throws:
      LoginException - if the authentication failed
    • readOnlyMode

      protected boolean readOnlyMode()
      Indicates if the proxy should only forward read-only Browser binding requests. Default: false
      Returns:
      true if only read-only request should be forwarded, false for full access
    • getConnectTimeout

      protected int getConnectTimeout()
      Returns the connect timeout in milliseconds. Default: 30,000 milliseconds
    • getReadTimeout

      protected int getReadTimeout()
      Returns the read timeout in milliseconds. Default: 300,000 milliseconds