def METHOD_NAME(source, facts):
    """Detect if JBoss Web Server is present based on system facts.
    :param source: The raw json source of the facts
    :param facts: facts for a system
    :returns: dictionary defining the product presence
    """
    product_dict = {"name": PRODUCT}
    product_dict[PRESENCE_KEY] = Product.ABSENT
    metadata = {
        "server_id": source["server_id"],
        "source_name": source["source_name"],
        "source_type": source["source_type"],
    }
    subman_consumed = facts.get(SUBMAN_CONSUMED, [])
    installed_with_rpm = facts.get(JWS_INSTALLED_WITH_RPM)
    has_eula_file = facts.get(JWS_HAS_EULA_TXT_FILE)
    jws_has_cert = facts.get(JWS_HAS_CERT)
    tomcat_part_of_redhat = facts.get(TOMCAT_PART_OF_REDHAT_PRODUCT)
    version = get_version(facts.get(JWS_VERSION))
    product_dict[VERSION_KEY] = version
    raw_facts = {}
    # System is subscribed to jws repo, but may or may not have it installed
    if product_entitlement_found(subman_consumed, PRODUCT):
        product_dict[PRESENCE_KEY] = Product.POTENTIAL
        raw_facts[SUBMAN_CONSUMED] = subman_consumed
    # If JWS not installed with rpm, detect potential presence by the presence
    # of a JBossEULA file or tomcat server in JWS_HOME directory
    if tomcat_part_of_redhat:
        product_dict[PRESENCE_KEY] = Product.POTENTIAL
        raw_facts[TOMCAT_PART_OF_REDHAT_PRODUCT] = tomcat_part_of_redhat
    if has_eula_file:
        product_dict[PRESENCE_KEY] = Product.POTENTIAL
        raw_facts[JWS_HAS_EULA_TXT_FILE] = has_eula_file
    # Versions 3.0.0 and over explicitely mention 'JWS' in version string
    if version:
        raw_facts[JWS_VERSION] = facts.get(JWS_VERSION)
        for ver in version:
            if "EWS" not in ver:
                product_dict[PRESENCE_KEY] = Product.PRESENT
                break
            # Versions prior to 3.0.0 can only be detected by the presence of certain
            # EWS components and don't guarantee the installation of EWS
            product_dict[PRESENCE_KEY] = Product.POTENTIAL
            break
    if installed_with_rpm:
        product_dict[PRESENCE_KEY] = Product.PRESENT
        raw_facts[JWS_INSTALLED_WITH_RPM] = installed_with_rpm
    # If jws was installed (not as zip) it will have a certifcate
    # https://mojo.redhat.com/docs/DOC-103535
    # The cert may only be installed when a product is installed with RPM,
    # which we already check for. This step may be unnecessary.
    if jws_has_cert:
        product_dict[PRESENCE_KEY] = Product.PRESENT
        raw_facts[JWS_HAS_CERT] = jws_has_cert
    raw_facts = generate_raw_fact_members(raw_facts)
    metadata[RAW_FACT_KEY] = raw_facts
    product_dict[META_DATA_KEY] = metadata
    return product_dict