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.

ManagedRepositoryContentMock.java 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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.model.ArchivaArtifact;
  21. import org.apache.archiva.model.ArtifactReference;
  22. import org.apache.archiva.model.ProjectReference;
  23. import org.apache.archiva.model.VersionedReference;
  24. import org.apache.archiva.repository.ContentNotFoundException;
  25. import org.apache.archiva.repository.LayoutException;
  26. import org.apache.archiva.repository.ManagedRepository;
  27. import org.apache.archiva.repository.ManagedRepositoryContent;
  28. import org.apache.archiva.repository.RepositoryException;
  29. import org.apache.archiva.repository.storage.StorageAsset;
  30. import org.springframework.stereotype.Service;
  31. import java.util.Set;
  32. /**
  33. * @author Martin Stockhammer <martin_s@apache.org>
  34. */
  35. @Service("managedRepositoryContent#mock")
  36. public class ManagedRepositoryContentMock implements ManagedRepositoryContent
  37. {
  38. private ManagedRepository repository;
  39. @Override
  40. public void deleteVersion( VersionedReference reference ) throws ContentNotFoundException
  41. {
  42. }
  43. @Override
  44. public void deleteArtifact( ArtifactReference artifactReference ) throws ContentNotFoundException
  45. {
  46. }
  47. @Override
  48. public void deleteGroupId( String groupId ) throws ContentNotFoundException
  49. {
  50. }
  51. @Override
  52. public void deleteProject( String namespace, String projectId ) throws RepositoryException
  53. {
  54. }
  55. @Override
  56. public String getId( )
  57. {
  58. return null;
  59. }
  60. @Override
  61. public Set<ArtifactReference> getRelatedArtifacts( ArtifactReference reference ) throws ContentNotFoundException
  62. {
  63. return null;
  64. }
  65. @Override
  66. public String getRepoRoot( )
  67. {
  68. return null;
  69. }
  70. @Override
  71. public ManagedRepository getRepository( )
  72. {
  73. return repository;
  74. }
  75. @Override
  76. public Set<String> getVersions( ProjectReference reference ) throws ContentNotFoundException, LayoutException
  77. {
  78. return null;
  79. }
  80. @Override
  81. public Set<String> getVersions( VersionedReference reference ) throws ContentNotFoundException
  82. {
  83. return null;
  84. }
  85. @Override
  86. public boolean hasContent( ArtifactReference reference )
  87. {
  88. return false;
  89. }
  90. @Override
  91. public boolean hasContent( ProjectReference reference )
  92. {
  93. return false;
  94. }
  95. @Override
  96. public boolean hasContent( VersionedReference reference )
  97. {
  98. return false;
  99. }
  100. @Override
  101. public void setRepository( ManagedRepository repo )
  102. {
  103. this.repository = repo;
  104. }
  105. @Override
  106. public ArtifactReference toArtifactReference( String path ) throws LayoutException
  107. {
  108. return null;
  109. }
  110. @Override
  111. public StorageAsset toFile( ArtifactReference reference )
  112. {
  113. return null;
  114. }
  115. @Override
  116. public StorageAsset toFile( ArchivaArtifact reference )
  117. {
  118. return null;
  119. }
  120. @Override
  121. public String toMetadataPath( ProjectReference reference )
  122. {
  123. return null;
  124. }
  125. @Override
  126. public String toMetadataPath( VersionedReference reference )
  127. {
  128. return null;
  129. }
  130. @Override
  131. public String toPath( ArtifactReference reference )
  132. {
  133. return null;
  134. }
  135. @Override
  136. public String toPath( ArchivaArtifact reference )
  137. {
  138. return null;
  139. }
  140. }