org.apache.archiva.policies
Class AbstractUpdatePolicy

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

public abstract class AbstractUpdatePolicy
extends Object
implements PreDownloadPolicy

AbstractUpdatePolicy


Field Summary
static String ALWAYS
          The ALWAYS policy setting means that the artifact is always uipdated from the remote repo.
static String DAILY
           The DAILY policy means that the artifact retrieval occurs only if one of the following conditions are met...
static String HOURLY
           The HOURLY policy means that the artifact retrieval occurs only if one of the following conditions are met...
private  org.slf4j.Logger log
           
static String NEVER
          The NEVER policy setting means that the artifact is never updated from the remote repo.
static String ONCE
          The ONCE policy means that the artifact retrieval occurs only if the local artifact is not present.
private  List<String> options
           
 
Constructor Summary
AbstractUpdatePolicy()
           
 
Method Summary
 void applyPolicy(String policySetting, Properties request, File localFile)
          Apply the download policy.
 List<String> getOptions()
          Get the list of options for this policy.
protected abstract  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.archiva.policies.Policy
getDefaultOption, getId, getName
 

Field Detail

log

private org.slf4j.Logger log

ALWAYS

public static final 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 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 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 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 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

options

private List<String> options
Constructor Detail

AbstractUpdatePolicy

public AbstractUpdatePolicy()
Method Detail

isSnapshotPolicy

protected abstract boolean isSnapshotPolicy()

getUpdateMode

protected abstract String getUpdateMode()

getOptions

public List<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(String policySetting,
                        Properties request,
                        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


Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.