001 /* 002 =================== DO NOT EDIT THIS FILE ==================== 003 Generated by Modello 1.4.1 on 2012-01-20 18:15:43, 004 any modifications will be overwritten. 005 ============================================================== 006 */ 007 008 package org.apache.maven.settings; 009 010 /** 011 * Download policy. 012 * 013 * @version $Revision$ $Date$ 014 */ 015 @SuppressWarnings( "all" ) 016 public class RepositoryPolicy 017 implements java.io.Serializable, java.lang.Cloneable 018 { 019 020 //--------------------------/ 021 //- Class/Member Variables -/ 022 //--------------------------/ 023 024 /** 025 * 026 * Whether to use this repository for downloading 027 * this type of 028 * artifact. 029 * 030 */ 031 private boolean enabled = true; 032 033 /** 034 * 035 * The frequency for downloading updates - can be 036 * "always", 037 * "daily" (default), "interval:XXX" (in minutes) 038 * or "never" 039 * (only if it doesn't exist locally). 040 * 041 */ 042 private String updatePolicy; 043 044 /** 045 * 046 * What to do when verification of an artifact 047 * checksum fails - 048 * warn, fail, etc. Valid values are "fail" or 049 * "warn". 050 * 051 */ 052 private String checksumPolicy; 053 054 055 //-----------/ 056 //- Methods -/ 057 //-----------/ 058 059 /** 060 * Method clone. 061 * 062 * @return RepositoryPolicy 063 */ 064 public RepositoryPolicy clone() 065 { 066 try 067 { 068 RepositoryPolicy copy = (RepositoryPolicy) super.clone(); 069 070 return copy; 071 } 072 catch ( java.lang.Exception ex ) 073 { 074 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() 075 + " does not support clone()" ).initCause( ex ); 076 } 077 } //-- RepositoryPolicy clone() 078 079 /** 080 * Get what to do when verification of an artifact checksum 081 * fails - 082 * warn, fail, etc. Valid values are "fail" or 083 * "warn". 084 * 085 * @return String 086 */ 087 public String getChecksumPolicy() 088 { 089 return this.checksumPolicy; 090 } //-- String getChecksumPolicy() 091 092 /** 093 * Get the frequency for downloading updates - can be "always", 094 * "daily" (default), "interval:XXX" (in minutes) 095 * or "never" 096 * (only if it doesn't exist locally). 097 * 098 * @return String 099 */ 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 }