Class WildflyDriverProvider

  • All Implemented Interfaces:
    org.kie.workbench.common.screens.datasource.management.backend.core.DriverProvider

    @ApplicationScoped
    @Named("WildflyDriverProvider")
    public class WildflyDriverProvider
    extends Object
    implements org.kie.workbench.common.screens.datasource.management.backend.core.DriverProvider
    Wildly based implementation of a DriverProvider.
    • Constructor Summary

      Constructors 
      Constructor Description
      WildflyDriverProvider()  
      WildflyDriverProvider​(org.kie.workbench.common.screens.datasource.management.util.MavenArtifactResolver artifactResolver)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.kie.workbench.common.screens.datasource.management.model.DriverDeploymentInfo deploy​(org.kie.workbench.common.screens.datasource.management.model.DriverDef driverDef)
      Deploys a driver definition on the Wildfly server.
      org.kie.workbench.common.screens.datasource.management.model.DriverDeploymentInfo getDeploymentInfo​(String uuid)
      Gets the deployment information about a driver definition.
      List<org.kie.workbench.common.screens.datasource.management.model.DriverDef> getDeployments()
      Gets the list of driver definitions for the currently deployed drivers.
      List<org.kie.workbench.common.screens.datasource.management.model.DriverDeploymentInfo> getDeploymentsInfo()
      Gets the deployment information for all the drivers currently deployed on the Wildfly server.
      void hasStarted()  
      void loadConfig​(Properties properties)  
      org.kie.workbench.common.screens.datasource.management.model.DriverDeploymentInfo resync​(org.kie.workbench.common.screens.datasource.management.model.DriverDef driverDef, org.kie.workbench.common.screens.datasource.management.model.DriverDeploymentInfo deploymentInfo)  
      void setDriverMgmtClient​(WildflyDriverManagementClient driverMgmtClient)
      Intended for testing purposes.
      void undeploy​(org.kie.workbench.common.screens.datasource.management.model.DriverDeploymentInfo deploymentInfo)  
    • Constructor Detail

      • WildflyDriverProvider

        public WildflyDriverProvider()
      • WildflyDriverProvider

        @Inject
        public WildflyDriverProvider​(org.kie.workbench.common.screens.datasource.management.util.MavenArtifactResolver artifactResolver)
    • Method Detail

      • deploy

        public org.kie.workbench.common.screens.datasource.management.model.DriverDeploymentInfo deploy​(org.kie.workbench.common.screens.datasource.management.model.DriverDef driverDef)
                                                                                                 throws Exception
        Deploys a driver definition on the Wildfly server.
        Specified by:
        deploy in interface org.kie.workbench.common.screens.datasource.management.backend.core.DriverProvider
        Parameters:
        driverDef - A driver definition to be deployed.
        Returns:
        The deployment information for the just deployed driver.
        Throws:
        Exception - exceptions may be thrown if was not possible to deploy the driver.
      • resync

        public org.kie.workbench.common.screens.datasource.management.model.DriverDeploymentInfo resync​(org.kie.workbench.common.screens.datasource.management.model.DriverDef driverDef,
                                                                                                        org.kie.workbench.common.screens.datasource.management.model.DriverDeploymentInfo deploymentInfo)
                                                                                                 throws Exception
        Specified by:
        resync in interface org.kie.workbench.common.screens.datasource.management.backend.core.DriverProvider
        Throws:
        Exception
      • undeploy

        public void undeploy​(org.kie.workbench.common.screens.datasource.management.model.DriverDeploymentInfo deploymentInfo)
                      throws Exception
        Specified by:
        undeploy in interface org.kie.workbench.common.screens.datasource.management.backend.core.DriverProvider
        Throws:
        Exception
      • getDeploymentInfo

        public org.kie.workbench.common.screens.datasource.management.model.DriverDeploymentInfo getDeploymentInfo​(String uuid)
                                                                                                            throws Exception
        Gets the deployment information about a driver definition.
        Specified by:
        getDeploymentInfo in interface org.kie.workbench.common.screens.datasource.management.backend.core.DriverProvider
        Parameters:
        uuid - the driver definition identifier.
        Returns:
        the deployment information for the driver definition of null if the driver wasn't deployed.
        Throws:
        Exception - exceptions may be thrown if e.g. communication with the Wildfly server fails, etc.
      • getDeployments

        public List<org.kie.workbench.common.screens.datasource.management.model.DriverDef> getDeployments()
                                                                                                    throws Exception
        Gets the list of driver definitions for the currently deployed drivers.
        Returns:
        list with the definitions for the deployed drivers.
        Throws:
        Exception - exceptions may be thrown if e.g. communication with the Wildfly server fails, etc.
      • getDeploymentsInfo

        public List<org.kie.workbench.common.screens.datasource.management.model.DriverDeploymentInfo> getDeploymentsInfo()
                                                                                                                   throws Exception
        Gets the deployment information for all the drivers currently deployed on the Wildfly server.
        Specified by:
        getDeploymentsInfo in interface org.kie.workbench.common.screens.datasource.management.backend.core.DriverProvider
        Returns:
        a list with the deployment information for all the drivers.
        Throws:
        Exception - exceptions may be thrown if e.g. communication with the Wildfly server fails, etc.
      • loadConfig

        public void loadConfig​(Properties properties)
        Specified by:
        loadConfig in interface org.kie.workbench.common.screens.datasource.management.backend.core.DriverProvider
      • hasStarted

        public void hasStarted()
                        throws Exception
        Specified by:
        hasStarted in interface org.kie.workbench.common.screens.datasource.management.backend.core.DriverProvider
        Throws:
        Exception