1 package org.apache.archiva.configuration;
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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
22 import java.io.Serializable;
23 import java.util.ArrayList;
24 import java.util.List;
27 * Class RepositoryGroupConfiguration.
29 * @version $Revision$ $Date$
31 @SuppressWarnings( "all" )
32 public class RepositoryGroupConfiguration
33 implements Serializable
36 //--------------------------/
37 //- Class/Member Variables -/
38 //--------------------------/
41 * The id of the repository group.
46 * The name of the repository group
52 * The repository type. Currently only MAVEN type
56 private String type = "MAVEN";
60 * The path of the merged index.
62 private String mergedIndexPath = ".indexer";
65 * The time to live of the merged index of the repository group.
67 private int mergedIndexTtl = 30;
71 * When to run the index merging for this group.
74 private String cronExpression = "";
79 private List<String> repositories;
82 * The path for local data
84 private String location;
93 * Return the local path for group data. If the merged index property is set to a non absolute path,
94 * it is relative to this location.
96 * @return the path for group data storage
98 public String getLocation( )
104 * Set the local path for group data
107 public void setLocation( String location )
109 this.location = location;
113 * Method addRepository.
117 public void addRepository( String string )
119 getRepositories().add( string );
120 } //-- void addRepository( String )
123 * Get when to run the index merging for this group.
128 public String getCronExpression()
130 return this.cronExpression;
131 } //-- String getCronExpression()
134 * Get the id of the repository group.
138 public String getId()
141 } //-- String getId()
144 * Get the path of the merged index.
148 public String getMergedIndexPath()
150 return this.mergedIndexPath;
151 } //-- String getMergedIndexPath()
154 * Get the time to live of the merged index of the repository
159 public int getMergedIndexTtl()
161 return this.mergedIndexTtl;
162 } //-- int getMergedIndexTtl()
165 * Method getRepositories.
169 public List<String> getRepositories()
171 if ( this.repositories == null )
173 this.repositories = new ArrayList<String>();
176 return this.repositories;
177 } //-- java.util.List<String> getRepositories()
180 * Method removeRepository.
184 public void removeRepository( String string )
186 getRepositories().remove( string );
187 } //-- void removeRepository( String )
190 * Set when to run the index merging for this group.
193 * @param cronExpression
195 public void setCronExpression( String cronExpression )
197 this.cronExpression = cronExpression;
198 } //-- void setCronExpression( String )
201 * Set the id of the repository group.
205 public void setId( String id )
208 } //-- void setId( String )
211 * Set the path of the merged index.
213 * @param mergedIndexPath
215 public void setMergedIndexPath( String mergedIndexPath )
217 this.mergedIndexPath = mergedIndexPath;
218 } //-- void setMergedIndexPath( String )
221 * Set the time to live of the merged index of the repository
224 * @param mergedIndexTtl
226 public void setMergedIndexTtl( int mergedIndexTtl )
228 this.mergedIndexTtl = mergedIndexTtl;
229 } //-- void setMergedIndexTtl( int )
232 * Set the list of repository ids under the group.
234 * @param repositories
236 public void setRepositories( List<String> repositories )
238 this.repositories = repositories;
239 } //-- void setRepositories( java.util.List )
241 public String getName() {
245 public void setName(String name) {
249 public String getType() {
253 public void setType(String type) {