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

org.apache.maven.archiva.policies
Class PropagateErrorsOnUpdateDownloadPolicy

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

public class PropagateErrorsOnUpdateDownloadPolicy
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 ALWAYS
          Signifies any error should cause a failure whether the artifact is already present or not.
static java.lang.String NOT_PRESENT
          Signifies any error should cause a failure only if the artifact is not already present.
 
Constructor Summary
PropagateErrorsOnUpdateDownloadPolicy()
           
 
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

ALWAYS

public static final java.lang.String ALWAYS
Signifies any error should cause a failure whether the artifact is already present or not.

See Also:
Constant Field Values

NOT_PRESENT

public static final java.lang.String NOT_PRESENT
Signifies any error should cause a failure only if the artifact is not already present.

See Also:
Constant Field Values
Constructor Detail

PropagateErrorsOnUpdateDownloadPolicy

public PropagateErrorsOnUpdateDownloadPolicy()
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.