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.

RemoteRepositoryContent.java 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. package org.apache.archiva.repository;
  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.ArtifactReference;
  21. import org.apache.archiva.model.RepositoryURL;
  22. /**
  23. * RemoteRepositoryContent interface for interacting with a remote repository in an abstract way,
  24. * without the need for processing based on URLs, or working with the database.
  25. *
  26. *
  27. */
  28. public interface RemoteRepositoryContent extends RepositoryContent
  29. {
  30. /**
  31. * <p>
  32. * Convenience method to get the repository id.
  33. * </p>
  34. *
  35. * <p>
  36. * Equivalent to calling <code>.getRepository().getId()</code>
  37. * </p>
  38. *
  39. * @return the repository id.
  40. */
  41. String getId();
  42. /**
  43. * Get the repository configuration associated with this
  44. * repository content.
  45. *
  46. * @return the repository that is associated with this repository content.
  47. */
  48. RemoteRepository getRepository();
  49. /**
  50. * <p>
  51. * Convenience method to get the repository url.
  52. * </p>
  53. *
  54. * <p>
  55. * Equivalent to calling <code>new RepositoryURL( this.getRepository().getUrl() )</code>
  56. * </p>
  57. *
  58. * @return the repository url.
  59. */
  60. RepositoryURL getURL();
  61. /**
  62. * Set the repository configuration to associate with this
  63. * repository content.
  64. *
  65. * @param repo the repository to associate with this repository content.
  66. */
  67. void setRepository( RemoteRepository repo );
  68. /**
  69. * Given an ArtifactReference, return the url to the artifact.
  70. *
  71. * @param reference the artifact reference to use.
  72. * @return the relative path to the artifact.
  73. */
  74. RepositoryURL toURL( ArtifactReference reference );
  75. }