Merge pull request #61 from bsinno/Sonar_issue_Fields_and_methods_have_conflicting_names

👍 looks good, thx
This commit is contained in:
Kai Zimmermann
2016-03-08 08:42:43 +01:00
8 changed files with 91 additions and 92 deletions

View File

@@ -438,17 +438,17 @@ public class CreateUpdateSoftwareTypeLayout extends CustomComponent implements C
if (permChecker.hasUpdateDistributionPermission()) {
optionValues.add(updateType.getValue());
}
createOptionGroup(optionValues);
createOptionGroupByValues(optionValues);
}
private void singleMultiOptionGroup() {
final List<String> optionValues = new ArrayList<>();
optionValues.add(singleAssign.getValue());
optionValues.add(multiAssign.getValue());
assignOptionGroup(optionValues);
assignOptionGroupByValues(optionValues);
}
private void createOptionGroup(final List<String> tagOptions) {
private void createOptionGroupByValues(final List<String> tagOptions) {
createOptiongroup = new OptionGroup("", tagOptions);
createOptiongroup.setStyleName(ValoTheme.OPTIONGROUP_SMALL);
createOptiongroup.addStyleName("custom-option-group");
@@ -458,7 +458,7 @@ public class CreateUpdateSoftwareTypeLayout extends CustomComponent implements C
}
}
private void assignOptionGroup(final List<String> tagOptions) {
private void assignOptionGroupByValues(final List<String> tagOptions) {
assignOptiongroup = new OptionGroup("", tagOptions);
assignOptiongroup.setStyleName(ValoTheme.OPTIONGROUP_SMALL);
assignOptiongroup.addStyleName("custom-option-group");

View File

@@ -50,9 +50,9 @@ public class ArtifactUploadState implements Serializable {
private boolean swTypeFilterClosed = Boolean.FALSE;
private boolean isSwModuleTableMaximized = Boolean.FALSE;
private boolean swModuleTableMaximized = Boolean.FALSE;
private boolean isArtifactDetailsMaximized = Boolean.FALSE;
private boolean artifactDetailsMaximized = Boolean.FALSE;
private final Set<String> selectedDeleteSWModuleTypes = new HashSet<>();
@@ -152,15 +152,15 @@ public class ArtifactUploadState implements Serializable {
* @return the isSwModuleTableMaximized
*/
public boolean isSwModuleTableMaximized() {
return isSwModuleTableMaximized;
return swModuleTableMaximized;
}
/**
* @param isSwModuleTableMaximized
* the isSwModuleTableMaximized to set
*/
public void setSwModuleTableMaximized(final boolean isSwModuleTableMaximized) {
this.isSwModuleTableMaximized = isSwModuleTableMaximized;
public void setSwModuleTableMaximized(final boolean swModuleTableMaximized) {
this.swModuleTableMaximized = swModuleTableMaximized;
}
public Set<String> getSelectedDeleteSWModuleTypes() {
@@ -171,15 +171,15 @@ public class ArtifactUploadState implements Serializable {
* @return the isArtifactDetailsMaximized
*/
public boolean isArtifactDetailsMaximized() {
return isArtifactDetailsMaximized;
return artifactDetailsMaximized;
}
/**
* @param isArtifactDetailsMaximized
* the isArtifactDetailsMaximized to set
*/
public void setArtifactDetailsMaximized(final boolean isArtifactDetailsMaximized) {
this.isArtifactDetailsMaximized = isArtifactDetailsMaximized;
public void setArtifactDetailsMaximized(final boolean artifactDetailsMaximized) {
this.artifactDetailsMaximized = artifactDetailsMaximized;
}
/**

View File

@@ -555,10 +555,10 @@ public class CreateUpdateDistSetTypeLayout extends CustomComponent implements Co
if (permChecker.hasUpdateDistributionPermission()) {
optionValues.add(updateDistType.getValue());
}
createOptionGroup(optionValues);
createOptionGroupByValues(optionValues);
}
private void createOptionGroup(final List<String> typeOptions) {
private void createOptionGroupByValues(final List<String> typeOptions) {
createOptiongroup = new OptionGroup("", typeOptions);
createOptiongroup.setId(SPUIDefinitions.CREATE_OPTION_GROUP_DISTRIBUTION_SET_TYPE_ID);
createOptiongroup.addStyleName(ValoTheme.OPTIONGROUP_SMALL);

View File

@@ -62,9 +62,9 @@ public class ManageDistUIState implements Serializable {
private final Map<Long, String> deleteSofwareModulesList = new HashMap<>();
private boolean isSwModuleTableMaximized = Boolean.FALSE;
private boolean swModuleTableMaximized = Boolean.FALSE;
private boolean isDsTableMaximized = Boolean.FALSE;
private boolean dsTableMaximized = Boolean.FALSE;
private final Map<String, SoftwareModuleIdName> assignedSoftwareModuleDetails = new HashMap<>();
@@ -219,7 +219,7 @@ public class ManageDistUIState implements Serializable {
* @return boolean
*/
public boolean isDsTableMaximized() {
return isDsTableMaximized;
return dsTableMaximized;
}
/***
@@ -227,8 +227,8 @@ public class ManageDistUIState implements Serializable {
*
* @param isDsModuleTableMaximized
*/
public void setDsTableMaximized(final boolean isDsModuleTableMaximized) {
isDsTableMaximized = isDsModuleTableMaximized;
public void setDsTableMaximized(final boolean dsModuleTableMaximized) {
dsTableMaximized = dsModuleTableMaximized;
}
public Map<String, SoftwareModuleIdName> getAssignedSoftwareModuleDetails() {
@@ -239,15 +239,15 @@ public class ManageDistUIState implements Serializable {
* @return the isSwModuleTableMaximized
*/
public boolean isSwModuleTableMaximized() {
return isSwModuleTableMaximized;
return swModuleTableMaximized;
}
/**
* @param isSwModuleTableMaximized
* the isSwModuleTableMaximized to set
*/
public void setSwModuleTableMaximized(final boolean isSwModuleTableMaximized) {
this.isSwModuleTableMaximized = isSwModuleTableMaximized;
public void setSwModuleTableMaximized(final boolean swModuleTableMaximized) {
this.swModuleTableMaximized = swModuleTableMaximized;
}
/**

View File

@@ -94,8 +94,8 @@ public class DistributionAddUpdateWindowLayout extends VerticalLayout {
@Autowired
private transient TenantMetaDataRepository tenantMetaDataRepository;
private Button saveDistribution;
private Button discardDistribution;
private Button saveDistributionBtn;
private Button discardDistributionBtn;
private TextField distNameTextField;
private TextField distVersionTextField;
private Label madatoryLabel;
@@ -103,7 +103,7 @@ public class DistributionAddUpdateWindowLayout extends VerticalLayout {
private CheckBox reqMigStepCheckbox;
private ComboBox distsetTypeNameComboBox;
private boolean editDistribution = Boolean.FALSE;
private Long editDistId = null;
private Long editDistId;
private Window addDistributionWindow;
private String originalDistName;
private String originalDistVersion;
@@ -131,9 +131,9 @@ public class DistributionAddUpdateWindowLayout extends VerticalLayout {
final HorizontalLayout buttonsLayout = new HorizontalLayout();
buttonsLayout.setSizeFull();
buttonsLayout.setStyleName("dist-buttons-horz-layout");
buttonsLayout.addComponents(saveDistribution, discardDistribution);
buttonsLayout.setComponentAlignment(saveDistribution, Alignment.BOTTOM_LEFT);
buttonsLayout.setComponentAlignment(discardDistribution, Alignment.BOTTOM_RIGHT);
buttonsLayout.addComponents(saveDistributionBtn, discardDistributionBtn);
buttonsLayout.setComponentAlignment(saveDistributionBtn, Alignment.BOTTOM_LEFT);
buttonsLayout.setComponentAlignment(discardDistributionBtn, Alignment.BOTTOM_RIGHT);
buttonsLayout.addStyleName("window-style");
/*
@@ -186,14 +186,14 @@ public class DistributionAddUpdateWindowLayout extends VerticalLayout {
reqMigStepCheckbox.setId(SPUIComponetIdProvider.DIST_ADD_MIGRATION_CHECK);
/* save or update button */
saveDistribution = SPUIComponentProvider.getButton(SPUIComponetIdProvider.DIST_ADD_SAVE, "", "", "", true,
saveDistributionBtn = SPUIComponentProvider.getButton(SPUIComponetIdProvider.DIST_ADD_SAVE, "", "", "", true,
FontAwesome.SAVE, SPUIButtonStyleSmallNoBorder.class);
saveDistribution.addClickListener(event -> saveDistribution());
saveDistributionBtn.addClickListener(event -> saveDistribution());
/* close button */
discardDistribution = SPUIComponentProvider.getButton(SPUIComponetIdProvider.DIST_ADD_DISCARD, "", "", "", true,
FontAwesome.TIMES, SPUIButtonStyleSmallNoBorder.class);
discardDistribution.addClickListener(event -> discardDistribution());
discardDistributionBtn = SPUIComponentProvider.getButton(SPUIComponetIdProvider.DIST_ADD_DISCARD, "", "", "",
true, FontAwesome.TIMES, SPUIButtonStyleSmallNoBorder.class);
discardDistributionBtn.addClickListener(event -> discardDistribution());
}
/**
@@ -216,7 +216,7 @@ public class DistributionAddUpdateWindowLayout extends VerticalLayout {
}
private void enableSaveButton() {
saveDistribution.setEnabled(true);
saveDistributionBtn.setEnabled(true);
}
private DistributionSetType getDefaultDistributionSetType() {
@@ -226,7 +226,7 @@ public class DistributionAddUpdateWindowLayout extends VerticalLayout {
}
private void disableSaveButton() {
saveDistribution.setEnabled(false);
saveDistributionBtn.setEnabled(false);
}
private void saveDistribution() {
@@ -415,7 +415,7 @@ public class DistributionAddUpdateWindowLayout extends VerticalLayout {
distsetTypeNameComboBox.removeStyleName(SPUIStyleDefinitions.SP_COMBOFIELD_ERROR);
descTextArea.clear();
reqMigStepCheckbox.clear();
saveDistribution.setEnabled(true);
saveDistributionBtn.setEnabled(true);
removeListeners();
changedComponents.clear();
}
@@ -497,7 +497,7 @@ public class DistributionAddUpdateWindowLayout extends VerticalLayout {
public void populateValuesOfDistribution(final Long editDistId) {
this.editDistId = editDistId;
editDistribution = Boolean.TRUE;
saveDistribution.setEnabled(false);
saveDistributionBtn.setEnabled(false);
final DistributionSet distSet = distributionSetManagement.findDistributionSetByIdWithDetails(editDistId);
if (distSet != null) {
distNameTextField.setValue(distSet.getName());

View File

@@ -62,20 +62,20 @@ public class ManagementUIState implements Serializable {
private boolean distTagFilterClosed = true;
private Long targetsTruncated = null;
private Long targetsTruncated;
private final AtomicLong targetsCountAll = new AtomicLong();
private boolean isDsTableMaximized = Boolean.FALSE;
private boolean dsTableMaximized = Boolean.FALSE;
// Contains ID and NAme of last selected target
private DistributionSetIdName lastSelectedDsIdName;
// Contains list of ID and Names of all the selected Targets
private Set<DistributionSetIdName> selectedDsIdName = Collections.emptySet();
private boolean isTargetTableMaximized = Boolean.FALSE;
private boolean targetTableMaximized = Boolean.FALSE;
private boolean isActionHistoryMaximized = Boolean.FALSE;
private boolean actionHistoryMaximized = Boolean.FALSE;
private boolean noDataAvilableTarget = Boolean.FALSE;
@@ -255,11 +255,11 @@ public class ManagementUIState implements Serializable {
}
public boolean isDsTableMaximized() {
return isDsTableMaximized;
return dsTableMaximized;
}
public void setDsTableMaximized(final boolean isDsTableMaximized) {
this.isDsTableMaximized = isDsTableMaximized;
this.dsTableMaximized = isDsTableMaximized;
}
public DistributionSetIdName getLastSelectedDsIdName() {
@@ -282,7 +282,7 @@ public class ManagementUIState implements Serializable {
* @return the isTargetTableMaximized
*/
public boolean isTargetTableMaximized() {
return isTargetTableMaximized;
return targetTableMaximized;
}
/**
@@ -290,14 +290,14 @@ public class ManagementUIState implements Serializable {
* the isTargetTableMaximized to set
*/
public void setTargetTableMaximized(final boolean isTargetTableMaximized) {
this.isTargetTableMaximized = isTargetTableMaximized;
this.targetTableMaximized = isTargetTableMaximized;
}
/**
* @return the isActionHistoryMaximized
*/
public boolean isActionHistoryMaximized() {
return isActionHistoryMaximized;
return actionHistoryMaximized;
}
/**
@@ -305,7 +305,7 @@ public class ManagementUIState implements Serializable {
* the isActionHistoryMaximized to set
*/
public void setActionHistoryMaximized(final boolean isActionHistoryMaximized) {
this.isActionHistoryMaximized = isActionHistoryMaximized;
this.actionHistoryMaximized = isActionHistoryMaximized;
}
/**

View File

@@ -128,9 +128,9 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
private TextArea description;
private Button saveRollout;
private Button saveRolloutBtn;
private Button discardRolllout;
private Button discardRollloutBtn;
private OptionGroup errorThresholdOptionGroup;
@@ -138,7 +138,7 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
private Window addUpdateRolloutWindow;
private Boolean editRollout;
private Boolean editRolloutEnabled;
private Rollout rolloutForEdit;
@@ -167,7 +167,7 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
* Reset the field values.
*/
public void resetComponents() {
editRollout = Boolean.FALSE;
editRolloutEnabled = Boolean.FALSE;
rolloutName.clear();
targetFilterQuery.clear();
resetFields();
@@ -212,7 +212,7 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
final HorizontalLayout groupLayout = new HorizontalLayout();
groupLayout.setSizeFull();
groupLayout.addComponents(noOfGroups, groupSizeLabel);
groupLayout.setExpandRatio(noOfGroups, 1.0f);
groupLayout.setExpandRatio(noOfGroups, 1.0F);
groupLayout.setComponentAlignment(groupSizeLabel, Alignment.MIDDLE_LEFT);
return groupLayout;
}
@@ -221,7 +221,7 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
final HorizontalLayout errorThresoldLayout = new HorizontalLayout();
errorThresoldLayout.setSizeFull();
errorThresoldLayout.addComponents(errorThreshold, errorThresholdOptionGroup);
errorThresoldLayout.setExpandRatio(errorThreshold, 1.0f);
errorThresoldLayout.setExpandRatio(errorThreshold, 1.0F);
return errorThresoldLayout;
}
@@ -229,9 +229,9 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
final HorizontalLayout targetFilterLayout = new HorizontalLayout();
targetFilterLayout.setSizeFull();
targetFilterLayout.addComponents(targetFilterQueryCombo, targetFilterQuery, totalTargetsLabel);
targetFilterLayout.setExpandRatio(targetFilterQueryCombo, 0.71f);
targetFilterLayout.setExpandRatio(targetFilterQuery, 0.70f);
targetFilterLayout.setExpandRatio(totalTargetsLabel, 0.29f);
targetFilterLayout.setExpandRatio(targetFilterQueryCombo, 0.71F);
targetFilterLayout.setExpandRatio(targetFilterQuery, 0.70F);
targetFilterLayout.setExpandRatio(totalTargetsLabel, 0.29F);
targetFilterLayout.setComponentAlignment(totalTargetsLabel, Alignment.MIDDLE_LEFT);
return targetFilterLayout;
}
@@ -240,7 +240,7 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
final HorizontalLayout triggerThresholdLayout = new HorizontalLayout();
triggerThresholdLayout.setSizeFull();
triggerThresholdLayout.addComponents(triggerThreshold, getPercentHintLabel());
triggerThresholdLayout.setExpandRatio(triggerThreshold, 1.0f);
triggerThresholdLayout.setExpandRatio(triggerThreshold, 1.0F);
return triggerThresholdLayout;
}
@@ -254,9 +254,9 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
private HorizontalLayout getSaveDiscardButtonLayout() {
final HorizontalLayout buttonsLayout = new HorizontalLayout();
buttonsLayout.setSizeFull();
buttonsLayout.addComponents(saveRollout, discardRolllout);
buttonsLayout.setComponentAlignment(saveRollout, Alignment.BOTTOM_LEFT);
buttonsLayout.setComponentAlignment(discardRolllout, Alignment.BOTTOM_RIGHT);
buttonsLayout.addComponents(saveRolloutBtn, discardRollloutBtn);
buttonsLayout.setComponentAlignment(saveRolloutBtn, Alignment.BOTTOM_LEFT);
buttonsLayout.setComponentAlignment(discardRollloutBtn, Alignment.BOTTOM_RIGHT);
buttonsLayout.addStyleName("window-style");
return buttonsLayout;
}
@@ -277,8 +277,8 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
description = createDescription();
errorThresholdOptionGroup = createErrorThresholdOptionGroup();
setDefaultSaveStartGroupOption();
saveRollout = createSaveButton();
discardRolllout = createDiscardButton();
saveRolloutBtn = createSaveButton();
discardRollloutBtn = createDiscardButton();
actionTypeOptionGroupLayout.selectDefaultOption();
totalTargetsLabel = createTotalTargetsLabel();
@@ -383,8 +383,9 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
private Container createTargetFilterComboContainer() {
final BeanQueryFactory<TargetFilterBeanQuery> targetFilterQF = new BeanQueryFactory<>(
TargetFilterBeanQuery.class);
return new LazyQueryContainer(new LazyQueryDefinition(true, SPUIDefinitions.PAGE_SIZE,
SPUILabelDefinitions.VAR_NAME), targetFilterQF);
return new LazyQueryContainer(
new LazyQueryDefinition(true, SPUIDefinitions.PAGE_SIZE, SPUILabelDefinitions.VAR_NAME),
targetFilterQF);
}
@@ -410,7 +411,7 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
}
private void onRolloutSave() {
if (editRollout) {
if (editRolloutEnabled) {
editRollout();
} else {
createRollout();
@@ -422,8 +423,8 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
rolloutForEdit.setName(rolloutName.getValue());
rolloutForEdit.setDescription(description.getValue());
final DistributionSetIdName distributionSetIdName = (DistributionSetIdName) distributionSet.getValue();
rolloutForEdit.setDistributionSet(distributionSetManagement.findDistributionSetById(distributionSetIdName
.getId()));
rolloutForEdit.setDistributionSet(
distributionSetManagement.findDistributionSetById(distributionSetIdName.getId()));
rolloutForEdit.setActionType(getActionType());
rolloutForEdit.setForcedTime(getForcedTimeStamp());
final int amountGroup = Integer.parseInt(noOfGroups.getValue());
@@ -453,8 +454,9 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
private long getForcedTimeStamp() {
return (((ActionTypeOptionGroupLayout.ActionTypeOption) actionTypeOptionGroupLayout.getActionTypeOptionGroup()
.getValue()) == ActionTypeOption.AUTO_FORCED) ? actionTypeOptionGroupLayout.getForcedTimeDateField()
.getValue().getTime() : Action.NO_FORCE_TIME;
.getValue()) == ActionTypeOption.AUTO_FORCED)
? actionTypeOptionGroupLayout.getForcedTimeDateField().getValue().getTime()
: Action.NO_FORCE_TIME;
}
private ActionType getActionType() {
@@ -487,8 +489,8 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
rolloutToCreate.setName(rolloutName.getValue());
rolloutToCreate.setDescription(description.getValue());
rolloutToCreate.setTargetFilterQuery(targetFilter);
rolloutToCreate.setDistributionSet(distributionSetManagement.findDistributionSetById(distributionSetIdName
.getId()));
rolloutToCreate
.setDistributionSet(distributionSetManagement.findDistributionSetById(distributionSetIdName.getId()));
rolloutToCreate.setActionType(getActionType());
rolloutToCreate.setForcedTime(getForcedTimeStamp());
@@ -499,8 +501,8 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
private String getTargetFilterQuery() {
if (null != targetFilterQueryCombo.getValue()
&& HawkbitCommonUtil.trimAndNullIfEmpty((String) targetFilterQueryCombo.getValue()) != null) {
final Item filterItem = targetFilterQueryCombo.getContainerDataSource().getItem(
targetFilterQueryCombo.getValue());
final Item filterItem = targetFilterQueryCombo.getContainerDataSource()
.getItem(targetFilterQueryCombo.getValue());
return (String) filterItem.getItemProperty("query").getValue();
}
return null;
@@ -568,8 +570,8 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
private boolean duplicateCheck() {
if (rolloutManagement.findRolloutByName(getRolloutName()) != null) {
uiNotification.displayValidationError(i18n.get("message.rollout.duplicate.check",
new Object[] { getRolloutName() }));
uiNotification.displayValidationError(
i18n.get("message.rollout.duplicate.check", new Object[] { getRolloutName() }));
return false;
}
return true;
@@ -580,9 +582,8 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
}
private TextArea createDescription() {
final TextArea descriptionField = SPUIComponentProvider.getTextArea("text-area-style",
ValoTheme.TEXTFIELD_TINY, false, null, i18n.get("textfield.description"),
SPUILabelDefinitions.TEXT_AREA_MAX_LENGTH);
final TextArea descriptionField = SPUIComponentProvider.getTextArea("text-area-style", ValoTheme.TEXTFIELD_TINY,
false, null, i18n.get("textfield.description"), SPUILabelDefinitions.TEXT_AREA_MAX_LENGTH);
descriptionField.setId(SPUIComponetIdProvider.ROLLOUT_DESCRIPTION_ID);
descriptionField.setNullRepresentation(HawkbitCommonUtil.SP_STRING_EMPTY);
descriptionField.setSizeFull();
@@ -647,8 +648,9 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
private Container createDsComboContainer() {
final BeanQueryFactory<DistBeanQuery> distributionQF = new BeanQueryFactory<>(DistBeanQuery.class);
return new LazyQueryContainer(new LazyQueryDefinition(true, SPUIDefinitions.PAGE_SIZE,
SPUILabelDefinitions.VAR_DIST_ID_NAME), distributionQF);
return new LazyQueryContainer(
new LazyQueryDefinition(true, SPUIDefinitions.PAGE_SIZE, SPUILabelDefinitions.VAR_DIST_ID_NAME),
distributionQF);
}
@@ -682,8 +684,8 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
try {
if (HawkbitCommonUtil.trimAndNullIfEmpty(noOfGroups.getValue()) == null
|| HawkbitCommonUtil.trimAndNullIfEmpty((String) targetFilterQueryCombo.getValue()) == null) {
uiNotification.displayValidationError(i18n
.get("message.rollout.noofgroups.or.targetfilter.missing"));
uiNotification
.displayValidationError(i18n.get("message.rollout.noofgroups.or.targetfilter.missing"));
} else {
new RegexpValidator(NUMBER_REGEXP, i18n.get(MESSAGE_ENTER_NUMBER)).validate(value);
final int groupSize = getGroupSize();
@@ -708,8 +710,8 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
public void validate(final Object value) {
try {
new RegexpValidator(NUMBER_REGEXP, i18n.get(MESSAGE_ENTER_NUMBER)).validate(value);
new IntegerRangeValidator(i18n.get(MESSAGE_ROLLOUT_FIELD_VALUE_RANGE, 0, 100), 0, 100).validate(Integer
.valueOf(value.toString()));
new IntegerRangeValidator(i18n.get(MESSAGE_ROLLOUT_FIELD_VALUE_RANGE, 0, 100), 0, 100)
.validate(Integer.valueOf(value.toString()));
} catch (final InvalidValueException ex) {
throw ex;
}
@@ -723,8 +725,8 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
public void validate(final Object value) {
try {
new RegexpValidator(NUMBER_REGEXP, i18n.get(MESSAGE_ENTER_NUMBER)).validate(value);
new IntegerRangeValidator(i18n.get(MESSAGE_ROLLOUT_FIELD_VALUE_RANGE, 0, 500), 0, 500).validate(Integer
.valueOf(value.toString()));
new IntegerRangeValidator(i18n.get(MESSAGE_ROLLOUT_FIELD_VALUE_RANGE, 0, 500), 0, 500)
.validate(Integer.valueOf(value.toString()));
} catch (final InvalidValueException ex) {
throw ex;
}
@@ -740,7 +742,7 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
*/
public void populateData(final Long rolloutId) {
resetComponents();
editRollout = Boolean.TRUE;
editRolloutEnabled = Boolean.TRUE;
rolloutForEdit = rolloutManagement.findRolloutById(rolloutId);
rolloutName.setValue(rolloutForEdit.getName());
description.setValue(rolloutForEdit.getDescription());

View File

@@ -86,7 +86,7 @@ public class GatewaySecurityTokenAuthenticationConfigurationItem extends Abstrac
gatewayTokenNameTextField.setImmediate(true);
// hide text field until we support multiple gateway tokens for a tenan
gatewayTokenNameTextField.setVisible(false);
gatewayTokenNameTextField.addTextChangeListener(event -> keyNameChanged());
gatewayTokenNameTextField.addTextChangeListener(event -> doKeyNameChanged());
final Button gatewaytokenBtn = SPUIComponentProvider.getButton("TODO-ID", "Regenerate Key", "",
ValoTheme.BUTTON_TINY + " " + "redicon", true, null, SPUIButtonStyleSmall.class);
@@ -116,10 +116,7 @@ public class GatewaySecurityTokenAuthenticationConfigurationItem extends Abstrac
}
}
/**
* @return
*/
private void keyNameChanged() {
private void doKeyNameChanged() {
keyNameChanged = true;
notifyConfigurationChanged();
}