DeviceTypeCAppDeployer implements AppDeploymentHandler { @Override public void deployArtifacts(CarbonApplication carbonApplication, AxisConfiguration axisConfig) throws DeploymentException { List<Artifact.Dependency> artifacts = carbonApplication.getAppConfig().getApplicationArtifact().getDependencies(); for (Artifact.Dependency dep : artifacts) { Artifact artifact = dep.getArtifact(); if (!validateArtifact(artifact)) { continue; } addArtifact(artifact); } try { deployTypeSpecifiedArtifacts(deviceTypeUIs, axisConfig, null, DeviceTypePluginConstants.CDMF_UI_TYPE_DIR); deployTypeSpecifiedArtifacts(deviceTypePlugins, axisConfig, DeviceTypePluginConstants.CDMF_PLUGIN_TYPE_EXTENSION, DeviceTypePluginConstants.CDMF_PLUGIN_TYPE_DIR); } catch (Exception e) { throw new DeploymentException(e.getMessage(), e); } finally { deviceTypePlugins.clear(); deviceTypeUIs.clear(); } }  @Override void deployArtifacts(CarbonApplication carbonApplication, AxisConfiguration axisConfig); @Override void undeployArtifacts(CarbonApplication carbonApplication, AxisConfiguration axisConfig);  }
@Test(description = "deploying a capp of plugin type") public void testDeployCarbonAppsPluginType() throws DeploymentException, IllegalAccessException { initializeActifact(DeviceTypePluginConstants.CDMF_PLUGIN_TYPE); deviceTypeCAppDeployer.deployArtifacts(carbonApplication, axisConfiguration); }
@Test(description = "deploying an erroneous car file") public void testDeployErrorArtifact() throws DeploymentException, IllegalAccessException { initializeErrorArtifact(); deviceTypeCAppDeployer.deployArtifacts(carbonApplication, axisConfiguration); }
@Test(dependsOnMethods = {"testUndeployCarbonAppsPluginType"}, description = "deploying a capp of UI type") public void testDeployCarbonAppsUiType() throws DeploymentException, IllegalAccessException { initializeActifact(DeviceTypePluginConstants.CDMF_UI_TYPE); deviceTypeCAppDeployer.deployArtifacts(carbonApplication, axisConfiguration); }