delete unused method
Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com>
This commit is contained in:
@@ -223,11 +223,6 @@ public class CreateUpdateSoftwareTypeLayout extends CreateUpdateTypeLayout
|
||||
|
||||
@Override
|
||||
protected void save(final ClickEvent event) {
|
||||
if (!mandatoryValuesPresent()) {
|
||||
window.setSaveButtonEnabled(false);
|
||||
return;
|
||||
}
|
||||
|
||||
final SoftwareModuleType existingSMTypeByKey = swTypeManagementService
|
||||
.findSoftwareModuleTypeByKey(typeKey.getValue());
|
||||
final SoftwareModuleType existingSMTypeByName = swTypeManagementService
|
||||
@@ -237,10 +232,8 @@ public class CreateUpdateSoftwareTypeLayout extends CreateUpdateTypeLayout
|
||||
createNewSWModuleType();
|
||||
}
|
||||
} else {
|
||||
|
||||
updateSWModuleType(existingSMTypeByName);
|
||||
}
|
||||
// window.setSaveButtonEnabled(false);
|
||||
}
|
||||
|
||||
private void createNewSWModuleType() {
|
||||
|
||||
@@ -127,7 +127,7 @@ public class CommonDialogWindow extends Window implements Serializable {
|
||||
public void checkMandatoryEditedTextField(final TextChangeEvent event, final String originalValue) {
|
||||
final Component component = event.getComponent();
|
||||
if (!(component instanceof AbstractComponent)) {
|
||||
throw new IllegalStateException("Only AbstractComponent not allow");
|
||||
throw new IllegalStateException("Only AbstractComponent are allowed");
|
||||
}
|
||||
|
||||
if (requiredFields.containsKey(component.getId())) {
|
||||
@@ -209,7 +209,6 @@ public class CommonDialogWindow extends Window implements Serializable {
|
||||
* Boolean if field is filled
|
||||
*/
|
||||
public void updateRequiredFields(final String fieldId, final Boolean filled) {
|
||||
|
||||
requiredFields.put(fieldId, filled);
|
||||
checkSaveButtonEnabled();
|
||||
}
|
||||
|
||||
@@ -639,19 +639,16 @@ public class CreateUpdateDistSetTypeLayout extends CreateUpdateTypeLayout
|
||||
|
||||
@Override
|
||||
protected void save(final ClickEvent event) {
|
||||
|
||||
if (mandatoryValuesPresent()) {
|
||||
final DistributionSetType existingDistTypeByKey = distributionSetManagement
|
||||
.findDistributionSetTypeByKey(typeKey.getValue());
|
||||
final DistributionSetType existingDistTypeByName = distributionSetManagement
|
||||
.findDistributionSetTypeByName(tagName.getValue());
|
||||
if (optiongroup.getValue().equals(createTypeStr)) {
|
||||
if (!checkIsDuplicateByKey(existingDistTypeByKey) && !checkIsDuplicate(existingDistTypeByName)) {
|
||||
createNewDistributionSetType();
|
||||
}
|
||||
} else {
|
||||
updateDistributionSetType(existingDistTypeByKey);
|
||||
final DistributionSetType existingDistTypeByKey = distributionSetManagement
|
||||
.findDistributionSetTypeByKey(typeKey.getValue());
|
||||
final DistributionSetType existingDistTypeByName = distributionSetManagement
|
||||
.findDistributionSetTypeByName(tagName.getValue());
|
||||
if (optiongroup.getValue().equals(createTypeStr)) {
|
||||
if (!checkIsDuplicateByKey(existingDistTypeByKey) && !checkIsDuplicate(existingDistTypeByName)) {
|
||||
createNewDistributionSetType();
|
||||
}
|
||||
} else {
|
||||
updateDistributionSetType(existingDistTypeByKey);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,9 +17,7 @@ import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIComponentIdProvider;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUILabelDefinitions;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import com.vaadin.data.Property.ValueChangeEvent;
|
||||
import com.vaadin.server.Page;
|
||||
import com.vaadin.shared.ui.colorpicker.Color;
|
||||
@@ -289,24 +287,6 @@ public class CreateUpdateTypeLayout extends AbstractCreateUpdateTagLayout {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Boolean mandatoryValuesPresent() {
|
||||
if (Strings.isNullOrEmpty(tagName.getValue()) || Strings.isNullOrEmpty(typeKey.getValue())) {
|
||||
if (optiongroup.getValue().equals(createTypeStr)) {
|
||||
displayValidationError(SPUILabelDefinitions.MISSING_TYPE_NAME_KEY);
|
||||
}
|
||||
if (optiongroup.getValue().equals(updateTypeStr)) {
|
||||
if (null == tagNameComboBox.getValue()) {
|
||||
displayValidationError(i18n.get("message.error.missing.tagName"));
|
||||
} else {
|
||||
displayValidationError(SPUILabelDefinitions.MISSING_TAG_NAME);
|
||||
}
|
||||
}
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void save(final ClickEvent event) {
|
||||
// is implemented in the inherited class
|
||||
|
||||
@@ -85,16 +85,13 @@ public class CreateUpdateDistributionTagLayoutWindow extends AbstractCreateUpdat
|
||||
*/
|
||||
@Override
|
||||
public void save(final ClickEvent event) {
|
||||
if (mandatoryValuesPresent()) {
|
||||
final DistributionSetTag existingDistTag = tagManagement.findDistributionSetTag(tagName.getValue());
|
||||
if (optiongroup.getValue().equals(createTagStr)) {
|
||||
if (!checkIsDuplicate(existingDistTag)) {
|
||||
createNewTag();
|
||||
}
|
||||
} else {
|
||||
|
||||
updateExistingTag(existingDistTag);
|
||||
final DistributionSetTag existingDistTag = tagManagement.findDistributionSetTag(tagName.getValue());
|
||||
if (optiongroup.getValue().equals(createTagStr)) {
|
||||
if (!checkIsDuplicate(existingDistTag)) {
|
||||
createNewTag();
|
||||
}
|
||||
} else {
|
||||
updateExistingTag(existingDistTag);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -106,15 +106,13 @@ public class CreateUpdateTargetTagLayoutWindow extends AbstractCreateUpdateTagLa
|
||||
|
||||
@Override
|
||||
public void save(final ClickEvent event) {
|
||||
if (mandatoryValuesPresent()) {
|
||||
final TargetTag existingTag = tagManagement.findTargetTag(tagName.getValue());
|
||||
if (optiongroup.getValue().equals(createTagStr)) {
|
||||
if (!checkIsDuplicate(existingTag)) {
|
||||
createNewTag();
|
||||
}
|
||||
} else {
|
||||
updateExistingTag(existingTag);
|
||||
final TargetTag existingTag = tagManagement.findTargetTag(tagName.getValue());
|
||||
if (optiongroup.getValue().equals(createTagStr)) {
|
||||
if (!checkIsDuplicate(existingTag)) {
|
||||
createNewTag();
|
||||
}
|
||||
} else {
|
||||
updateExistingTag(existingTag);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user