# -------------------------------------------------------------------
# This file was auto-generated. Do not edit directly.
# Generated by: StageGeneratorV2
# -------------------------------------------------------------------

"""This module defines the Java Integration stage."""

from ibm_watsonx_data_integration.services.datastage.models.flow.dag import StageNode
from ibm_watsonx_data_integration.services.datastage.models.stage_models.java_integration import java_integration
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from ibm_watsonx_data_integration.services.datastage.models.flow.dag import DAG

# from ibm.datastage._framework.components.java_library import JavaLibrary


class JavaIntegrationStage(StageNode):
    """This class defines the Java Integration stage."""

    def __init__(self, dag: "DAG", configuration: java_integration = None, *, label: str = None) -> None:
        """Initializes an instance of a Java Integration stage."""
        super().__init__(dag, configuration=configuration, label=label)
        self.configuration: java_integration = configuration or java_integration()

    # def set_java_library(self, java_library: JavaLibrary):
    #    self.configuration.java_library = java_library
    #    self.configuration.asset_name = java_library.name
    #    self.configuration.classpath = (str(list(map(os.path.basename,
    #        [java_library.primary_file] +
    #        java_library.secondary_files)))
    #            .replace(",", ";").replace("'", "").replace(" ", "")[1:-1])
