This project has retired. For details please refer to its Attic page.
EditableRepository xref
View Javadoc
1   package org.apache.archiva.repository;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *  http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import org.apache.archiva.indexer.ArchivaIndexingContext;
23  
24  import java.net.URI;
25  import java.util.Locale;
26  
27  /**
28   * This is the editable part of a repository.
29   * Normally a repository should also implement this interface but it is not
30   * required.
31   *
32   * Capabilities and features are a integral part of the implementation and not
33   * provided here by the interface.
34   * Feature setting methods are provided by the features itself.
35   *
36   */
37  public interface EditableRepository extends Repository
38  {
39  
40      /**
41       * Returns the primary locale used for setting the default values for
42       * name and description.
43       *
44       * @return The locale used for name and description when they are not set
45       */
46      Locale getPrimaryLocale();
47  
48      /**
49       * Sets the name for the given locale
50       *
51       * @param locale the locale for which the name is set
52       * @param name The name value in the language that matches the locale
53       */
54      void setName( Locale locale, String name);
55  
56      /**
57       * Sets the description for the given locale
58       *
59       * @param locale the locale for which the description is set
60       * @param description The description in the language that matches the locale.
61       */
62      void setDescription(Locale locale, String description);
63  
64      /**
65       * Sets the location of the repository. May be a URI that is suitable for the
66       * repository implementation. Not all implementations will accept the same URI schemes.
67       * @param location the location URI
68       * @throws UnsupportedURIException if the URI scheme is not supported by the repository type.
69       */
70      void setLocation(URI location) throws UnsupportedURIException;
71  
72      /**
73       * Sets the base uri for relative location uris.
74       *
75       * @param baseUri
76       */
77      void setBaseUri(URI baseUri);
78  
79      /**
80       * Adds a failover location for the repository.
81       *
82       * @param location The location that should be used as failover.
83       * @throws UnsupportedURIException if the URI scheme is not supported by the repository type.
84       */
85      void addFailoverLocation(URI location) throws UnsupportedURIException;
86  
87      /**
88       * Removes a failover location from the set.
89       *
90       * @param location the location uri to remove
91       */
92      void removeFailoverLocation(URI location);
93  
94      /**
95       * Clears the failover location set.
96       */
97      void clearFailoverLocations();
98  
99      /**
100      * Sets the flag for scanning the repository. If true, the repository will be scanned.
101      * You have to set the scheduling times, if you set this to true.
102      *
103      * @param scanned if true, the repository is scanned regulary.
104      */
105     void setScanned(boolean scanned);
106 
107     /**
108      * Sets the scheduling definition, that defines the times, when the regular repository
109      * jobs are started. The <code>cronExpression</code> must be a valid
110      * quartz cron definition.
111      *
112      * @See http://www.quartz-scheduler.org/api/2.2.1/org/quartz/CronExpression.html
113      *
114      * @param cronExpression the cron expression.
115      * @throws IllegalArgumentException if the cron expression is not valid.
116      */
117     void setSchedulingDefinition(String cronExpression) throws IllegalArgumentException;
118 
119     /**
120      * Sets the layout string.
121      * @param layout
122      */
123     void setLayout(String layout);
124 
125     /**
126      * Sets the indexing context reference.
127      * @param context
128      */
129     void setIndexingContext(ArchivaIndexingContext context);
130 
131 
132 }