mirror of
				https://github.com/scm-manager/scm-manager.git
				synced 2025-10-31 10:35:56 +01:00 
			
		
		
		
	Inject repository from service provider
This commit is contained in:
		| @@ -58,13 +58,13 @@ public class SvnRepositoryServiceResolver implements RepositoryServiceResolver | ||||
|    * | ||||
|    * | ||||
|    * @param handler | ||||
|    * @param httpScmProtocol | ||||
|    * @param protocolWrapper | ||||
|    */ | ||||
|   @Inject | ||||
|   public SvnRepositoryServiceResolver(SvnRepositoryHandler handler, SvnScmProtocolProviderWrapper httpScmProtocol) | ||||
|   public SvnRepositoryServiceResolver(SvnRepositoryHandler handler, SvnScmProtocolProviderWrapper protocolWrapper) | ||||
|   { | ||||
|     this.handler = handler; | ||||
|     this.httpScmProtocol = httpScmProtocol; | ||||
|     this.protocolWrapper = protocolWrapper; | ||||
|   } | ||||
|  | ||||
|   //~--- methods -------------------------------------------------------------- | ||||
| @@ -84,7 +84,7 @@ public class SvnRepositoryServiceResolver implements RepositoryServiceResolver | ||||
|  | ||||
|     if (TYPE.equalsIgnoreCase(repository.getType())) | ||||
|     { | ||||
|       provider = new SvnRepositoryServiceProvider(handler, repository, httpScmProtocol); | ||||
|       provider = new SvnRepositoryServiceProvider(handler, repository, protocolWrapper.get(repository)); | ||||
|     } | ||||
|  | ||||
|     return provider; | ||||
| @@ -95,5 +95,5 @@ public class SvnRepositoryServiceResolver implements RepositoryServiceResolver | ||||
|   /** Field description */ | ||||
|   private SvnRepositoryHandler handler; | ||||
|  | ||||
|   private final HttpScmProtocol httpScmProtocol; | ||||
|   private final InitializingHttpScmProtocolWrapper protocolWrapper; | ||||
| } | ||||
|   | ||||
| @@ -45,7 +45,6 @@ import sonia.scm.repository.Repository; | ||||
| import sonia.scm.repository.RepositoryProvider; | ||||
| import sonia.scm.repository.RepositoryRequestListenerUtil; | ||||
| import sonia.scm.repository.SvnRepositoryHandler; | ||||
| import sonia.scm.repository.spi.HttpScmProtocol; | ||||
| import sonia.scm.util.AssertUtil; | ||||
| import sonia.scm.util.HttpUtil; | ||||
|  | ||||
| @@ -63,7 +62,7 @@ import java.io.IOException; | ||||
|  * @author Sebastian Sdorra | ||||
|  */ | ||||
| @Singleton | ||||
| public class SvnDAVServlet extends DAVServlet implements HttpScmProtocol | ||||
| public class SvnDAVServlet extends DAVServlet | ||||
| { | ||||
|  | ||||
|   /** Field description */ | ||||
| @@ -285,7 +284,7 @@ public class SvnDAVServlet extends DAVServlet implements HttpScmProtocol | ||||
|     private final RepositoryProvider repositoryProvider; | ||||
|   } | ||||
|  | ||||
|   @Override | ||||
| //  @Override | ||||
|   public void serve(HttpServletRequest request, HttpServletResponse response, ServletConfig config) throws ServletException, IOException { | ||||
|     service(request, response); | ||||
|   } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user