aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-policies
diff options
context:
space:
mode:
authorEric Barboni <skygo@apache.org>2014-04-11 23:46:35 +0200
committerEric Barboni <skygo@apache.org>2014-04-11 23:46:35 +0200
commit99117364be2b27ddb74fc6ffe3e052e0ad52d8dd (patch)
tree5aa6ee887b1cf3c1659f83b7c561a728c0ee4555 /archiva-modules/archiva-base/archiva-policies
parentd44d957734badacce74293846d11b3b736b9a478 (diff)
downloadarchiva-99117364be2b27ddb74fc6ffe3e052e0ad52d8dd.tar.gz
archiva-99117364be2b27ddb74fc6ffe3e052e0ad52d8dd.zip
one move for all remaining override annotation
Diffstat (limited to 'archiva-modules/archiva-base/archiva-policies')
-rw-r--r--archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/AbstractUpdatePolicy.java2
-rw-r--r--archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/CachedFailuresPolicy.java5
-rw-r--r--archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/ChecksumPolicy.java5
-rw-r--r--archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/PropagateErrorsDownloadPolicy.java5
-rw-r--r--archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/PropagateErrorsOnUpdateDownloadPolicy.java5
-rw-r--r--archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/ReleasesPolicy.java5
-rw-r--r--archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/SnapshotsPolicy.java5
-rw-r--r--archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/urlcache/DefaultUrlFailureCache.java2
8 files changed, 34 insertions, 0 deletions
diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/AbstractUpdatePolicy.java b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/AbstractUpdatePolicy.java
index 2c9b8477a..103c7a458 100644
--- a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/AbstractUpdatePolicy.java
+++ b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/AbstractUpdatePolicy.java
@@ -96,11 +96,13 @@ public abstract class AbstractUpdatePolicy
protected abstract String getUpdateMode();
+ @Override
public List<String> getOptions()
{
return options;
}
+ @Override
public void applyPolicy( String policySetting, Properties request, File localFile )
throws PolicyViolationException, PolicyConfigurationException
{
diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/CachedFailuresPolicy.java b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/CachedFailuresPolicy.java
index 6976c45b5..62e76a4d6 100644
--- a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/CachedFailuresPolicy.java
+++ b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/CachedFailuresPolicy.java
@@ -63,6 +63,7 @@ public class CachedFailuresPolicy
options.add( YES );
}
+ @Override
public void applyPolicy( String policySetting, Properties request, File localFile )
throws PolicyViolationException, PolicyConfigurationException
{
@@ -95,21 +96,25 @@ public class CachedFailuresPolicy
log.debug( "OK to fetch, check-failures detected no issues." );
}
+ @Override
public String getDefaultOption()
{
return NO;
}
+ @Override
public String getId()
{
return "cache-failures";
}
+ @Override
public String getName()
{
return "Cache failures";
}
+ @Override
public List<String> getOptions()
{
return options;
diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/ChecksumPolicy.java b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/ChecksumPolicy.java
index 878079e5b..00e37a839 100644
--- a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/ChecksumPolicy.java
+++ b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/ChecksumPolicy.java
@@ -75,6 +75,7 @@ public class ChecksumPolicy
options.add( IGNORE );
}
+ @Override
public void applyPolicy( String policySetting, Properties request, File localFile )
throws PolicyViolationException, PolicyConfigurationException
{
@@ -148,21 +149,25 @@ public class ChecksumPolicy
"Unable to process checksum policy of [" + policySetting + "], please file a bug report." );
}
+ @Override
public String getDefaultOption()
{
return FIX;
}
+ @Override
public String getId()
{
return "checksum";
}
+ @Override
public String getName()
{
return "Checksum";
}
+ @Override
public List<String> getOptions()
{
return options;
diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/PropagateErrorsDownloadPolicy.java b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/PropagateErrorsDownloadPolicy.java
index 32ac4dffb..5813cd5ae 100644
--- a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/PropagateErrorsDownloadPolicy.java
+++ b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/PropagateErrorsDownloadPolicy.java
@@ -63,6 +63,7 @@ public class PropagateErrorsDownloadPolicy
options.add( IGNORE );
}
+ @Override
public boolean applyPolicy( String policySetting, Properties request, File localFile, Exception exception,
Map<String, Exception> previousExceptions )
throws PolicyConfigurationException
@@ -98,21 +99,25 @@ public class PropagateErrorsDownloadPolicy
"Unable to process checksum policy of [" + policySetting + "], please file a bug report." );
}
+ @Override
public String getDefaultOption()
{
return QUEUE;
}
+ @Override
public String getId()
{
return "propagate-errors";
}
+ @Override
public String getName()
{
return "On remote error";
}
+ @Override
public List<String> getOptions()
{
return options;
diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/PropagateErrorsOnUpdateDownloadPolicy.java b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/PropagateErrorsOnUpdateDownloadPolicy.java
index 6b5c95cb9..14732f1ec 100644
--- a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/PropagateErrorsOnUpdateDownloadPolicy.java
+++ b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/PropagateErrorsOnUpdateDownloadPolicy.java
@@ -53,6 +53,7 @@ public class PropagateErrorsOnUpdateDownloadPolicy
options.add( NOT_PRESENT );
}
+ @Override
public boolean applyPolicy( String policySetting, Properties request, File localFile, Exception exception,
Map<String, Exception> previousExceptions )
throws PolicyConfigurationException
@@ -81,21 +82,25 @@ public class PropagateErrorsOnUpdateDownloadPolicy
"Unable to process checksum policy of [" + policySetting + "], please file a bug report." );
}
+ @Override
public String getDefaultOption()
{
return NOT_PRESENT;
}
+ @Override
public String getId()
{
return "propagate-errors-on-update";
}
+ @Override
public String getName()
{
return "Return error when";
}
+ @Override
public List<String> getOptions()
{
return options;
diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/ReleasesPolicy.java b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/ReleasesPolicy.java
index 0018bdcf9..e757918dd 100644
--- a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/ReleasesPolicy.java
+++ b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/ReleasesPolicy.java
@@ -35,26 +35,31 @@ public class ReleasesPolicy
/**
* Defaults to {@link AbstractUpdatePolicy#HOURLY}
*/
+ @Override
public String getDefaultOption()
{
return AbstractUpdatePolicy.HOURLY;
}
+ @Override
protected boolean isSnapshotPolicy()
{
return false;
}
+ @Override
protected String getUpdateMode()
{
return "releases";
}
+ @Override
public String getId()
{
return "releases";
}
+ @Override
public String getName()
{
return "Releases";
diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/SnapshotsPolicy.java b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/SnapshotsPolicy.java
index d1addb899..58f287ca3 100644
--- a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/SnapshotsPolicy.java
+++ b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/SnapshotsPolicy.java
@@ -35,26 +35,31 @@ public class SnapshotsPolicy
/**
* Defaults to {@link AbstractUpdatePolicy#HOURLY}
*/
+ @Override
public String getDefaultOption()
{
return AbstractUpdatePolicy.HOURLY;
}
+ @Override
protected boolean isSnapshotPolicy()
{
return true;
}
+ @Override
protected String getUpdateMode()
{
return "snapshots";
}
+ @Override
public String getId()
{
return "snapshots";
}
+ @Override
public String getName()
{
return "Snapshots";
diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/urlcache/DefaultUrlFailureCache.java b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/urlcache/DefaultUrlFailureCache.java
index 4b671411c..052b549fe 100644
--- a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/urlcache/DefaultUrlFailureCache.java
+++ b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/urlcache/DefaultUrlFailureCache.java
@@ -41,11 +41,13 @@ public class DefaultUrlFailureCache
this.urlCache = urlCache;
}
+ @Override
public void cacheFailure( String url )
{
urlCache.register( url, new Date() );
}
+ @Override
public boolean hasFailedBefore( String url )
{
if ( urlCache.hasKey( url ) )