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.

EditableRepository.java 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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.indexer.ArchivaIndexingContext;
  21. import java.net.URI;
  22. import java.util.Locale;
  23. /**
  24. * This is the editable part of a repository.
  25. * Normally a repository should also implement this interface but it is not
  26. * required.
  27. *
  28. * Capabilities and features are a integral part of the implementation and not
  29. * provided here by the interface.
  30. * Feature setting methods are provided by the features itself.
  31. *
  32. */
  33. public interface EditableRepository extends Repository
  34. {
  35. /**
  36. * Returns the primary locale used for setting the default values for
  37. * name and description.
  38. *
  39. * @return The locale used for name and description when they are not set
  40. */
  41. Locale getPrimaryLocale();
  42. /**
  43. * Sets the name for the given locale
  44. *
  45. * @param locale the locale for which the name is set
  46. * @param name The name value in the language that matches the locale
  47. */
  48. void setName( Locale locale, String name);
  49. /**
  50. * Sets the description for the given locale
  51. *
  52. * @param locale the locale for which the description is set
  53. * @param description The description in the language that matches the locale.
  54. */
  55. void setDescription(Locale locale, String description);
  56. /**
  57. * Sets the location of the repository. May be a URI that is suitable for the
  58. * repository implementation. Not all implementations will accept the same URI schemes.
  59. * @param location the location URI
  60. * @throws UnsupportedURIException if the URI scheme is not supported by the repository type.
  61. */
  62. void setLocation(URI location) throws UnsupportedURIException;
  63. /**
  64. * Sets the base uri for relative location uris.
  65. *
  66. * @param baseUri
  67. */
  68. void setBaseUri(URI baseUri);
  69. /**
  70. * Adds a failover location for the repository.
  71. *
  72. * @param location The location that should be used as failover.
  73. * @throws UnsupportedURIException if the URI scheme is not supported by the repository type.
  74. */
  75. void addFailoverLocation(URI location) throws UnsupportedURIException;
  76. /**
  77. * Removes a failover location from the set.
  78. *
  79. * @param location the location uri to remove
  80. */
  81. void removeFailoverLocation(URI location);
  82. /**
  83. * Clears the failover location set.
  84. */
  85. void clearFailoverLocations();
  86. /**
  87. * Sets the flag for scanning the repository. If true, the repository will be scanned.
  88. * You have to set the scheduling times, if you set this to true.
  89. *
  90. * @param scanned if true, the repository is scanned regulary.
  91. */
  92. void setScanned(boolean scanned);
  93. /**
  94. * Sets the scheduling definition, that defines the times, when the regular repository
  95. * jobs are started. The <code>cronExpression</code> must be a valid
  96. * quartz cron definition.
  97. *
  98. * @See http://www.quartz-scheduler.org/api/2.2.1/org/quartz/CronExpression.html
  99. *
  100. * @param cronExpression the cron expression.
  101. * @throws IllegalArgumentException if the cron expression is not valid.
  102. */
  103. void setSchedulingDefinition(String cronExpression) throws IllegalArgumentException;
  104. /**
  105. * Sets the layout string.
  106. * @param layout
  107. */
  108. void setLayout(String layout);
  109. /**
  110. * Sets the indexing context reference.
  111. * @param context
  112. */
  113. void setIndexingContext(ArchivaIndexingContext context);
  114. }