}
}
}
private void handleUncheckedFolderComponent(DeploymentComponent deselectedDeploymentComponent) {
Component component = deselectedDeploymentComponent.getComponent();
String folderName = getFolderName(component);
if (Utils.isEmpty(folderName)) {
if (logger.isInfoEnabled()) {
logger.info("Unable to get folder for folder-base component " + component.getFullDisplayName());
}
return;
}
DeploymentComponentSet folderTypeDeploymentComponentSet = null;
if (Utils.isNotEmpty(component.getSecondaryComponentType())) {
folderTypeDeploymentComponentSet =
deploymentPayload.getDeploymentComponentsByType(component.getSecondaryComponentType());
}
if (Utils.isEmpty(folderTypeDeploymentComponentSet)) {
if (logger.isInfoEnabled()) {
logger.info("Unable to find subfolder components for folder '" + folderName + "'");
}
return;
}
// select that guy
Table tblDeploySelection = deploymentPlanComposite.getTable();
TableItem[] tblItems = tblDeploySelection.getItems();
for (TableItem tableItem : tblItems) {
if (!tableItem.getChecked()) {
continue;
}
DeploymentComponent tmpDeploymentComponent = (DeploymentComponent) tableItem.getData();
for (Iterator<DeploymentComponent> iterator = folderTypeDeploymentComponentSet.iterator(); iterator
.hasNext();) {
DeploymentComponent folderDeploymentComponent = iterator.next();
Component tmpComponent = folderDeploymentComponent.getComponent();
if (folderName.equals(tmpComponent.getParentFolderNameIfComponentMustBeInFolder())
&& tmpDeploymentComponent.equals(folderDeploymentComponent)
&& tmpDeploymentComponent.getDestinationSummary().equals(DeploymentSummary.NEW)) {
tableItem.setChecked(false);
tmpDeploymentComponent.setDeploy(false);
iterator.remove();