further cleanup references to xwork user that no longer needs to be instantiated

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@756564 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2009-03-20 16:14:45 +00:00
parent bf34387459
commit 6681581426
5 changed files with 5 additions and 12 deletions

View File

@ -23,7 +23,6 @@ import org.apache.jackrabbit.webdav.DavException;
import org.apache.jackrabbit.webdav.DavServletRequest; import org.apache.jackrabbit.webdav.DavServletRequest;
import org.apache.jackrabbit.webdav.DavSessionProvider; import org.apache.jackrabbit.webdav.DavSessionProvider;
import org.apache.jackrabbit.webdav.WebdavRequest; import org.apache.jackrabbit.webdav.WebdavRequest;
import org.apache.maven.archiva.security.ArchivaXworkUser;
import org.apache.maven.archiva.security.ServletAuthenticator; import org.apache.maven.archiva.security.ServletAuthenticator;
import org.apache.maven.archiva.webdav.util.RepositoryPathUtil; import org.apache.maven.archiva.webdav.util.RepositoryPathUtil;
import org.apache.maven.archiva.webdav.util.WebdavMethodUtil; import org.apache.maven.archiva.webdav.util.WebdavMethodUtil;
@ -44,7 +43,7 @@ public class ArchivaDavSessionProvider
private HttpAuthenticator httpAuth; private HttpAuthenticator httpAuth;
public ArchivaDavSessionProvider( ServletAuthenticator servletAuth, HttpAuthenticator httpAuth, ArchivaXworkUser archivaXworkUser ) public ArchivaDavSessionProvider( ServletAuthenticator servletAuth, HttpAuthenticator httpAuth )
{ {
this.servletAuth = servletAuth; this.servletAuth = servletAuth;
this.httpAuth = httpAuth; this.httpAuth = httpAuth;

View File

@ -44,7 +44,6 @@ import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.configuration.ConfigurationEvent; import org.apache.maven.archiva.configuration.ConfigurationEvent;
import org.apache.maven.archiva.configuration.ConfigurationListener; import org.apache.maven.archiva.configuration.ConfigurationListener;
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.security.ArchivaXworkUser;
import org.apache.maven.archiva.security.ServletAuthenticator; import org.apache.maven.archiva.security.ServletAuthenticator;
import org.codehaus.plexus.spring.PlexusToSpringUtils; import org.codehaus.plexus.spring.PlexusToSpringUtils;
import org.codehaus.redback.integration.filter.authentication.HttpAuthenticator; import org.codehaus.redback.integration.filter.authentication.HttpAuthenticator;
@ -195,9 +194,7 @@ public class RepositoryServlet
HttpAuthenticator httpAuth = HttpAuthenticator httpAuth =
(HttpAuthenticator) wac.getBean( PlexusToSpringUtils.buildSpringId( HttpAuthenticator.ROLE, "basic" ) ); (HttpAuthenticator) wac.getBean( PlexusToSpringUtils.buildSpringId( HttpAuthenticator.ROLE, "basic" ) );
ArchivaXworkUser archivaXworkUser = sessionProvider = new ArchivaDavSessionProvider( servletAuth, httpAuth );
(ArchivaXworkUser) wac.getBean( PlexusToSpringUtils.buildSpringId( ArchivaXworkUser.class.getName() ) );
sessionProvider = new ArchivaDavSessionProvider( servletAuth, httpAuth, archivaXworkUser );
} }
public void configurationEvent( ConfigurationEvent event ) public void configurationEvent( ConfigurationEvent event )

View File

@ -62,7 +62,7 @@ public class ArchivaDavSessionProviderTest extends TestCase
throws Exception throws Exception
{ {
super.setUp(); super.setUp();
sessionProvider = new ArchivaDavSessionProvider(new ServletAuthenticatorMock(), new HttpAuthenticatorMock(), null); sessionProvider = new ArchivaDavSessionProvider( new ServletAuthenticatorMock(), new HttpAuthenticatorMock() );
request = new WebdavRequestImpl(new HttpServletRequestMock(), null); request = new WebdavRequestImpl(new HttpServletRequestMock(), null);
} }

View File

@ -33,7 +33,6 @@ import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.configuration.Configuration; import org.apache.maven.archiva.configuration.Configuration;
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.security.ArchivaRoleConstants; import org.apache.maven.archiva.security.ArchivaRoleConstants;
import org.apache.maven.archiva.security.ArchivaXworkUser;
import org.apache.maven.archiva.security.ServletAuthenticator; import org.apache.maven.archiva.security.ServletAuthenticator;
import org.codehaus.plexus.redback.authentication.AuthenticationException; import org.codehaus.plexus.redback.authentication.AuthenticationException;
import org.codehaus.plexus.redback.authentication.AuthenticationResult; import org.codehaus.plexus.redback.authentication.AuthenticationResult;
@ -123,9 +122,7 @@ public class RepositoryServletSecurityTest
httpAuthControl.setDefaultMatcher( MockControl.ALWAYS_MATCHER ); httpAuthControl.setDefaultMatcher( MockControl.ALWAYS_MATCHER );
httpAuth = (HttpAuthenticator) httpAuthControl.getMock(); httpAuth = (HttpAuthenticator) httpAuthControl.getMock();
ArchivaXworkUser archivaXworkUser = (ArchivaXworkUser) lookup( ArchivaXworkUser.class ); davSessionProvider = new ArchivaDavSessionProvider( servletAuth, httpAuth );
davSessionProvider = new ArchivaDavSessionProvider( servletAuth, httpAuth, archivaXworkUser );
} }
protected ManagedRepositoryConfiguration createManagedRepository( String id, String name, File location ) protected ManagedRepositoryConfiguration createManagedRepository( String id, String name, File location )

View File

@ -28,7 +28,7 @@ public class UnauthenticatedDavSessionProvider extends ArchivaDavSessionProvider
{ {
public UnauthenticatedDavSessionProvider() public UnauthenticatedDavSessionProvider()
{ {
super(null, null, null); super( null, null );
} }
@Override @Override