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 7.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  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.ContentAccessException;
  25. import org.apache.archiva.repository.ContentNotFoundException;
  26. import org.apache.archiva.repository.LayoutException;
  27. import org.apache.archiva.repository.ManagedRepository;
  28. import org.apache.archiva.repository.ManagedRepositoryContent;
  29. import org.apache.archiva.repository.content.Artifact;
  30. import org.apache.archiva.repository.content.ContentItem;
  31. import org.apache.archiva.repository.content.ItemNotFoundException;
  32. import org.apache.archiva.repository.content.ItemSelector;
  33. import org.apache.archiva.repository.content.Namespace;
  34. import org.apache.archiva.repository.content.Project;
  35. import org.apache.archiva.repository.content.Version;
  36. import org.apache.archiva.repository.storage.StorageAsset;
  37. import org.springframework.stereotype.Service;
  38. import java.nio.file.Path;
  39. import java.util.List;
  40. import java.util.stream.Stream;
  41. /**
  42. * @author Martin Stockhammer <martin_s@apache.org>
  43. */
  44. @Service("managedRepositoryContent#mock")
  45. public class ManagedRepositoryContentMock implements ManagedRepositoryContent
  46. {
  47. private ManagedRepository repository;
  48. @Override
  49. public VersionedReference toVersion( String groupId, String artifactId, String version )
  50. {
  51. return null;
  52. }
  53. @Override
  54. public VersionedReference toVersion( ArtifactReference artifactReference )
  55. {
  56. return null;
  57. }
  58. @Override
  59. public void deleteItem( ContentItem item ) throws ItemNotFoundException, ContentAccessException
  60. {
  61. }
  62. @Override
  63. public ContentItem getItem( ItemSelector selector ) throws ContentAccessException, IllegalArgumentException
  64. {
  65. return null;
  66. }
  67. @Override
  68. public Namespace getNamespace( ItemSelector namespaceSelector ) throws ContentAccessException, IllegalArgumentException
  69. {
  70. return null;
  71. }
  72. @Override
  73. public Project getProject( ItemSelector projectSelector ) throws ContentAccessException, IllegalArgumentException
  74. {
  75. return null;
  76. }
  77. @Override
  78. public void deleteVersion( VersionedReference reference ) throws ContentNotFoundException, ContentAccessException
  79. {
  80. }
  81. @Override
  82. public Version getVersion( ItemSelector versionCoordinates ) throws ContentAccessException, IllegalArgumentException
  83. {
  84. return null;
  85. }
  86. @Override
  87. public void deleteArtifact( ArtifactReference artifactReference ) throws ContentNotFoundException, ContentAccessException
  88. {
  89. }
  90. @Override
  91. public Artifact getArtifact( ItemSelector selector ) throws ContentAccessException
  92. {
  93. return null;
  94. }
  95. @Override
  96. public List<? extends Artifact> getArtifacts( ItemSelector selector ) throws ContentAccessException
  97. {
  98. return null;
  99. }
  100. @Override
  101. public Stream<? extends Artifact> newArtifactStream( ItemSelector selector ) throws ContentAccessException
  102. {
  103. return null;
  104. }
  105. @Override
  106. public List<? extends Project> getProjects( Namespace namespace ) throws ContentAccessException
  107. {
  108. return null;
  109. }
  110. @Override
  111. public List<? extends Project> getProjects( ItemSelector selector ) throws ContentAccessException, IllegalArgumentException
  112. {
  113. return null;
  114. }
  115. @Override
  116. public List<? extends Version> getVersions( Project project ) throws ContentAccessException
  117. {
  118. return null;
  119. }
  120. @Override
  121. public List<? extends Version> getVersions( ItemSelector selector ) throws ContentAccessException, IllegalArgumentException
  122. {
  123. return null;
  124. }
  125. @Override
  126. public List<? extends Artifact> getArtifacts( ContentItem item ) throws ContentAccessException
  127. {
  128. return null;
  129. }
  130. @Override
  131. public Stream<? extends Artifact> newArtifactStream( ContentItem item ) throws ContentAccessException
  132. {
  133. return null;
  134. }
  135. @Override
  136. public boolean hasContent( ItemSelector selector )
  137. {
  138. return false;
  139. }
  140. @Override
  141. public void addArtifact( Path sourceFile, Artifact destination ) throws IllegalArgumentException
  142. {
  143. }
  144. @Override
  145. public ContentItem toItem( String path ) throws LayoutException
  146. {
  147. return null;
  148. }
  149. @Override
  150. public ContentItem toItem( StorageAsset assetPath ) throws LayoutException
  151. {
  152. return null;
  153. }
  154. @Override
  155. public void deleteGroupId( String groupId ) throws ContentNotFoundException, ContentAccessException
  156. {
  157. }
  158. @Override
  159. public void deleteProject( String namespace, String projectId ) throws ContentNotFoundException, ContentAccessException
  160. {
  161. }
  162. @Override
  163. public void deleteProject( ProjectReference reference ) throws ContentNotFoundException, ContentAccessException
  164. {
  165. }
  166. @Override
  167. public String getId( )
  168. {
  169. return null;
  170. }
  171. @Override
  172. public List<ArtifactReference> getRelatedArtifacts( VersionedReference reference ) throws ContentNotFoundException, LayoutException, ContentAccessException
  173. {
  174. return null;
  175. }
  176. @Override
  177. public List<ArtifactReference> getArtifacts( VersionedReference reference ) throws ContentNotFoundException, LayoutException, ContentAccessException
  178. {
  179. return null;
  180. }
  181. @Override
  182. public String getRepoRoot( )
  183. {
  184. return null;
  185. }
  186. @Override
  187. public ManagedRepository getRepository( )
  188. {
  189. return repository;
  190. }
  191. @Override
  192. public boolean hasContent( ArtifactReference reference ) throws ContentAccessException
  193. {
  194. return false;
  195. }
  196. @Override
  197. public boolean hasContent( VersionedReference reference ) throws ContentAccessException
  198. {
  199. return false;
  200. }
  201. @Override
  202. public void setRepository( ManagedRepository repo )
  203. {
  204. this.repository = repo;
  205. }
  206. @Override
  207. public StorageAsset toFile( VersionedReference reference )
  208. {
  209. return null;
  210. }
  211. @Override
  212. public ArtifactReference toArtifactReference( String path ) throws LayoutException
  213. {
  214. return null;
  215. }
  216. @Override
  217. public StorageAsset toFile( ArtifactReference reference )
  218. {
  219. return null;
  220. }
  221. @Override
  222. public StorageAsset toFile( ArchivaArtifact reference )
  223. {
  224. return null;
  225. }
  226. @Override
  227. public String toMetadataPath( ProjectReference reference )
  228. {
  229. return null;
  230. }
  231. @Override
  232. public String toMetadataPath( VersionedReference reference )
  233. {
  234. return null;
  235. }
  236. @Override
  237. public String toPath( ArtifactReference reference )
  238. {
  239. return null;
  240. }
  241. @Override
  242. public String toPath( ItemSelector selector )
  243. {
  244. return null;
  245. }
  246. @Override
  247. public ItemSelector toItemSelector( String path ) throws LayoutException
  248. {
  249. return null;
  250. }
  251. @Override
  252. public String toPath( ArchivaArtifact reference )
  253. {
  254. return null;
  255. }
  256. }