This project has retired. For details please refer to its Attic page.
CachedFailuresPolicy

org.apache.maven.archiva.policies
Class CachedFailuresPolicy

Package class diagram package CachedFailuresPolicy
java.lang.Object
  extended by org.apache.maven.archiva.policies.CachedFailuresPolicy
All Implemented Interfaces:
DownloadPolicy, Policy, PreDownloadPolicy

public class CachedFailuresPolicy
extends java.lang.Object
implements PreDownloadPolicy

PreDownloadPolicy to check if the requested url has failed before.


Field Summary
static java.lang.String NO
          The NO policy setting means that the the existence of old failures is not checked.
static java.lang.String YES
          The YES policy setting means that the existence of old failures is checked, and will prevent the request from being performed against the remote repo.
 
Constructor Summary
CachedFailuresPolicy()
           
 
Method Summary
 void applyPolicy(java.lang.String policySetting, java.util.Properties request, java.io.File localFile)
          Apply the download policy.
 java.lang.String getDefaultOption()
          Get the default option for this policy.
 java.lang.String getId()
          Get the id for this policy.
 java.lang.String getName()
          Get the display name for this policy.
 java.util.List<java.lang.String> getOptions()
          Get the list of options for this policy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO

public static final java.lang.String NO
The NO policy setting means that the the existence of old failures is not checked. All resource requests are allowed thru to the remote repo.

See Also:
Constant Field Values

YES

public static final java.lang.String YES
The YES policy setting means that the existence of old failures is checked, and will prevent the request from being performed against the remote repo.

See Also:
Constant Field Values
Constructor Detail

CachedFailuresPolicy

public CachedFailuresPolicy()
Method Detail

applyPolicy

public void applyPolicy(java.lang.String policySetting,
                        java.util.Properties request,
                        java.io.File localFile)
                 throws PolicyViolationException,
                        PolicyConfigurationException
Description copied from interface: DownloadPolicy
Apply the download policy.

Specified by:
applyPolicy in interface DownloadPolicy
Parameters:
policySetting - the policy setting.
request - the list of request properties that the policy might use.
Throws:
PolicyViolationException - if the policy has been violated.
PolicyConfigurationException

getDefaultOption

public java.lang.String getDefaultOption()
Description copied from interface: Policy
Get the default option for this policy.

Specified by:
getDefaultOption in interface Policy
Returns:
the default policy for this policy.

getId

public java.lang.String getId()
Description copied from interface: Policy
Get the id for this policy.

Specified by:
getId in interface Policy
Returns:
the id for this policy.

getName

public java.lang.String getName()
Description copied from interface: Policy
Get the display name for this policy.

Specified by:
getName in interface Policy
Returns:
the name for this policy

getOptions

public java.util.List<java.lang.String> getOptions()
Description copied from interface: Policy
Get the list of options for this policy.

Specified by:
getOptions in interface Policy
Returns:
the list of options for this policy.