001 // =================== DO NOT EDIT THIS FILE ====================
002 // Generated by Modello 1.7,
003 // any modifications will be overwritten.
004 // ==============================================================
005
006 package org.apache.maven.settings;
007
008 /**
009 * Download policy.
010 *
011 * @version $Revision$ $Date$
012 */
013 @SuppressWarnings( "all" )
014 public class RepositoryPolicy
015 implements java.io.Serializable, java.lang.Cloneable
016 {
017
018 //--------------------------/
019 //- Class/Member Variables -/
020 //--------------------------/
021
022 /**
023 *
024 * Whether to use this repository for downloading
025 * this type of
026 * artifact.
027 *
028 */
029 private boolean enabled = true;
030
031 /**
032 *
033 * The frequency for downloading updates - can be
034 * "always",
035 * "daily" (default), "interval:XXX" (in minutes)
036 * or "never"
037 * (only if it doesn't exist locally).
038 *
039 */
040 private String updatePolicy;
041
042 /**
043 *
044 * What to do when verification of an artifact
045 * checksum fails -
046 * warn, fail, etc. Valid values are "fail" or
047 * "warn".
048 *
049 */
050 private String checksumPolicy;
051
052
053 //-----------/
054 //- Methods -/
055 //-----------/
056
057 /**
058 * Method clone.
059 *
060 * @return RepositoryPolicy
061 */
062 public RepositoryPolicy clone()
063 {
064 try
065 {
066 RepositoryPolicy copy = (RepositoryPolicy) super.clone();
067
068 return copy;
069 }
070 catch ( java.lang.Exception ex )
071 {
072 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
073 + " does not support clone()" ).initCause( ex );
074 }
075 } //-- RepositoryPolicy clone()
076
077 /**
078 * Get what to do when verification of an artifact checksum
079 * fails -
080 * warn, fail, etc. Valid values are "fail" or
081 * "warn".
082 *
083 * @return String
084 */
085 public String getChecksumPolicy()
086 {
087 return this.checksumPolicy;
088 } //-- String getChecksumPolicy()
089
090 /**
091 * Get the frequency for downloading updates - can be "always",
092 * "daily" (default), "interval:XXX" (in minutes)
093 * or "never"
094 * (only if it doesn't exist locally).
095 *
096 * @return String
097 */
098 public String getUpdatePolicy()
099 {
100 return this.updatePolicy;
101 } //-- String getUpdatePolicy()
102
103 /**
104 * Get whether to use this repository for downloading this type
105 * of
106 * artifact.
107 *
108 * @return boolean
109 */
110 public boolean isEnabled()
111 {
112 return this.enabled;
113 } //-- boolean isEnabled()
114
115 /**
116 * Set what to do when verification of an artifact checksum
117 * fails -
118 * warn, fail, etc. Valid values are "fail" or
119 * "warn".
120 *
121 * @param checksumPolicy
122 */
123 public void setChecksumPolicy( String checksumPolicy )
124 {
125 this.checksumPolicy = checksumPolicy;
126 } //-- void setChecksumPolicy( String )
127
128 /**
129 * Set whether to use this repository for downloading this type
130 * of
131 * artifact.
132 *
133 * @param enabled
134 */
135 public void setEnabled( boolean enabled )
136 {
137 this.enabled = enabled;
138 } //-- void setEnabled( boolean )
139
140 /**
141 * Set the frequency for downloading updates - can be "always",
142 * "daily" (default), "interval:XXX" (in minutes)
143 * or "never"
144 * (only if it doesn't exist locally).
145 *
146 * @param updatePolicy
147 */
148 public void setUpdatePolicy( String updatePolicy )
149 {
150 this.updatePolicy = updatePolicy;
151 } //-- void setUpdatePolicy( String )
152
153 }