Coverage Report - org.apache.maven.profiles.RepositoryPolicy
 
Classes in this File Line Coverage Branch Coverage Complexity
RepositoryPolicy
0%
0/15
N/A
1
 
 1  
 /*
 2  
  * $Id$
 3  
  */
 4  
 
 5  
 package org.apache.maven.profiles;
 6  
 
 7  
   //---------------------------------/
 8  
  //- Imported classes and packages -/
 9  
 //---------------------------------/
 10  
 
 11  
 import java.util.Date;
 12  
 
 13  
 /**
 14  
  * Download policy.
 15  
  * 
 16  
  * @version $Revision$ $Date$
 17  
  */
 18  0
 public class RepositoryPolicy implements java.io.Serializable {
 19  
 
 20  
 
 21  
       //--------------------------/
 22  
      //- Class/Member Variables -/
 23  
     //--------------------------/
 24  
 
 25  
     /**
 26  
      * Whether to use this repository for downloading this type of
 27  
      * artifact.
 28  
      */
 29  0
     private boolean enabled = true;
 30  
 
 31  
     /**
 32  
      * 
 33  
      *             The frequency for downloading updates - can be
 34  
      * "always", "daily" (default), "interval:XXX" (in minutes) or
 35  
      *             "never" (only if it doesn't exist locally).
 36  
      *           
 37  
      */
 38  
     private String updatePolicy;
 39  
 
 40  
     /**
 41  
      * What to do when verification of an artifact checksum fails -
 42  
      * warn, fail, etc. Valid values are
 43  
      *             "fail" or "warn".
 44  
      */
 45  
     private String checksumPolicy;
 46  
 
 47  
 
 48  
       //-----------/
 49  
      //- Methods -/
 50  
     //-----------/
 51  
 
 52  
     /**
 53  
      * Get what to do when verification of an artifact checksum
 54  
      * fails - warn, fail, etc. Valid values are
 55  
      *             "fail" or "warn".
 56  
      * 
 57  
      * @return String
 58  
      */
 59  
     public String getChecksumPolicy()
 60  
     {
 61  0
         return this.checksumPolicy;
 62  
     } //-- String getChecksumPolicy() 
 63  
 
 64  
     /**
 65  
      * Get 
 66  
      *             The frequency for downloading updates - can be
 67  
      * "always", "daily" (default), "interval:XXX" (in minutes) or
 68  
      *             "never" (only if it doesn't exist locally).
 69  
      *           
 70  
      * 
 71  
      * @return String
 72  
      */
 73  
     public String getUpdatePolicy()
 74  
     {
 75  0
         return this.updatePolicy;
 76  
     } //-- String getUpdatePolicy() 
 77  
 
 78  
     /**
 79  
      * Get whether to use this repository for downloading this type
 80  
      * of artifact.
 81  
      * 
 82  
      * @return boolean
 83  
      */
 84  
     public boolean isEnabled()
 85  
     {
 86  0
         return this.enabled;
 87  
     } //-- boolean isEnabled() 
 88  
 
 89  
     /**
 90  
      * Set what to do when verification of an artifact checksum
 91  
      * fails - warn, fail, etc. Valid values are
 92  
      *             "fail" or "warn".
 93  
      * 
 94  
      * @param checksumPolicy
 95  
      */
 96  
     public void setChecksumPolicy( String checksumPolicy )
 97  
     {
 98  0
         this.checksumPolicy = checksumPolicy;
 99  0
     } //-- void setChecksumPolicy( String ) 
 100  
 
 101  
     /**
 102  
      * Set whether to use this repository for downloading this type
 103  
      * of artifact.
 104  
      * 
 105  
      * @param enabled
 106  
      */
 107  
     public void setEnabled( boolean enabled )
 108  
     {
 109  0
         this.enabled = enabled;
 110  0
     } //-- void setEnabled( boolean ) 
 111  
 
 112  
     /**
 113  
      * Set 
 114  
      *             The frequency for downloading updates - can be
 115  
      * "always", "daily" (default), "interval:XXX" (in minutes) or
 116  
      *             "never" (only if it doesn't exist locally).
 117  
      *           
 118  
      * 
 119  
      * @param updatePolicy
 120  
      */
 121  
     public void setUpdatePolicy( String updatePolicy )
 122  
     {
 123  0
         this.updatePolicy = updatePolicy;
 124  0
     } //-- void setUpdatePolicy( String ) 
 125  
 
 126  
 
 127  0
     private String modelEncoding = "UTF-8";
 128  
 
 129  
     /**
 130  
      * Set an encoding used for reading/writing the model.
 131  
      *
 132  
      * @param modelEncoding the encoding used when reading/writing the model.
 133  
      */
 134  
     public void setModelEncoding( String modelEncoding )
 135  
     {
 136  0
         this.modelEncoding = modelEncoding;
 137  0
     }
 138  
 
 139  
     /**
 140  
      * @return the current encoding used when reading/writing this model.
 141  
      */
 142  
     public String getModelEncoding()
 143  
     {
 144  0
         return modelEncoding;
 145  
     }
 146  
 }