View Javadoc

1   /*
2    =================== DO NOT EDIT THIS FILE ====================
3    Generated by Modello 1.4.1 on 2012-01-20 18:05:12,
4    any modifications will be overwritten.
5    ==============================================================
6    */
7   
8   package org.apache.maven.settings;
9   
10  /**
11   * Download policy.
12   * 
13   * @version $Revision$ $Date$
14   */
15  @SuppressWarnings( "all" )
16  public class RepositoryPolicy
17      implements java.io.Serializable, java.lang.Cloneable
18  {
19  
20        //--------------------------/
21       //- Class/Member Variables -/
22      //--------------------------/
23  
24      /**
25       * 
26       *             Whether to use this repository for downloading
27       * this type of
28       *             artifact.
29       *           
30       */
31      private boolean enabled = true;
32  
33      /**
34       * 
35       *             The frequency for downloading updates - can be
36       * "always",
37       *             "daily" (default), "interval:XXX" (in minutes)
38       * or "never"
39       *             (only if it doesn't exist locally).
40       *           
41       */
42      private String updatePolicy;
43  
44      /**
45       * 
46       *             What to do when verification of an artifact
47       * checksum fails -
48       *             warn, fail, etc. Valid values are "fail" or
49       * "warn".
50       *           
51       */
52      private String checksumPolicy;
53  
54  
55        //-----------/
56       //- Methods -/
57      //-----------/
58  
59      /**
60       * Method clone.
61       * 
62       * @return RepositoryPolicy
63       */
64      public RepositoryPolicy clone()
65      {
66          try
67          {
68              RepositoryPolicy copy = (RepositoryPolicy) super.clone();
69  
70              return copy;
71          }
72          catch ( java.lang.Exception ex )
73          {
74              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
75                  + " does not support clone()" ).initCause( ex );
76          }
77      } //-- RepositoryPolicy clone()
78  
79      /**
80       * Get what to do when verification of an artifact checksum
81       * fails -
82       *             warn, fail, etc. Valid values are "fail" or
83       * "warn".
84       * 
85       * @return String
86       */
87      public String getChecksumPolicy()
88      {
89          return this.checksumPolicy;
90      } //-- String getChecksumPolicy()
91  
92      /**
93       * Get the frequency for downloading updates - can be "always",
94       *             "daily" (default), "interval:XXX" (in minutes)
95       * or "never"
96       *             (only if it doesn't exist locally).
97       * 
98       * @return String
99       */
100     public String getUpdatePolicy()
101     {
102         return this.updatePolicy;
103     } //-- String getUpdatePolicy()
104 
105     /**
106      * Get whether to use this repository for downloading this type
107      * of
108      *             artifact.
109      * 
110      * @return boolean
111      */
112     public boolean isEnabled()
113     {
114         return this.enabled;
115     } //-- boolean isEnabled()
116 
117     /**
118      * Set what to do when verification of an artifact checksum
119      * fails -
120      *             warn, fail, etc. Valid values are "fail" or
121      * "warn".
122      * 
123      * @param checksumPolicy
124      */
125     public void setChecksumPolicy( String checksumPolicy )
126     {
127         this.checksumPolicy = checksumPolicy;
128     } //-- void setChecksumPolicy( String )
129 
130     /**
131      * Set whether to use this repository for downloading this type
132      * of
133      *             artifact.
134      * 
135      * @param enabled
136      */
137     public void setEnabled( boolean enabled )
138     {
139         this.enabled = enabled;
140     } //-- void setEnabled( boolean )
141 
142     /**
143      * Set the frequency for downloading updates - can be "always",
144      *             "daily" (default), "interval:XXX" (in minutes)
145      * or "never"
146      *             (only if it doesn't exist locally).
147      * 
148      * @param updatePolicy
149      */
150     public void setUpdatePolicy( String updatePolicy )
151     {
152         this.updatePolicy = updatePolicy;
153     } //-- void setUpdatePolicy( String )
154 
155 }