1 package org.apache.maven.repository.proxy.repository;
4 * Copyright 2005-2006 The Apache Software Foundation.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 import org.apache.maven.artifact.repository.DefaultArtifactRepository;
20 import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
23 * Class to represent the Proxy repository. Currently does not provide additional methods from
24 * DefaultArtifactRepository but is expected to do so like enabled/disabled when a UI is present.
26 * @author Edwin Punzalan
28 public class ProxyRepository
29 extends DefaultArtifactRepository
31 // zero does not cache
32 private long cachePeriod = 0;
34 private boolean cacheFailures = false;
36 public ProxyRepository( String id, String url, ArtifactRepositoryLayout layout, boolean cacheFailures,
39 this( id, url, layout );
41 setCacheFailures( cacheFailures );
43 setCachePeriod( cachePeriod );
46 public ProxyRepository( String id, String url, ArtifactRepositoryLayout layout )
48 super( id, url, layout );
51 public long getCachePeriod()
56 public void setCachePeriod( long cachePeriod )
58 this.cachePeriod = cachePeriod;
61 public boolean isCacheFailures()
66 public void setCacheFailures( boolean cacheFailures )
68 this.cacheFailures = cacheFailures;