All Downloads are FREE. Search and download functionalities are using the official Maven repository.

us.springett.parsers.cpe.ICpe Maven / Gradle / Ivy

Go to download

A utility for validating and parsing Common Platform Enumeration (CPE) v2.2 and v2.3 as originally defined by MITRE and maintained by NIST.

The newest version!
/*
 * This file is part of CPE Parser.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Copyright (c) Steve Springett. All Rights Reserved.
 */
package us.springett.parsers.cpe;

import us.springett.parsers.cpe.values.Part;
import us.springett.parsers.cpe.exceptions.CpeEncodingException;

/**
 * Object representation of a Common Platform Enumeration (CPE).
 *
 * @author Jeremy Long
 */
public interface ICpe extends Comparable {

    /**
     * 

* Gets the part for the CPE entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the part for the CPE entry */ Part getPart(); /** *

* Gets the vendor for the CPE entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the vendor for the CPE entry */ String getVendor(); /** *

* Gets the product for the CPE entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the product for the CPE entry */ String getProduct(); /** *

* Gets the version for the CPE entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the version for the CPE entry */ String getVersion(); /** *

* Gets the update for the CPE entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the update for the CPE entry */ String getUpdate(); /** *

* Gets the edition for the CPE entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the edition for the CPE entry */ String getEdition(); /** *

* Gets the language for the CPE entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the language for the CPE entry */ String getLanguage(); /** *

* Gets the software edition for the CPE entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the software edition for the CPE entry */ String getSwEdition(); /** *

* Gets the target software environment for the CPE entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the target software environment for the CPE entry. */ String getTargetSw(); /** *

* Gets the target hardware environment for the CPE entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the target hardware environment for the CPE entry */ String getTargetHw(); /** *

* Gets the other component for the CPE entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the other component for the CPE entry */ String getOther(); /** *

* Gets the well formed formatted vendor for the CPE entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the vendor for the CPE entry */ String getWellFormedVendor(); /** *

* Gets the well formed formatted product for the CPE entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the product for the CPE entry */ String getWellFormedProduct(); /** *

* Gets the well formed formatted version for the CPE entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the version for the CPE entry */ String getWellFormedVersion(); /** *

* Gets the well formed formatted update for the CPE entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the update for the CPE entry */ String getWellFormedUpdate(); /** *

* Gets the well formed formatted edition for the CPE entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the edition for the CPE entry */ String getWellFormedEdition(); /** *

* Gets the well formed formatted language for the CPE entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the language for the CPE entry */ String getWellFormedLanguage(); /** *

* Gets the well formed formatted software edition for the CPE entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the software edition for the CPE entry */ String getWellFormedSwEdition(); /** *

* Gets the well formed formatted target software environment for the CPE * entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the target software environment for the CPE entry. */ String getWellFormedTargetSw(); /** *

* Gets the well formed formatted target hardware environment for the CPE * entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the target hardware environment for the CPE entry */ String getWellFormedTargetHw(); /** *

* Gets the well formed formatted other component for the CPE entry.

*
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
* * @return the other component for the CPE entry */ String getWellFormedOther(); /** * Converts the CPE into the CPE 2.2 URI format. * * @return the CPE 2.2 URI format of the CPE * @throws CpeEncodingException thrown if the CPE is not well formed */ String toCpe22Uri() throws CpeEncodingException; /** * Converts the CPE into the CPE 2.3 Formatted String. * * @return the CPE 2.3 Formatted String */ String toCpe23FS(); /** * Determines if the CPE matches the given target CPE. This does not follow * the CPE 2.3 Specification exactly as there are cases where undefined * comparisons will result in either true or false. For instance, 'ANY' will * match 'm+wild cards' and NA will return false when the target has 'm+wild * cards'. * * @param target the target CPE to evaluate * @return true if the CPE matches the target; otherwise * false */ boolean matches(ICpe target); /** * Determines if the target CPE matches the CPE. This does not follow the * CPE 2.3 Specification exactly as there are cases where undefined * comparisons will result in either true or false. For instance, 'ANY' will * match 'm+wild cards' and NA will return false when the target has 'm+wild * cards'. * * @param target the CPE to evaluate * @return true if the target CPE matches CPE; otherwise * false */ boolean matchedBy(ICpe target); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy