diff options
author | Olivier Lamy <olamy@apache.org> | 2013-04-21 13:22:26 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2013-04-21 13:22:26 +0000 |
commit | e0c2f0af78e7a4475e864db4b0f0cb3613fede97 (patch) | |
tree | 49773633208ab427fd4074c94fb16649015e73ca /archiva-modules/archiva-web | |
parent | f470e5f2faf81639d8770ae0e13e0250cd55cd7e (diff) | |
download | archiva-e0c2f0af78e7a4475e864db4b0f0cb3613fede97.tar.gz archiva-e0c2f0af78e7a4475e864db4b0f0cb3613fede97.zip |
[MRM-1745] path of merged index for group configurable
implement backend part
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1470295 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web')
-rw-r--r-- | archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java index 25fac26ad..bc72bccce 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java @@ -262,8 +262,8 @@ public class ArchivaDavResourceFactory // handle browse requests for virtual repos if ( RepositoryPathUtil.getLogicalResource( archivaLocator.getOrigResourcePath() ).endsWith( "/" ) ) { - return getResource( request, repoGroupConfig.getRepositories(), archivaLocator, - archivaLocator.getRepositoryId() ); + return getResourceFromGroup( request, repoGroupConfig.getRepositories(), archivaLocator, + repoGroupConfig ); } else { @@ -904,8 +904,9 @@ public class ArchivaDavResourceFactory } } - private DavResource getResource( DavServletRequest request, List<String> repositories, - ArchivaDavResourceLocator locator, String groupId ) + private DavResource getResourceFromGroup( DavServletRequest request, List<String> repositories, + ArchivaDavResourceLocator locator, + RepositoryGroupConfiguration repositoryGroupConfiguration ) throws DavException { List<File> mergedRepositoryContents = new ArrayList<File>(); @@ -930,9 +931,11 @@ public class ArchivaDavResourceFactory // remove last / String pathInfo = StringUtils.removeEnd( request.getPathInfo(), "/" ); - if ( StringUtils.endsWith( pathInfo, "/.indexer" ) ) + if ( StringUtils.endsWith( pathInfo, "/" + repositoryGroupConfiguration.getMergedIndexPath() ) + || StringUtils.endsWith( pathInfo, "/" + repositoryGroupConfiguration.getMergedIndexPath() + "/" ) ) { - File mergedRepoDir = buildMergedIndexDirectory( repositories, activePrincipal, request, groupId ); + File mergedRepoDir = buildMergedIndexDirectory( repositories, activePrincipal, request, + repositoryGroupConfiguration.getId() ); mergedRepositoryContents.add( mergedRepoDir ); } else |