Class DavexServletService

  • All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, SessionProvider, DavConstants

    @Service(javax.servlet.Servlet.class)
    @Property(name="service.description",value="Apache Jackrabbit JcrRemoting Servlet") @Property(name="authenticate-header",value="Basic realm=\"Jackrabbit Webdav Server\"") @Property(name="csrf-protection",value="disabled") @Property(name="missing-auth-mapping",value="") @Property(name="contextId",value="")
    @Reference(name="providers",
               referenceInterface=SessionProvider.class,
               policy=DYNAMIC,
               cardinality=OPTIONAL_MULTIPLE,
               bind="addSessionProvider",
               unbind="removeSessionProvider")
    public class DavexServletService
    extends JcrRemotingServlet
    implements SessionProvider
    See Also:
    Serialized Form
    • Constructor Detail

      • DavexServletService

        public DavexServletService()
    • Method Detail

      • activate

        @Activate
        public void activate​(Map<String,​?> config)
      • addSessionProvider

        public void addSessionProvider​(SessionProvider provider)
        Adds a custom session provider service.
        Parameters:
        provider - session provider
      • removeSessionProvider

        public void removeSessionProvider​(SessionProvider provider)
        Removes a custom session provider service. All active sessions acquired from that provider are forcibly released.
        Parameters:
        provider - session provider
      • getSession

        public Session getSession​(javax.servlet.http.HttpServletRequest request,
                                  Repository repository,
                                  String workspace)
                           throws LoginException,
                                  javax.servlet.ServletException,
                                  RepositoryException
        Asks each available session provider in order for a session and returns the first session given. The default provider is used if no custom provider service is available or can provide a requested session.
        Specified by:
        getSession in interface SessionProvider
        repository - the repository to login
        workspace - the workspace name
        Returns:
        the session or null
        Throws:
        LoginException - if the credentials are invalid
        javax.servlet.ServletException - if an error occurs
        RepositoryException
      • releaseSession

        public void releaseSession​(Session session)
        Releases the given session using the provider from which it was acquired.
        Specified by:
        releaseSession in interface SessionProvider