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

org.apache.maven.archiva.policies
Class AbstractUpdatePolicy

Package class diagram package AbstractUpdatePolicy
java.lang.Object
  extended by org.apache.maven.archiva.policies.AbstractUpdatePolicy
All Implemented Interfaces:
DownloadPolicy, Policy, PreDownloadPolicy
Direct Known Subclasses:
ReleasesPolicy, SnapshotsPolicy

public abstract class AbstractUpdatePolicy
extends java.lang.Object
implements PreDownloadPolicy

AbstractUpdatePolicy


Field Summary
static java.lang.String ALWAYS
          The ALWAYS policy setting means that the artifact is always uipdated from the remote repo.
static java.lang.String DAILY
           The DAILY policy means that the artifact retrieval occurs only if one of the following conditions are met...
static java.lang.String HOURLY
           The HOURLY policy means that the artifact retrieval occurs only if one of the following conditions are met...
static java.lang.String NEVER
          The NEVER policy setting means that the artifact is never updated from the remote repo.
static java.lang.String ONCE
          The ONCE policy means that the artifact retrieval occurs only if the local artifact is not present.
 
Constructor Summary
AbstractUpdatePolicy()
           
 
Method Summary
 void applyPolicy(java.lang.String policySetting, java.util.Properties request, java.io.File localFile)
          Apply the download policy.
 java.util.List<java.lang.String> getOptions()
          Get the list of options for this policy.
protected abstract  java.lang.String getUpdateMode()
           
protected abstract  boolean isSnapshotPolicy()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.maven.archiva.policies.Policy
getDefaultOption, getId, getName
 

Field Detail

ALWAYS

public static final java.lang.String ALWAYS
The ALWAYS policy setting means that the artifact is always uipdated from the remote repo.

See Also:
Constant Field Values

NEVER

public static final java.lang.String NEVER
The NEVER policy setting means that the artifact is never updated from the remote repo.

See Also:
Constant Field Values

DAILY

public static final java.lang.String DAILY

The DAILY policy means that the artifact retrieval occurs only if one of the following conditions are met...

See Also:
Constant Field Values

HOURLY

public static final java.lang.String HOURLY

The HOURLY policy means that the artifact retrieval occurs only if one of the following conditions are met...

See Also:
Constant Field Values

ONCE

public static final java.lang.String ONCE
The ONCE policy means that the artifact retrieval occurs only if the local artifact is not present. This means that the retreival can only occur once.

See Also:
Constant Field Values
Constructor Detail

AbstractUpdatePolicy

public AbstractUpdatePolicy()
Method Detail

isSnapshotPolicy

protected abstract boolean isSnapshotPolicy()

getUpdateMode

protected abstract java.lang.String getUpdateMode()

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.

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