View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 2.1.2,
3   // any modifications will be overwritten.
4   // ==============================================================
5   
6   package org.apache.maven.settings;
7   
8   /**
9    * Download policy.
10   * 
11   * @version $Revision$ $Date$
12   */
13  @SuppressWarnings( "all" )
14  public class RepositoryPolicy
15      implements java.io.Serializable, java.lang.Cloneable
16  {
17  
18        //--------------------------/
19       //- Class/Member Variables -/
20      //--------------------------/
21  
22      /**
23       * 
24       *             Whether to use this repository for downloading
25       * this type of
26       *             artifact.
27       *           
28       */
29      private boolean enabled = true;
30  
31      /**
32       * 
33       *             The frequency for downloading updates - can be
34       * "always",
35       *             "daily" (default), "interval:XXX" (in minutes)
36       * or "never"
37       *             (only if it doesn't exist locally).
38       *           
39       */
40      private String updatePolicy;
41  
42      /**
43       * 
44       *             What to do when verification of an artifact
45       * checksum fails -
46       *             warn, fail, etc. Valid values are "fail" or
47       * "warn".
48       *           
49       */
50      private String checksumPolicy;
51  
52  
53        //-----------/
54       //- Methods -/
55      //-----------/
56  
57      /**
58       * Method clone.
59       * 
60       * @return RepositoryPolicy
61       */
62      public RepositoryPolicy clone()
63      {
64          try
65          {
66              RepositoryPolicy copy = (RepositoryPolicy) super.clone();
67  
68              return copy;
69          }
70          catch ( java.lang.Exception ex )
71          {
72              throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
73                  + " does not support clone()" ).initCause( ex );
74          }
75      } //-- RepositoryPolicy clone()
76  
77      /**
78       * Get what to do when verification of an artifact checksum
79       * fails -
80       *             warn, fail, etc. Valid values are "fail" or
81       * "warn".
82       * 
83       * @return String
84       */
85      public String getChecksumPolicy()
86      {
87          return this.checksumPolicy;
88      } //-- String getChecksumPolicy()
89  
90      /**
91       * Get the frequency for downloading updates - can be "always",
92       *             "daily" (default), "interval:XXX" (in minutes)
93       * or "never"
94       *             (only if it doesn't exist locally).
95       * 
96       * @return String
97       */
98      public String getUpdatePolicy()
99      {
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 a checksumPolicy object.
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 a enabled object.
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 a updatePolicy object.
147      */
148     public void setUpdatePolicy( String updatePolicy )
149     {
150         this.updatePolicy = updatePolicy;
151     } //-- void setUpdatePolicy( String )
152 
153 }