import org.apache.archiva.policies.AbstractUpdatePolicy;
import org.apache.archiva.policies.CachedFailuresPolicy;
import org.apache.archiva.policies.ChecksumPolicy;
+import org.apache.archiva.policies.DownloadErrorPolicy;
import org.apache.archiva.policies.Policy;
import org.apache.archiva.policies.PostDownloadPolicy;
import org.apache.archiva.policies.PreDownloadPolicy;
*/
private Map<String, PostDownloadPolicy> postPolicies;
+ /**
+ * see #initialize
+ *
+ * @todo these don't strictly belong in here
+ */
+ private Map<String, DownloadErrorPolicy> downloadErrorPolicies;
+
+
/**
* see #initialize
* default-value="${user.home}/.m2/archiva.xml"
return policy;
}
+ policy = downloadErrorPolicies.get( policyId );
+ if ( policy != null )
+ {
+ return policy;
+ }
+
return null;
}
return false;
}
- return ( prePolicies.containsKey( policyId ) || postPolicies.containsKey( policyId ) );
+ return ( prePolicies.containsKey( policyId ) || postPolicies.containsKey( policyId )
+ || downloadErrorPolicies.containsKey( policyId ) );
}
private Registry readDefaultConfiguration()
this.postPolicies = componentContainer.buildMapWithRole( PostDownloadPolicy.class );
this.prePolicies = componentContainer.buildMapWithRole( PreDownloadPolicy.class );
+ this.downloadErrorPolicies = componentContainer.buildMapWithRole( DownloadErrorPolicy.class );
// Resolve expressions in the userConfigFilename and altConfigFilename
try
{