View Javadoc
1   package org.apache.archiva.configuration;
2   
3   import org.apache.archiva.redback.components.registry.RegistryException;
4   import org.apache.archiva.redback.components.registry.RegistryListener;
5   import org.springframework.stereotype.Service;
6   
7   /*
8    * Licensed to the Apache Software Foundation (ASF) under one
9    * or more contributor license agreements.  See the NOTICE file
10   * distributed with this work for additional information
11   * regarding copyright ownership.  The ASF licenses this file
12   * to you under the Apache License, Version 2.0 (the
13   * "License"); you may not use this file except in compliance
14   * with the License.  You may obtain a copy of the License at
15   *
16   *   http://www.apache.org/licenses/LICENSE-2.0
17   *
18   * Unless required by applicable law or agreed to in writing,
19   * software distributed under the License is distributed on an
20   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21   * KIND, either express or implied.  See the License for the
22   * specific language governing permissions and limitations
23   * under the License.
24   */
25  
26  @Service("archivaConfiguration#test")
27  public class TestConfiguration
28      implements ArchivaConfiguration
29  {
30      private Configuration configuration;
31  
32      @Override
33      public Configuration getConfiguration()
34      {
35          return configuration;
36      }
37  
38      @Override
39      public void save( Configuration configuration )
40          throws RegistryException, IndeterminateConfigurationException
41      {
42          this.configuration = configuration;
43      }
44  
45      @Override
46      public boolean isDefaulted()
47      {
48          return false;
49      }
50  
51      @Override
52      public void addListener( ConfigurationListener listener )
53      {
54          // no op
55      }
56  
57      @Override
58      public void removeListener( ConfigurationListener listener )
59      {
60          // no op
61      }
62  
63      @Override
64      public void addChangeListener( RegistryListener listener )
65      {
66          // no op
67      }
68  
69      @Override
70      public void removeChangeListener( RegistryListener listener )
71      {
72          // no op
73      }
74  
75      @Override
76      public void reload()
77      {
78          // no op
79      }
80  }