"""Module contains class for storing information about CVEs from vendor Adobe."""

from cve_connector.vendor_cve.implementation.vendors_storage_structures.general_vendor import Vendor

from cve_connector.vendor_cve.implementation.utilities.check_correctness import is_correct_cve_id


class Adobe(Vendor):
    """
    Class for storing information about CVEs from vendor Adobe.
    """
    def __init__(self, cve='', severity='', impact='', vuln_cat='', published=None, priority='',
                 summary='', patch_available=False, description=''):
        super().__init__(cve=cve, published=published, patch=patch_available, desc=description)
        self.cve_id = cve
        self.severity = severity
        self.impact = impact
        self.vuln_category = vuln_cat

        self.published = published
        self.priority = priority
        self.description = summary

        self.patch_available = True

    def is_valid_entity(self):
        """
        Tests correctness of created instance of this class.

        :return: True if valid
        """
        return is_correct_cve_id(self.cve_id)
