Coverage Report - org.owasp.dependencycheck.data.update.NvdCveInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
NvdCveInfo
100%
17/17
N/A
1
 
 1  
 /*
 2  
  * This file is part of dependency-check-core.
 3  
  *
 4  
  * Dependency-check-core is free software: you can redistribute it and/or modify it
 5  
  * under the terms of the GNU General Public License as published by the Free
 6  
  * Software Foundation, either version 3 of the License, or (at your option) any
 7  
  * later version.
 8  
  *
 9  
  * Dependency-check-core is distributed in the hope that it will be useful, but
 10  
  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  
  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 12  
  * details.
 13  
  *
 14  
  * You should have received a copy of the GNU General Public License along with
 15  
  * dependency-check-core. If not, see http://www.gnu.org/licenses/.
 16  
  *
 17  
  * Copyright (c) 2013 Jeremy Long. All Rights Reserved.
 18  
  */
 19  
 package org.owasp.dependencycheck.data.update;
 20  
 
 21  
 /**
 22  
  * A pojo that contains the Url and timestamp of the current NvdCve XML files.
 23  
  *
 24  
  * @author Jeremy Long (jeremy.long@owasp.org)
 25  
  */
 26  19
 public class NvdCveInfo {
 27  
 
 28  
     /**
 29  
      * an id.
 30  
      */
 31  
     private String id;
 32  
 
 33  
     /**
 34  
      * Get the value of id.
 35  
      *
 36  
      * @return the value of id
 37  
      */
 38  
     public String getId() {
 39  7
         return id;
 40  
     }
 41  
 
 42  
     /**
 43  
      * Set the value of id.
 44  
      *
 45  
      * @param id new value of id
 46  
      */
 47  
     public void setId(String id) {
 48  15
         this.id = id;
 49  15
     }
 50  
     /**
 51  
      * a url.
 52  
      */
 53  
     private String url;
 54  
 
 55  
     /**
 56  
      * Get the value of url.
 57  
      *
 58  
      * @return the value of url
 59  
      */
 60  
     public String getUrl() {
 61  3
         return url;
 62  
     }
 63  
 
 64  
     /**
 65  
      * Set the value of url.
 66  
      *
 67  
      * @param url new value of url
 68  
      */
 69  
     public void setUrl(String url) {
 70  14
         this.url = url;
 71  14
     }
 72  
     /**
 73  
      * The 1.2 schema URL.
 74  
      */
 75  
     private String oldSchemaVersionUrl;
 76  
 
 77  
     /**
 78  
      * Get the value of oldSchemaVersionUrl.
 79  
      *
 80  
      * @return the value of oldSchemaVersionUrl
 81  
      */
 82  
     public String getOldSchemaVersionUrl() {
 83  3
         return oldSchemaVersionUrl;
 84  
     }
 85  
 
 86  
     /**
 87  
      * Set the value of oldSchemaVersionUrl.
 88  
      *
 89  
      * @param oldSchemaVersionUrl new value of oldSchemaVersionUrl
 90  
      */
 91  
     public void setOldSchemaVersionUrl(String oldSchemaVersionUrl) {
 92  14
         this.oldSchemaVersionUrl = oldSchemaVersionUrl;
 93  14
     }
 94  
     /**
 95  
      * a timestamp - epoch time.
 96  
      */
 97  
     private long timestamp;
 98  
 
 99  
     /**
 100  
      * Get the value of timestamp - epoch time.
 101  
      *
 102  
      * @return the value of timestamp - epoch time
 103  
      */
 104  
     public long getTimestamp() {
 105  2
         return timestamp;
 106  
     }
 107  
 
 108  
     /**
 109  
      * Set the value of timestamp - epoch time.
 110  
      *
 111  
      * @param timestamp new value of timestamp - epoch time
 112  
      */
 113  
     public void setTimestamp(long timestamp) {
 114  15
         this.timestamp = timestamp;
 115  15
     }
 116  
     /**
 117  
      * indicates whether or not this item should be updated.
 118  
      */
 119  19
     private boolean needsUpdate = true;
 120  
 
 121  
     /**
 122  
      * Get the value of needsUpdate.
 123  
      *
 124  
      * @return the value of needsUpdate
 125  
      */
 126  
     public boolean getNeedsUpdate() {
 127  5
         return needsUpdate;
 128  
     }
 129  
 
 130  
     /**
 131  
      * Set the value of needsUpdate.
 132  
      *
 133  
      * @param needsUpdate new value of needsUpdate
 134  
      */
 135  
     public void setNeedsUpdate(boolean needsUpdate) {
 136  14
         this.needsUpdate = needsUpdate;
 137  14
     }
 138  
 }