reporter.get().setContainerReport(containerReport);
}
public void observeBeforeDeploy(@Observes BeforeDeploy event) {
DeploymentReport deploymentReport = new DeploymentReport();
DeploymentDescription description = event.getDeployment();
deploymentReport.setArchiveName(description.getArchive().getName());
deploymentReport.setName(description.getName());
int order = description.getOrder();
if (order > 0) {
deploymentReport.setOrder(order);
}
String protocol = description.getProtocol().getName();
if (!protocol.equals("_DEFAULT_")) {
deploymentReport.setProtocol(protocol);
} else {
deploymentReport.setProtocol("_DEFAULT_");
}
deploymentReport.setTarget(description.getTarget().getName());
for (ContainerReport containerReport : reporter.get().getLastTestSuiteReport().getContainerReports()) {
if (containerReport.getQualifier().equals(deploymentReport.getTarget())) {
containerReport.getDeploymentReports().add(deploymentReport);
break;
}
}