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

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