RepositoryPolicy.java
// =================== DO NOT EDIT THIS FILE ====================
// Generated by Modello 1.9.1,
// any modifications will be overwritten.
// ==============================================================
package org.apache.maven.model;
/**
* Download policy.
*
* @version $Revision$ $Date$
*/
@SuppressWarnings( "all" )
public class RepositoryPolicy
implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker
{
//--------------------------/
//- Class/Member Variables -/
//--------------------------/
/**
*
*
* Whether to use this repository for downloading
* this type of artifact. Note: While the type
* of this field is <code>String</code> for
* technical reasons, the semantic type is actually
* <code>Boolean</code>. Default value is
* <code>true</code>.
*
*
*/
private String enabled;
/**
*
*
* The frequency for downloading updates - can be
* <code>always,</code>
* <code>daily</code>
* (default),
* <code>interval:XXX</code>
* (in minutes) or
* <code>never</code>
* (only if it doesn't exist locally).
*
*
*/
private String updatePolicy;
/**
*
*
* What to do when verification of an artifact
* checksum fails. Valid values are
* <code>ignore</code>
* ,
* <code>fail</code>
* or
* <code>warn</code>
* (the default).
*
*
*/
private String checksumPolicy;
/**
* Field locations.
*/
private java.util.Map<Object, InputLocation> locations;
//-----------/
//- Methods -/
//-----------/
/**
* Method clone.
*
* @return RepositoryPolicy
*/
public RepositoryPolicy clone()
{
try
{
RepositoryPolicy copy = (RepositoryPolicy) super.clone();
if ( copy.locations != null )
{
copy.locations = new java.util.LinkedHashMap( copy.locations );
}
return copy;
}
catch ( java.lang.Exception ex )
{
throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
+ " does not support clone()" ).initCause( ex );
}
} //-- RepositoryPolicy clone()
/**
* Get what to do when verification of an artifact checksum
* fails. Valid values are
* <code>ignore</code>
* ,
* <code>fail</code>
* or
* <code>warn</code>
* (the default).
*
* @return String
*/
public String getChecksumPolicy()
{
return this.checksumPolicy;
} //-- String getChecksumPolicy()
/**
* Get whether to use this repository for downloading this type
* of artifact. Note: While the type
* of this field is <code>String</code> for
* technical reasons, the semantic type is actually
* <code>Boolean</code>. Default value is
* <code>true</code>.
*
* @return String
*/
public String getEnabled()
{
return this.enabled;
} //-- String getEnabled()
/**
*
*
* @param key
* @return InputLocation
*/
public InputLocation getLocation( Object key )
{
return ( locations != null ) ? locations.get( key ) : null;
} //-- InputLocation getLocation( Object )
/**
* Get the frequency for downloading updates - can be
* <code>always,</code>
* <code>daily</code>
* (default),
* <code>interval:XXX</code>
* (in minutes) or
* <code>never</code>
* (only if it doesn't exist locally).
*
* @return String
*/
public String getUpdatePolicy()
{
return this.updatePolicy;
} //-- String getUpdatePolicy()
/**
* Set what to do when verification of an artifact checksum
* fails. Valid values are
* <code>ignore</code>
* ,
* <code>fail</code>
* or
* <code>warn</code>
* (the default).
*
* @param checksumPolicy
*/
public void setChecksumPolicy( String checksumPolicy )
{
this.checksumPolicy = checksumPolicy;
} //-- void setChecksumPolicy( String )
/**
* Set whether to use this repository for downloading this type
* of artifact. Note: While the type
* of this field is <code>String</code> for
* technical reasons, the semantic type is actually
* <code>Boolean</code>. Default value is
* <code>true</code>.
*
* @param enabled
*/
public void setEnabled( String enabled )
{
this.enabled = enabled;
} //-- void setEnabled( String )
/**
*
*
* @param key
* @param location
*/
public void setLocation( Object key, InputLocation location )
{
if ( location != null )
{
if ( this.locations == null )
{
this.locations = new java.util.LinkedHashMap<Object, InputLocation>();
}
this.locations.put( key, location );
}
} //-- void setLocation( Object, InputLocation )
/**
* Set the frequency for downloading updates - can be
* <code>always,</code>
* <code>daily</code>
* (default),
* <code>interval:XXX</code>
* (in minutes) or
* <code>never</code>
* (only if it doesn't exist locally).
*
* @param updatePolicy
*/
public void setUpdatePolicy( String updatePolicy )
{
this.updatePolicy = updatePolicy;
} //-- void setUpdatePolicy( String )
public boolean isEnabled()
{
return ( enabled != null ) ? Boolean.parseBoolean( enabled ) : true;
}
public void setEnabled( boolean enabled )
{
this.enabled = String.valueOf( enabled );
}
}