You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ArchivaIndexManagerMock.java 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. package org.apache.archiva.repository.mock;
  2. /*
  3. * Licensed to the Apache Software Foundation (ASF) under one
  4. * or more contributor license agreements. See the NOTICE file
  5. * distributed with this work for additional information
  6. * regarding copyright ownership. The ASF licenses this file
  7. * to you under the Apache License, Version 2.0 (the
  8. * "License"); you may not use this file except in compliance
  9. * with the License. You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing,
  14. * software distributed under the License is distributed on an
  15. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  16. * KIND, either express or implied. See the License for the
  17. * specific language governing permissions and limitations
  18. * under the License.
  19. */
  20. import org.apache.archiva.indexer.ArchivaIndexManager;
  21. import org.apache.archiva.indexer.ArchivaIndexingContext;
  22. import org.apache.archiva.indexer.IndexCreationFailedException;
  23. import org.apache.archiva.indexer.IndexUpdateFailedException;
  24. import org.apache.archiva.repository.Repository;
  25. import org.apache.archiva.repository.RepositoryType;
  26. import org.springframework.stereotype.Service;
  27. import java.net.URI;
  28. import java.util.Collection;
  29. import java.util.List;
  30. /**
  31. * @author Martin Stockhammer <martin_s@apache.org>
  32. */
  33. @Service("archivaIndexManager#maven")
  34. public class ArchivaIndexManagerMock implements ArchivaIndexManager {
  35. @Override
  36. public void pack(ArchivaIndexingContext context) throws IndexUpdateFailedException {
  37. }
  38. @Override
  39. public void scan(ArchivaIndexingContext context) throws IndexUpdateFailedException {
  40. }
  41. @Override
  42. public void update(ArchivaIndexingContext context, boolean fullUpdate) throws IndexUpdateFailedException {
  43. }
  44. @Override
  45. public void addArtifactsToIndex(ArchivaIndexingContext context, Collection<URI> artifactReference) throws IndexUpdateFailedException {
  46. }
  47. @Override
  48. public void removeArtifactsFromIndex(ArchivaIndexingContext context, Collection<URI> artifactReference) throws IndexUpdateFailedException {
  49. }
  50. @Override
  51. public boolean supportsRepository(RepositoryType type) {
  52. return true;
  53. }
  54. @Override
  55. public ArchivaIndexingContext createContext(Repository repository) throws IndexCreationFailedException {
  56. return null;
  57. }
  58. @Override
  59. public ArchivaIndexingContext reset(ArchivaIndexingContext context) throws IndexUpdateFailedException {
  60. return null;
  61. }
  62. @Override
  63. public ArchivaIndexingContext move(ArchivaIndexingContext context, Repository repo) throws IndexCreationFailedException {
  64. return null;
  65. }
  66. @Override
  67. public void updateLocalIndexPath(Repository repo) {
  68. }
  69. @Override
  70. public ArchivaIndexingContext mergeContexts(Repository destinationRepo, List<ArchivaIndexingContext> contexts, boolean packIndex) throws UnsupportedOperationException, IndexCreationFailedException {
  71. return null;
  72. }
  73. }