DeviceTypeCAppDeployer implements AppDeploymentHandler { @Override public void undeployArtifacts(CarbonApplication carbonApplication, AxisConfiguration axisConfig) throws DeploymentException { List<Artifact.Dependency> artifacts = carbonApplication.getAppConfig().getApplicationArtifact().getDependencies(); deviceTypePlugins.clear(); deviceTypeUIs.clear(); for (Artifact.Dependency dep : artifacts) { Artifact artifact = dep.getArtifact(); if (!validateArtifact(artifact)) { continue; } addArtifact(artifact); } try { undeployTypeSpecifiedArtifacts(deviceTypeUIs, axisConfig, null, DeviceTypePluginConstants.CDMF_UI_TYPE_DIR); undeployTypeSpecifiedArtifacts(deviceTypePlugins, axisConfig, DeviceTypePluginConstants.CDMF_PLUGIN_TYPE_EXTENSION, DeviceTypePluginConstants.CDMF_PLUGIN_TYPE_DIR); } finally { deviceTypePlugins.clear(); deviceTypeUIs.clear(); } }  @Override void deployArtifacts(CarbonApplication carbonApplication, AxisConfiguration axisConfig); @Override void undeployArtifacts(CarbonApplication carbonApplication, AxisConfiguration axisConfig);  }
@Test(dependsOnMethods = {"testDeployCarbonAppsPluginType"}, description = "undeploying previously deployed capp") public void testUndeployCarbonAppsPluginType() throws DeploymentException { deviceTypeCAppDeployer.undeployArtifacts(carbonApplication, axisConfiguration); }
@Test(dependsOnMethods = {"testDeployCarbonAppsUiType"}, description = "Undeploy previously deployed capp") public void testUndeployCarbonAppsUiType() throws DeploymentException { deviceTypeCAppDeployer.undeployArtifacts(carbonApplication, axisConfiguration); }