Package org.eclipse.jgit.http.server.glue

Examples of org.eclipse.jgit.http.server.glue.ServletBinder


    }

    initialized = true;

    if (uploadPackFactory != UploadPackFactory.DISABLED) {
      ServletBinder b = serve("*/" + GitSmartHttpTools.UPLOAD_PACK);
      b = b.through(new UploadPackServlet.Factory(uploadPackFactory));
      for (Filter f : uploadPackFilters)
        b = b.through(f);
      b.with(new UploadPackServlet());
    }

    if (receivePackFactory != ReceivePackFactory.DISABLED) {
      ServletBinder b = serve("*/" + GitSmartHttpTools.RECEIVE_PACK);
      b = b.through(new ReceivePackServlet.Factory(receivePackFactory));
      for (Filter f : receivePackFilters)
        b = b.through(f);
      b.with(new ReceivePackServlet());
    }

    ServletBinder refs = serve("*/" + Constants.INFO_REFS);
    if (uploadPackFactory != UploadPackFactory.DISABLED) {
      refs = refs.through(new UploadPackServlet.InfoRefs(
          uploadPackFactory, uploadPackFilters));
    }
    if (receivePackFactory != ReceivePackFactory.DISABLED) {
      refs = refs.through(new ReceivePackServlet.InfoRefs(
          receivePackFactory, receivePackFilters));
    }
    if (asIs != AsIsFileService.DISABLED) {
      refs = refs.through(new IsLocalFilter());
      refs = refs.through(new AsIsFileFilter(asIs));
      refs.with(new InfoRefsServlet());
    } else
      refs.with(new ErrorServlet(HttpServletResponse.SC_FORBIDDEN));

    if (asIs != AsIsFileService.DISABLED) {
      final IsLocalFilter mustBeLocal = new IsLocalFilter();
      final AsIsFileFilter enabled = new AsIsFileFilter(asIs);

View Full Code Here


    if (receivePackFactory != ReceivePackFactory.DISABLED) {
      serve("*/git-receive-pack")//
          .with(new ReceivePackServlet(receivePackFactory));
    }

    ServletBinder refs = serve("*/" + Constants.INFO_REFS);
    if (uploadPackFactory != UploadPackFactory.DISABLED) {
      refs = refs.through(//
          new UploadPackServlet.InfoRefs(uploadPackFactory));
    }
    if (receivePackFactory != ReceivePackFactory.DISABLED) {
      refs = refs.through(//
          new ReceivePackServlet.InfoRefs(receivePackFactory));
    }
    if (asIs != AsIsFileService.DISABLED) {
      refs = refs.through(new IsLocalFilter());
      refs = refs.through(new AsIsFileFilter(asIs));
      refs.with(new InfoRefsServlet());
    } else
      refs.with(new ErrorServlet(HttpServletResponse.SC_FORBIDDEN));

    if (asIs != AsIsFileService.DISABLED) {
      final IsLocalFilter mustBeLocal = new IsLocalFilter();
      final AsIsFileFilter enabled = new AsIsFileFilter(asIs);

View Full Code Here

    }

    initialized = true;

    if (uploadPackFactory != UploadPackFactory.DISABLED) {
      ServletBinder b = serve("*/" + GitSmartHttpTools.UPLOAD_PACK);
      b = b.through(new UploadPackServlet.Factory(uploadPackFactory));
      for (Filter f : uploadPackFilters)
        b = b.through(f);
      b.with(new UploadPackServlet());
    }

    if (receivePackFactory != ReceivePackFactory.DISABLED) {
      ServletBinder b = serve("*/" + GitSmartHttpTools.RECEIVE_PACK);
      b = b.through(new ReceivePackServlet.Factory(receivePackFactory));
      for (Filter f : receivePackFilters)
        b = b.through(f);
      b.with(new ReceivePackServlet());
    }

    ServletBinder refs = serve("*/" + Constants.INFO_REFS);
    if (uploadPackFactory != UploadPackFactory.DISABLED) {
      refs = refs.through(new UploadPackServlet.InfoRefs(
          uploadPackFactory, uploadPackFilters));
    }
    if (receivePackFactory != ReceivePackFactory.DISABLED) {
      refs = refs.through(new ReceivePackServlet.InfoRefs(
          receivePackFactory, receivePackFilters));
    }
    if (asIs != AsIsFileService.DISABLED) {
      refs = refs.through(new IsLocalFilter());
      refs = refs.through(new AsIsFileFilter(asIs));
      refs.with(new InfoRefsServlet());
    } else
      refs.with(new ErrorServlet(HttpServletResponse.SC_NOT_ACCEPTABLE));

    if (asIs != AsIsFileService.DISABLED) {
      final IsLocalFilter mustBeLocal = new IsLocalFilter();
      final AsIsFileFilter enabled = new AsIsFileFilter(asIs);

View Full Code Here

TOP

Related Classes of org.eclipse.jgit.http.server.glue.ServletBinder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.