1 /* 2 * This file is part of dependency-check-core. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 * 16 * Copyright (c) 2015 Jeremy Long. All Rights Reserved. 17 */ 18 package org.owasp.dependencycheck.data.update.cpe; 19 20 import javax.annotation.concurrent.ThreadSafe; 21 import us.springett.parsers.cpe.Cpe; 22 23 /** 24 * A simple wrapper object that allows one to carry the ecosystem along with the 25 * CPE. 26 * 27 * @author Jeremy Long 28 */ 29 @ThreadSafe 30 public class CpePlus { 31 32 /** 33 * The CPE object. 34 */ 35 private Cpe cpe; 36 /** 37 * The ecosystem that to which the CPE belongs. 38 */ 39 private String ecosystem; 40 41 /** 42 * Construct a new CPE plus object. 43 * 44 * @param cpe the CPE 45 * @param ecosystem the ecosystem 46 */ 47 public CpePlus(Cpe cpe, String ecosystem) { 48 this.cpe = cpe; 49 this.ecosystem = ecosystem; 50 } 51 52 /** 53 * Get the value of ecosystem. 54 * 55 * @return the value of ecosystem 56 */ 57 public String getEcosystem() { 58 return ecosystem; 59 } 60 61 /** 62 * Set the value of ecosystem. 63 * 64 * @param ecosystem new value of ecosystem 65 */ 66 public void setEcosystem(String ecosystem) { 67 this.ecosystem = ecosystem; 68 } 69 70 /** 71 * Get the value of CPE. 72 * 73 * @return the value of CPE 74 */ 75 public Cpe getCpe() { 76 return cpe; 77 } 78 79 /** 80 * Set the value of CPE. 81 * 82 * @param cpe new value of CPE 83 */ 84 public void setCpe(Cpe cpe) { 85 this.cpe = cpe; 86 } 87 88 }