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

org.apache.maven.archiva.policies
Class PropagateErrorsDownloadPolicy

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

public class PropagateErrorsDownloadPolicy
extends java.lang.Object
implements DownloadErrorPolicy

PropagateErrorsPolicy - a policy applied on error to determine how to treat the error.


Field Summary
static java.lang.String IGNORE
          Ignore errors and treat as if it were not found.
static java.lang.String QUEUE
          Propagate errors at the end after all are gathered, if there was no successful download from other proxies.
static java.lang.String STOP
          Signifies any error should stop searching for other proxies.
 
Constructor Summary
PropagateErrorsDownloadPolicy()
           
 
Method Summary
 boolean applyPolicy(java.lang.String policySetting, java.util.Properties request, java.io.File localFile, java.lang.Exception exception, java.util.Map<java.lang.String,java.lang.Exception> previousExceptions)
          Apply the download error 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

STOP

public static final java.lang.String STOP
Signifies any error should stop searching for other proxies.

See Also:
Constant Field Values

QUEUE

public static final java.lang.String QUEUE
Propagate errors at the end after all are gathered, if there was no successful download from other proxies.

See Also:
Constant Field Values

IGNORE

public static final java.lang.String IGNORE
Ignore errors and treat as if it were not found.

See Also:
Constant Field Values
Constructor Detail

PropagateErrorsDownloadPolicy

public PropagateErrorsDownloadPolicy()
Method Detail

applyPolicy

public boolean applyPolicy(java.lang.String policySetting,
                           java.util.Properties request,
                           java.io.File localFile,
                           java.lang.Exception exception,
                           java.util.Map<java.lang.String,java.lang.Exception> previousExceptions)
                    throws PolicyConfigurationException
Description copied from interface: DownloadErrorPolicy
Apply the download error policy.

Specified by:
applyPolicy in interface DownloadErrorPolicy
Parameters:
policySetting - the policy setting.
request - the list of request properties that the policy might use.
exception - the exception that triggered the error
previousExceptions - any previously triggered exceptions
Returns:
whether to process the exception or not
Throws:
PolicyConfigurationException - if the policy is improperly configured

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.