1 /* 2 Licensed to the Apache Software Foundation (ASF) under one 3 or more contributor license agreements. See the NOTICE file 4 distributed with this work for additional information 5 regarding copyright ownership. The ASF licenses this file 6 to you under the Apache License, Version 2.0 (the 7 "License"); you may not use this file except in compliance 8 with the License. You may obtain a copy of the License at 9 10 http://www.apache.org/licenses/LICENSE-2.0 11 12 Unless required by applicable law or agreed to in writing, 13 software distributed under the License is distributed on an 14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 KIND, either express or implied. See the License for the 16 specific language governing permissions and limitations 17 under the License. 18 =================== DO NOT EDIT THIS FILE ==================== 19 Generated by Modello 2.4.0, 20 any modifications will be overwritten. 21 ============================================================== 22 */ 23 24 package org.apache.maven.settings; 25 26 /** 27 * Download policy. 28 * 29 * @version $Revision$ $Date$ 30 */ 31 @SuppressWarnings( "all" ) 32 public class RepositoryPolicy 33 implements java.io.Serializable, java.lang.Cloneable 34 { 35 36 //--------------------------/ 37 //- Class/Member Variables -/ 38 //--------------------------/ 39 40 /** 41 * 42 * Whether to use this repository for downloading 43 * this type of 44 * artifact. 45 * 46 */ 47 private boolean enabled = true; 48 49 /** 50 * 51 * The frequency for downloading updates - can be 52 * "always", 53 * "daily" (default), "interval:XXX" (in minutes) 54 * or "never" 55 * (only if it doesn't exist locally). 56 * 57 */ 58 private String updatePolicy; 59 60 /** 61 * 62 * What to do when verification of an artifact 63 * checksum fails - 64 * warn, fail, etc. Valid values are "fail" or 65 * "warn". 66 * 67 */ 68 private String checksumPolicy; 69 70 71 //-----------/ 72 //- Methods -/ 73 //-----------/ 74 75 /** 76 * Method clone. 77 * 78 * @return RepositoryPolicy 79 */ 80 public RepositoryPolicy clone() 81 { 82 try 83 { 84 RepositoryPolicy copy = (RepositoryPolicy) super.clone(); 85 86 return copy; 87 } 88 catch ( java.lang.Exception ex ) 89 { 90 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() 91 + " does not support clone()" ).initCause( ex ); 92 } 93 } //-- RepositoryPolicy clone() 94 95 /** 96 * Get what to do when verification of an artifact checksum 97 * fails - 98 * warn, fail, etc. Valid values are "fail" or 99 * "warn". 100 * 101 * @return String 102 */ 103 public String getChecksumPolicy() 104 { 105 return this.checksumPolicy; 106 } //-- String getChecksumPolicy() 107 108 /** 109 * Get the frequency for downloading updates - can be "always", 110 * "daily" (default), "interval:XXX" (in minutes) 111 * or "never" 112 * (only if it doesn't exist locally). 113 * 114 * @return String 115 */ 116 public String getUpdatePolicy() 117 { 118 return this.updatePolicy; 119 } //-- String getUpdatePolicy() 120 121 /** 122 * Get whether to use this repository for downloading this type 123 * of 124 * artifact. 125 * 126 * @return boolean 127 */ 128 public boolean isEnabled() 129 { 130 return this.enabled; 131 } //-- boolean isEnabled() 132 133 /** 134 * Set what to do when verification of an artifact checksum 135 * fails - 136 * warn, fail, etc. Valid values are "fail" or 137 * "warn". 138 * 139 * @param checksumPolicy a checksumPolicy object. 140 */ 141 public void setChecksumPolicy( String checksumPolicy ) 142 { 143 this.checksumPolicy = checksumPolicy; 144 } //-- void setChecksumPolicy( String ) 145 146 /** 147 * Set whether to use this repository for downloading this type 148 * of 149 * artifact. 150 * 151 * @param enabled a enabled object. 152 */ 153 public void setEnabled( boolean enabled ) 154 { 155 this.enabled = enabled; 156 } //-- void setEnabled( boolean ) 157 158 /** 159 * Set the frequency for downloading updates - can be "always", 160 * "daily" (default), "interval:XXX" (in minutes) 161 * or "never" 162 * (only if it doesn't exist locally). 163 * 164 * @param updatePolicy a updatePolicy object. 165 */ 166 public void setUpdatePolicy( String updatePolicy ) 167 { 168 this.updatePolicy = updatePolicy; 169 } //-- void setUpdatePolicy( String ) 170 171 }