Continued on the model API extraction. Merged rest api split branch.
Signed-off-by: Kai Zimmermann <kai.zimmermann@bosch-si.com>
This commit is contained in:
@@ -12,7 +12,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.hawkbit.repository.ArtifactManagement;
|
||||
import org.eclipse.hawkbit.repository.jpa.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.jpa.model.JpaLocalArtifact;
|
||||
import org.eclipse.hawkbit.repository.model.LocalArtifact;
|
||||
import org.eclipse.hawkbit.ui.utils.HawkbitCommonUtil;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
@@ -72,7 +73,7 @@ public class ArtifactBeanQuery extends AbstractBeanQuery<LocalArtifact> {
|
||||
|
||||
@Override
|
||||
protected LocalArtifact constructBean() {
|
||||
return new LocalArtifact();
|
||||
return new JpaLocalArtifact();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,8 +12,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.hawkbit.repository.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.SoftwareManagement;
|
||||
import org.eclipse.hawkbit.repository.jpa.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModuleType;
|
||||
import org.eclipse.hawkbit.ui.common.UserDetailsFormatter;
|
||||
|
||||
@@ -10,7 +10,7 @@ package org.eclipse.hawkbit.ui.artifacts.smtable;
|
||||
|
||||
import java.security.SecureRandom;
|
||||
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
import org.eclipse.hawkbit.repository.jpa.model.JpaSoftwareModule;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -19,7 +19,7 @@ import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ProxyBaseSoftwareModuleItem extends SoftwareModule {
|
||||
public class ProxyBaseSoftwareModuleItem extends JpaSoftwareModule {
|
||||
|
||||
private static final long serialVersionUID = -1555306616599140635L;
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ public class SoftwareModuleAddUpdateWindow implements Serializable {
|
||||
mainLayout.addComponent(hLayout);
|
||||
mainLayout.setComponentAlignment(hLayout, Alignment.MIDDLE_LEFT);
|
||||
mainLayout.addComponents(nameTextField, versionTextField, vendorTextField, descTextArea, buttonsLayout);
|
||||
|
||||
|
||||
/* add main layout to the window */
|
||||
window = SPUIComponentProvider.getWindow(i18n.get("upload.caption.add.new.swmodule"), null,
|
||||
SPUIDefinitions.CREATE_UPDATE_WINDOW);
|
||||
@@ -277,8 +277,8 @@ public class SoftwareModuleAddUpdateWindow implements Serializable {
|
||||
uiNotifcation.displayValidationError(
|
||||
i18n.get("message.duplicate.softwaremodule", new Object[] { name, version }));
|
||||
} else {
|
||||
final SoftwareModule newBaseSoftwareModule = HawkbitCommonUtil.addNewBaseSoftware(name, version, vendor,
|
||||
softwareManagement.findSoftwareModuleTypeByName(type), description);
|
||||
final SoftwareModule newBaseSoftwareModule = HawkbitCommonUtil.addNewBaseSoftware(softwareManagement,
|
||||
name, version, vendor, softwareManagement.findSoftwareModuleTypeByName(type), description);
|
||||
if (newBaseSoftwareModule != null) {
|
||||
/* display success message */
|
||||
uiNotifcation.displaySuccess(i18n.get("message.save.success", new Object[] {
|
||||
|
||||
@@ -625,8 +625,10 @@ public class CreateUpdateSoftwareTypeLayout extends CustomComponent implements C
|
||||
}
|
||||
|
||||
if (null != typeNameValue && null != typeKeyValue) {
|
||||
SoftwareModuleType newSWType = new SoftwareModuleType(typeKeyValue, typeNameValue, typeDescValue,
|
||||
assignNumber, colorPicked);
|
||||
SoftwareModuleType newSWType = swTypeManagementService.generateSoftwareModuleType(typeKeyValue,
|
||||
typeNameValue, typeDescValue, assignNumber);
|
||||
newSWType.setColour(colorPicked);
|
||||
|
||||
if (null != typeDescValue) {
|
||||
newSWType.setDescription(typeDescValue);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.hawkbit.repository.DistributionSetManagement;
|
||||
import org.eclipse.hawkbit.repository.jpa.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSetType;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SpringContextHelper;
|
||||
@@ -57,8 +57,9 @@ public class DistributionSetTypeBeanQuery extends AbstractBeanQuery<Distribution
|
||||
|
||||
@Override
|
||||
protected DistributionSetType constructBean() {
|
||||
|
||||
return new DistributionSetType("", "", "", "");
|
||||
final DistributionSetType result = distributionSetManagement.generateDistributionSetType("", "", "");
|
||||
result.setColour("");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,8 +11,8 @@ package org.eclipse.hawkbit.ui.common;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.hawkbit.repository.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.SoftwareManagement;
|
||||
import org.eclipse.hawkbit.repository.jpa.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModuleType;
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIDefinitions;
|
||||
import org.eclipse.hawkbit.ui.utils.SpringContextHelper;
|
||||
@@ -47,7 +47,7 @@ public class SoftwareModuleTypeBeanQuery extends AbstractBeanQuery<SoftwareModul
|
||||
|
||||
@Override
|
||||
protected SoftwareModuleType constructBean() {
|
||||
return new SoftwareModuleType();
|
||||
return softwareManagement.generateSoftwareModuleType();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.components;
|
||||
|
||||
import org.eclipse.hawkbit.repository.jpa.model.JpaDistributionSet;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSet;
|
||||
|
||||
/**
|
||||
@@ -15,7 +16,7 @@ import org.eclipse.hawkbit.repository.model.DistributionSet;
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ProxyDistribution extends DistributionSet {
|
||||
public class ProxyDistribution extends JpaDistributionSet {
|
||||
|
||||
private static final long serialVersionUID = -8891449133620645310L;
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ package org.eclipse.hawkbit.ui.components;
|
||||
import java.net.URI;
|
||||
import java.security.SecureRandom;
|
||||
|
||||
import org.eclipse.hawkbit.repository.jpa.model.JpaTarget;
|
||||
import org.eclipse.hawkbit.repository.model.Action.Status;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSet;
|
||||
import org.eclipse.hawkbit.repository.model.Target;
|
||||
@@ -25,7 +26,7 @@ import org.eclipse.hawkbit.repository.model.TargetUpdateStatus;
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ProxyTarget extends Target {
|
||||
public class ProxyTarget extends JpaTarget {
|
||||
private static final long serialVersionUID = -8891449133620645310L;
|
||||
private String controllerId;
|
||||
private URI address = null;
|
||||
@@ -262,7 +263,7 @@ public class ProxyTarget extends Target {
|
||||
* @param assignedDistributionSet
|
||||
* the assignedDistributionSet to set
|
||||
*/
|
||||
public void setAssignedDistributionSet(DistributionSet assignedDistributionSet) {
|
||||
public void setAssignedDistributionSet(final DistributionSet assignedDistributionSet) {
|
||||
this.assignedDistributionSet = assignedDistributionSet;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.components;
|
||||
|
||||
import org.eclipse.hawkbit.repository.model.TargetFilterQuery;
|
||||
import org.eclipse.hawkbit.repository.jpa.model.JpaTargetFilterQuery;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ProxyTargetFilter extends TargetFilterQuery {
|
||||
public class ProxyTargetFilter extends JpaTargetFilterQuery {
|
||||
|
||||
private static final long serialVersionUID = 6622060929679084419L;
|
||||
|
||||
|
||||
@@ -284,7 +284,7 @@ public class CreateUpdateDistSetTypeLayout extends CustomComponent implements Co
|
||||
|
||||
mainLayout.addComponent(fieldLayout);
|
||||
mainLayout.addComponent(twinTableLayout);
|
||||
|
||||
|
||||
colorLayout = new HorizontalLayout();
|
||||
sliderLayout = new VerticalLayout();
|
||||
final HorizontalLayout chooseColorLayout = new HorizontalLayout();
|
||||
@@ -654,7 +654,8 @@ public class CreateUpdateDistSetTypeLayout extends CustomComponent implements Co
|
||||
final String typeDescValue = HawkbitCommonUtil.trimAndNullIfEmpty(typeDesc.getValue());
|
||||
final List<Long> itemIds = (List<Long>) selectedTable.getItemIds();
|
||||
if (null != typeNameValue && null != typeKeyValue && null != itemIds && !itemIds.isEmpty()) {
|
||||
DistributionSetType newDistType = new DistributionSetType(typeKeyValue, typeNameValue, typeDescValue);
|
||||
DistributionSetType newDistType = distributionSetManagement.generateDistributionSetType(typeKeyValue,
|
||||
typeNameValue, typeDescValue);
|
||||
for (final Long id : itemIds) {
|
||||
final Item item = selectedTable.getItem(id);
|
||||
final String distTypeName = (String) item.getItemProperty(DIST_TYPE_NAME).getValue();
|
||||
@@ -704,7 +705,8 @@ public class CreateUpdateDistSetTypeLayout extends CustomComponent implements Co
|
||||
updateDistSetType.setKey(typeKeyValue);
|
||||
updateDistSetType.setDescription(null != typeDescValue ? typeDescValue : null);
|
||||
|
||||
if (distributionSetRepository.countByType(existingType) <= 0 && null != itemIds && !itemIds.isEmpty()) {
|
||||
if (distributionSetManagement.countDistributionSetsByType(existingType) <= 0 && null != itemIds
|
||||
&& !itemIds.isEmpty()) {
|
||||
for (final Long id : itemIds) {
|
||||
final Item item = selectedTable.getItem(id);
|
||||
final CheckBox mandatoryCheckBox = (CheckBox) item.getItemProperty(DIST_TYPE_MANDATORY).getValue();
|
||||
@@ -1040,7 +1042,7 @@ public class CreateUpdateDistSetTypeLayout extends CustomComponent implements Co
|
||||
typeDesc.setValue(selectedTypeTag.getDescription());
|
||||
typeKey.setValue(selectedTypeTag.getKey());
|
||||
|
||||
if (distributionSetRepository.countByType(selectedTypeTag) <= 0) {
|
||||
if (distributionSetManagement.countDistributionSetsByType(selectedTypeTag) <= 0) {
|
||||
distTypeSelectLayout.setEnabled(true);
|
||||
selectedTable.setEnabled(true);
|
||||
saveDistSetType.setEnabled(true);
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.Map;
|
||||
import org.eclipse.hawkbit.repository.DistributionSetFilter;
|
||||
import org.eclipse.hawkbit.repository.DistributionSetFilter.DistributionSetFilterBuilder;
|
||||
import org.eclipse.hawkbit.repository.DistributionSetManagement;
|
||||
import org.eclipse.hawkbit.repository.jpa.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSet;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSetType;
|
||||
import org.eclipse.hawkbit.ui.common.UserDetailsFormatter;
|
||||
@@ -96,7 +96,7 @@ public class ManageDistBeanQuery extends AbstractBeanQuery<ProxyDistribution> {
|
||||
} else if (Strings.isNullOrEmpty(searchText)) {
|
||||
// if no search filters available
|
||||
distBeans = getDistributionSetManagement()
|
||||
.findDistributionSetsAll(new OffsetBasedPageRequest(startIndex, count, sort), false, null);
|
||||
.findDistributionSetsByDeletedAndOrCompleted(new OffsetBasedPageRequest(startIndex, count, sort), false, null);
|
||||
} else {
|
||||
final DistributionSetFilter distributionSetFilter = new DistributionSetFilterBuilder().setIsDeleted(false)
|
||||
.setSearchText(searchText).setSelectDSWithNoTag(Boolean.FALSE).setType(distributionSetType).build();
|
||||
@@ -133,7 +133,7 @@ public class ManageDistBeanQuery extends AbstractBeanQuery<ProxyDistribution> {
|
||||
if (Strings.isNullOrEmpty(searchText) && null == distributionSetType) {
|
||||
// if no search filters available
|
||||
firstPageDistributionSets = getDistributionSetManagement()
|
||||
.findDistributionSetsAll(new PageRequest(0, SPUIDefinitions.PAGE_SIZE, sort), false, null);
|
||||
.findDistributionSetsByDeletedAndOrCompleted(new PageRequest(0, SPUIDefinitions.PAGE_SIZE, sort), false, null);
|
||||
} else {
|
||||
final DistributionSetFilter distributionSetFilter = new DistributionSetFilterBuilder().setIsDeleted(false)
|
||||
.setSearchText(searchText).setSelectDSWithNoTag(Boolean.FALSE).setType(distributionSetType).build();
|
||||
|
||||
@@ -12,8 +12,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.hawkbit.repository.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.SoftwareManagement;
|
||||
import org.eclipse.hawkbit.repository.jpa.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.model.CustomSoftwareModule;
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModuleType;
|
||||
|
||||
@@ -503,7 +503,7 @@ public class CreateOrUpdateFilterHeader extends VerticalLayout implements Button
|
||||
}
|
||||
|
||||
private void createTargetFilterQuery() {
|
||||
final TargetFilterQuery targetFilterQuery = new TargetFilterQuery();
|
||||
final TargetFilterQuery targetFilterQuery = targetFilterQueryManagement.generateTargetFilterQuery();
|
||||
targetFilterQuery.setName(nameTextField.getValue());
|
||||
targetFilterQuery.setQuery(queryTextField.getValue());
|
||||
targetFilterQueryManagement.createTargetFilterQuery(targetFilterQuery);
|
||||
|
||||
@@ -268,29 +268,29 @@ public class ActionHistoryTable extends TreeTable implements Handler {
|
||||
|
||||
final Action action = actionWithStatusCount.getAction();
|
||||
|
||||
final Item item = hierarchicalContainer.addItem(actionWithStatusCount.getActionId());
|
||||
final Item item = hierarchicalContainer.addItem(actionWithStatusCount.getAction().getId());
|
||||
|
||||
item.getItemProperty(SPUIDefinitions.ACTION_HIS_TBL_STATUS_HIDDEN)
|
||||
.setValue(actionWithStatusCount.getActionStatus());
|
||||
.setValue(actionWithStatusCount.getAction().getStatus());
|
||||
|
||||
/*
|
||||
* add action id.
|
||||
*/
|
||||
item.getItemProperty(SPUIDefinitions.ACTION_HIS_TBL_ACTION_ID)
|
||||
.setValue(actionWithStatusCount.getActionId().toString());
|
||||
.setValue(actionWithStatusCount.getAction().getId().toString());
|
||||
/*
|
||||
* add active/inactive status to the item which will be used in
|
||||
* Column generator to generate respective icon
|
||||
*/
|
||||
item.getItemProperty(SPUIDefinitions.ACTION_HIS_TBL_ACTIVE_HIDDEN).setValue(
|
||||
actionWithStatusCount.isActionActive() ? SPUIDefinitions.ACTIVE : SPUIDefinitions.IN_ACTIVE);
|
||||
actionWithStatusCount.getAction().isActive() ? SPUIDefinitions.ACTIVE : SPUIDefinitions.IN_ACTIVE);
|
||||
|
||||
/*
|
||||
* add action Id to the item which will be used for fetching child
|
||||
* items ( previous action status ) during expand
|
||||
*/
|
||||
item.getItemProperty(SPUIDefinitions.ACTION_HIS_TBL_ACTION_ID_HIDDEN)
|
||||
.setValue(actionWithStatusCount.getActionId());
|
||||
.setValue(actionWithStatusCount.getAction().getId());
|
||||
|
||||
/*
|
||||
* add distribution name to the item which will be displayed in the
|
||||
@@ -301,7 +301,7 @@ public class ActionHistoryTable extends TreeTable implements Handler {
|
||||
item.getItemProperty(SPUIDefinitions.ACTION_HIS_TBL_FORCED).setValue(action);
|
||||
|
||||
/* Default no child */
|
||||
((Hierarchical) hierarchicalContainer).setChildrenAllowed(actionWithStatusCount.getActionId(), false);
|
||||
((Hierarchical) hierarchicalContainer).setChildrenAllowed(actionWithStatusCount.getAction().getId(), false);
|
||||
|
||||
item.getItemProperty(SPUIDefinitions.ACTION_HIS_TBL_DATETIME)
|
||||
.setValue(SPDateTimeUtil.getFormattedDate((actionWithStatusCount.getActionLastModifiedAt() != null)
|
||||
@@ -312,7 +312,7 @@ public class ActionHistoryTable extends TreeTable implements Handler {
|
||||
.setValue(actionWithStatusCount.getRolloutName());
|
||||
|
||||
if (actionWithStatusCount.getActionStatusCount() > 0) {
|
||||
((Hierarchical) hierarchicalContainer).setChildrenAllowed(actionWithStatusCount.getActionId(), true);
|
||||
((Hierarchical) hierarchicalContainer).setChildrenAllowed(actionWithStatusCount.getAction().getId(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -422,8 +422,12 @@ public class ActionHistoryTable extends TreeTable implements Handler {
|
||||
.findActionWithDetails(actionId);
|
||||
final Pageable pageReq = new PageRequest(0, 1000,
|
||||
new Sort(Direction.DESC, ActionStatusFields.ID.getFieldName()));
|
||||
final Page<ActionStatus> actionStatusList = deploymentManagement.findActionStatusByAction(pageReq, action,
|
||||
managementUIState.isActionHistoryMaximized());
|
||||
final Page<ActionStatus> actionStatusList;
|
||||
if (managementUIState.isActionHistoryMaximized()) {
|
||||
actionStatusList = deploymentManagement.findActionStatusByActionWithMessages(pageReq, action);
|
||||
} else {
|
||||
actionStatusList = deploymentManagement.findActionStatusByAction(pageReq, action);
|
||||
}
|
||||
final List<ActionStatus> content = actionStatusList.getContent();
|
||||
/*
|
||||
* Since the recent action status and messages are already
|
||||
|
||||
@@ -297,7 +297,7 @@ public class DistributionAddUpdateWindowLayout extends VerticalLayout {
|
||||
if (mandatoryCheck(name, version, distSetTypeName) && duplicateCheck(name, version)) {
|
||||
final String desc = HawkbitCommonUtil.trimAndNullIfEmpty(descTextArea.getValue());
|
||||
final boolean isMigStepReq = reqMigStepCheckbox.getValue();
|
||||
DistributionSet newDist = new DistributionSet();
|
||||
DistributionSet newDist = distributionSetManagement.generateDistributionSet();
|
||||
|
||||
setDistributionValues(newDist, name, version, distSetTypeName, desc, isMigStepReq);
|
||||
newDist = distributionSetManagement.createDistributionSet(newDist);
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.Map;
|
||||
import org.eclipse.hawkbit.repository.DistributionSetFilter;
|
||||
import org.eclipse.hawkbit.repository.DistributionSetFilter.DistributionSetFilterBuilder;
|
||||
import org.eclipse.hawkbit.repository.DistributionSetManagement;
|
||||
import org.eclipse.hawkbit.repository.jpa.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSet;
|
||||
import org.eclipse.hawkbit.ui.common.UserDetailsFormatter;
|
||||
import org.eclipse.hawkbit.ui.components.ProxyDistribution;
|
||||
@@ -111,7 +111,7 @@ public class DistributionBeanQuery extends AbstractBeanQuery<ProxyDistribution>
|
||||
} else if (distributionTags.isEmpty() && Strings.isNullOrEmpty(searchText) && !noTagClicked) {
|
||||
// if no search filters available
|
||||
distBeans = getDistributionSetManagement()
|
||||
.findDistributionSetsAll(new OffsetBasedPageRequest(startIndex, count, sort), false, true);
|
||||
.findDistributionSetsByDeletedAndOrCompleted(new OffsetBasedPageRequest(startIndex, count, sort), false, true);
|
||||
} else {
|
||||
final DistributionSetFilter distributionSetFilter = new DistributionSetFilterBuilder().setIsDeleted(false)
|
||||
.setIsComplete(true).setSearchText(searchText).setSelectDSWithNoTag(noTagClicked)
|
||||
@@ -153,7 +153,7 @@ public class DistributionBeanQuery extends AbstractBeanQuery<ProxyDistribution>
|
||||
} else if (distributionTags.isEmpty() && Strings.isNullOrEmpty(searchText) && !noTagClicked) {
|
||||
// if no search filters available
|
||||
firstPageDistributionSets = getDistributionSetManagement()
|
||||
.findDistributionSetsAll(new PageRequest(0, SPUIDefinitions.PAGE_SIZE, sort), false, true);
|
||||
.findDistributionSetsByDeletedAndOrCompleted(new PageRequest(0, SPUIDefinitions.PAGE_SIZE, sort), false, true);
|
||||
} else {
|
||||
final DistributionSetFilter distributionSetFilter = new DistributionSetFilterBuilder().setIsDeleted(false)
|
||||
.setIsComplete(true).setSearchText(searchText).setSelectDSWithNoTag(noTagClicked)
|
||||
|
||||
@@ -98,14 +98,13 @@ public class CreateUpdateDistributionTagLayoutWindow extends CreateUpdateTagLayo
|
||||
final String tagDescValue = HawkbitCommonUtil.trimAndNullIfEmpty(tagDesc.getValue());
|
||||
|
||||
if (null != tagNameValue) {
|
||||
DistributionSetTag newDistTag = new DistributionSetTag(tagNameValue);
|
||||
if (null != tagDescValue) {
|
||||
newDistTag.setDescription(tagDescValue);
|
||||
}
|
||||
newDistTag.setColour(new Color(0, 146, 58).getCSS());
|
||||
DistributionSetTag newDistTag = tagManagement.generateDistributionSetTag(tagNameValue, tagDescValue,
|
||||
new Color(0, 146, 58).getCSS());
|
||||
|
||||
if (colorPicked != null) {
|
||||
newDistTag.setColour(colorPicked);
|
||||
}
|
||||
|
||||
newDistTag = tagManagement.createDistributionSetTag(newDistTag);
|
||||
uiNotification.displaySuccess(i18n.get("message.save.success", new Object[] { newDistTag.getName() }));
|
||||
resetDistTagValues();
|
||||
|
||||
@@ -12,8 +12,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.hawkbit.repository.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.TagManagement;
|
||||
import org.eclipse.hawkbit.repository.jpa.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSetTag;
|
||||
import org.eclipse.hawkbit.ui.management.tag.ProxyTag;
|
||||
import org.eclipse.hawkbit.ui.management.tag.TagIdName;
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.Map;
|
||||
import org.eclipse.hawkbit.eventbus.event.DistributionSetTagCreatedBulkEvent;
|
||||
import org.eclipse.hawkbit.eventbus.event.DistributionSetTagDeletedEvent;
|
||||
import org.eclipse.hawkbit.eventbus.event.DistributionSetTagUpdateEvent;
|
||||
import org.eclipse.hawkbit.repository.TagManagement;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSetTag;
|
||||
import org.eclipse.hawkbit.ui.common.filterlayout.AbstractFilterButtonClickBehaviour;
|
||||
import org.eclipse.hawkbit.ui.common.filterlayout.AbstractFilterButtons;
|
||||
@@ -51,13 +52,16 @@ public class DistributionTagButtons extends AbstractFilterButtons {
|
||||
@Autowired
|
||||
private DistributionTagDropEvent spDistTagDropEvent;
|
||||
|
||||
@Autowired
|
||||
private TagManagement tagManagement;
|
||||
|
||||
@Autowired
|
||||
private ManagementUIState managementUIState;
|
||||
|
||||
@Override
|
||||
public void init(final AbstractFilterButtonClickBehaviour filterButtonClickBehaviour) {
|
||||
super.init(filterButtonClickBehaviour);
|
||||
addNewTag(new DistributionSetTag("NO TAG"));
|
||||
addNewTag(tagManagement.generateDistributionSetTag("NO TAG"));
|
||||
}
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
@@ -139,7 +143,7 @@ public class DistributionTagButtons extends AbstractFilterButtons {
|
||||
private void refreshTagTable() {
|
||||
((LazyQueryContainer) getContainerDataSource()).refresh();
|
||||
removeGeneratedColumn(FILTER_BUTTON_COLUMN);
|
||||
addNewTag(new DistributionSetTag("NO TAG"));
|
||||
addNewTag(tagManagement.generateDistributionSetTag("NO TAG"));
|
||||
addColumn();
|
||||
}
|
||||
|
||||
|
||||
@@ -380,7 +380,7 @@ public class BulkUploadHandler extends CustomComponent
|
||||
final String newDesc = HawkbitCommonUtil.trimAndNullIfEmpty(descTextArea.getValue());
|
||||
|
||||
/* create new target entity */
|
||||
final Target newTarget = new Target(newControllerId);
|
||||
final Target newTarget = targetManagement.generateTarget(newControllerId);
|
||||
setTargetValues(newTarget, newName, newDesc);
|
||||
targetManagement.createTarget(newTarget);
|
||||
managementUIState.getTargetTableFilters().getBulkUpload().getTargetsCreated().add(newControllerId);
|
||||
|
||||
@@ -245,7 +245,7 @@ public class TargetAddUpdateWindowLayout extends CustomComponent {
|
||||
final String newDesc = HawkbitCommonUtil.trimAndNullIfEmpty(descTextArea.getValue());
|
||||
|
||||
/* create new target entity */
|
||||
Target newTarget = new Target(newControlllerId);
|
||||
Target newTarget = targetManagement.generateTarget(newControlllerId);
|
||||
/* set values to the new target entity */
|
||||
setTargetValues(newTarget, newName, newDesc);
|
||||
/* save new target */
|
||||
|
||||
@@ -13,8 +13,8 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.hawkbit.repository.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.TargetManagement;
|
||||
import org.eclipse.hawkbit.repository.jpa.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSet;
|
||||
import org.eclipse.hawkbit.repository.model.Target;
|
||||
import org.eclipse.hawkbit.repository.model.TargetFilterQuery;
|
||||
|
||||
@@ -21,9 +21,9 @@ import java.util.stream.Collectors;
|
||||
import org.eclipse.hawkbit.eventbus.event.TargetCreatedEvent;
|
||||
import org.eclipse.hawkbit.eventbus.event.TargetDeletedEvent;
|
||||
import org.eclipse.hawkbit.eventbus.event.TargetInfoUpdateEvent;
|
||||
import org.eclipse.hawkbit.repository.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.repository.TargetManagement;
|
||||
import org.eclipse.hawkbit.repository.jpa.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSetIdName;
|
||||
import org.eclipse.hawkbit.repository.model.Target;
|
||||
import org.eclipse.hawkbit.repository.model.TargetFilterQuery;
|
||||
|
||||
@@ -193,7 +193,7 @@ public class CreateUpdateTargetTagLayout extends CreateUpdateTagLayout {
|
||||
final String tagNameValue = HawkbitCommonUtil.trimAndNullIfEmpty(tagName.getValue());
|
||||
final String tagDescValue = HawkbitCommonUtil.trimAndNullIfEmpty(tagDesc.getValue());
|
||||
if (null != tagNameValue) {
|
||||
TargetTag newTargetTag = new TargetTag(tagNameValue);
|
||||
TargetTag newTargetTag = tagManagement.generateTargetTag(tagNameValue);
|
||||
if (null != tagDescValue) {
|
||||
newTargetTag.setDescription(tagDescValue);
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.hawkbit.repository.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.TagManagement;
|
||||
import org.eclipse.hawkbit.repository.jpa.OffsetBasedPageRequest;
|
||||
import org.eclipse.hawkbit.repository.model.TargetTag;
|
||||
import org.eclipse.hawkbit.ui.management.tag.ProxyTag;
|
||||
import org.eclipse.hawkbit.ui.management.tag.TagIdName;
|
||||
|
||||
@@ -16,6 +16,7 @@ import org.eclipse.hawkbit.eventbus.event.TargetTagCreatedBulkEvent;
|
||||
import org.eclipse.hawkbit.eventbus.event.TargetTagDeletedEvent;
|
||||
import org.eclipse.hawkbit.eventbus.event.TargetTagUpdateEvent;
|
||||
import org.eclipse.hawkbit.repository.SpPermissionChecker;
|
||||
import org.eclipse.hawkbit.repository.TagManagement;
|
||||
import org.eclipse.hawkbit.repository.TargetManagement;
|
||||
import org.eclipse.hawkbit.repository.model.TargetIdName;
|
||||
import org.eclipse.hawkbit.repository.model.TargetTag;
|
||||
@@ -75,6 +76,9 @@ public class TargetTagFilterButtons extends AbstractFilterButtons {
|
||||
@Autowired
|
||||
private SpPermissionChecker permChecker;
|
||||
|
||||
@Autowired
|
||||
private TagManagement tagManagement;
|
||||
|
||||
@Autowired
|
||||
private transient TargetManagement targetManagement;
|
||||
|
||||
@@ -90,7 +94,7 @@ public class TargetTagFilterButtons extends AbstractFilterButtons {
|
||||
public void init(final TargetTagFilterButtonClick filterButtonClickBehaviour) {
|
||||
this.filterButtonClickBehaviour = filterButtonClickBehaviour;
|
||||
super.init(filterButtonClickBehaviour);
|
||||
addNewTargetTag(new TargetTag("NO TAG"));
|
||||
addNewTargetTag(tagManagement.generateTargetTag("NO TAG"));
|
||||
}
|
||||
|
||||
@EventBusListenerMethod(scope = EventScope.SESSION)
|
||||
@@ -290,7 +294,7 @@ public class TargetTagFilterButtons extends AbstractFilterButtons {
|
||||
private void refreshContainer() {
|
||||
removeGeneratedColumn(FILTER_BUTTON_COLUMN);
|
||||
((LazyQueryContainer) getContainerDataSource()).refresh();
|
||||
addNewTargetTag(new TargetTag("NO TAG"));
|
||||
addNewTargetTag(tagManagement.generateTargetTag("NO TAG"));
|
||||
addColumn();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,11 +21,12 @@ import org.eclipse.hawkbit.repository.model.DistributionSetIdName;
|
||||
import org.eclipse.hawkbit.repository.model.Rollout;
|
||||
import org.eclipse.hawkbit.repository.model.Rollout.RolloutStatus;
|
||||
import org.eclipse.hawkbit.repository.model.RolloutGroup;
|
||||
import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupConditions;
|
||||
import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupErrorAction;
|
||||
import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupErrorCondition;
|
||||
import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupSuccessAction;
|
||||
import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupSuccessCondition;
|
||||
import org.eclipse.hawkbit.repository.model.RolloutGroupConditionBuilder;
|
||||
import org.eclipse.hawkbit.repository.model.RolloutGroupConditions;
|
||||
import org.eclipse.hawkbit.ui.UiProperties;
|
||||
import org.eclipse.hawkbit.ui.components.SPUIComponentProvider;
|
||||
import org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorder;
|
||||
@@ -478,12 +479,12 @@ public class AddUpdateRolloutWindowLayout extends CustomComponent {
|
||||
}
|
||||
|
||||
private Rollout saveRollout() {
|
||||
Rollout rolloutToCreate = new Rollout();
|
||||
Rollout rolloutToCreate = rolloutManagement.generateRollout();
|
||||
final int amountGroup = Integer.parseInt(noOfGroups.getValue());
|
||||
final String targetFilter = getTargetFilterQuery();
|
||||
final int errorThresoldPercent = getErrorThresoldPercentage(amountGroup);
|
||||
|
||||
final RolloutGroupConditions conditions = new RolloutGroup.RolloutGroupConditionBuilder()
|
||||
final RolloutGroupConditions conditions = new RolloutGroupConditionBuilder()
|
||||
.successAction(RolloutGroupSuccessAction.NEXTGROUP, null)
|
||||
.successCondition(RolloutGroupSuccessCondition.THRESHOLD, triggerThreshold.getValue())
|
||||
.errorCondition(RolloutGroupErrorCondition.THRESHOLD, String.valueOf(errorThresoldPercent))
|
||||
|
||||
@@ -10,7 +10,7 @@ package org.eclipse.hawkbit.ui.rollout.rollout;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.hawkbit.repository.model.Rollout;
|
||||
import org.eclipse.hawkbit.repository.jpa.model.JpaRollout;
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
import org.eclipse.hawkbit.ui.customrenderers.client.renderers.RolloutRendererData;
|
||||
|
||||
@@ -20,7 +20,7 @@ import com.vaadin.server.FontAwesome;
|
||||
* Proxy rollout with custom properties.
|
||||
*
|
||||
*/
|
||||
public class ProxyRollout extends Rollout {
|
||||
public class ProxyRollout extends JpaRollout {
|
||||
|
||||
private static final long serialVersionUID = 4539849939617681918L;
|
||||
|
||||
@@ -59,7 +59,7 @@ public class ProxyRollout extends Rollout {
|
||||
* the isRequiredMigrationStep to set
|
||||
*/
|
||||
|
||||
public void setIsRequiredMigrationStep(Boolean isRequiredMigrationStep) {
|
||||
public void setIsRequiredMigrationStep(final Boolean isRequiredMigrationStep) {
|
||||
this.isRequiredMigrationStep = isRequiredMigrationStep;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ public class ProxyRollout extends Rollout {
|
||||
* the discription to set
|
||||
*/
|
||||
|
||||
public void setDiscription(String discription) {
|
||||
public void setDiscription(final String discription) {
|
||||
this.discription = discription;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ public class ProxyRollout extends Rollout {
|
||||
* the type to set
|
||||
*/
|
||||
|
||||
public void setType(String type) {
|
||||
public void setType(final String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ public class ProxyRollout extends Rollout {
|
||||
* @param swModules
|
||||
* Set<SoftwareModule> to set
|
||||
*/
|
||||
public void setSwModules(Set<SoftwareModule> swModules) {
|
||||
public void setSwModules(final Set<SoftwareModule> swModules) {
|
||||
this.swModules = swModules;
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ public class ProxyRollout extends Rollout {
|
||||
return rolloutRendererData;
|
||||
}
|
||||
|
||||
public void setRolloutRendererData(RolloutRendererData rendererData) {
|
||||
public void setRolloutRendererData(final RolloutRendererData rendererData) {
|
||||
this.rolloutRendererData = rendererData;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,212 +8,212 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.rollout.rolloutgroup;
|
||||
|
||||
import org.eclipse.hawkbit.repository.model.RolloutGroup;
|
||||
import org.eclipse.hawkbit.repository.jpa.model.JpaRolloutGroup;
|
||||
import org.eclipse.hawkbit.ui.customrenderers.client.renderers.RolloutRendererData;
|
||||
|
||||
/**
|
||||
* Proxy rollout group with renderer properties.
|
||||
*
|
||||
*/
|
||||
public class ProxyRolloutGroup extends RolloutGroup {
|
||||
public class ProxyRolloutGroup extends JpaRolloutGroup {
|
||||
|
||||
private static final long serialVersionUID = -2745056813306692356L;
|
||||
private static final long serialVersionUID = -2745056813306692356L;
|
||||
|
||||
private String createdDate;
|
||||
private String createdDate;
|
||||
|
||||
private String modifiedDate;
|
||||
private String modifiedDate;
|
||||
|
||||
private String finishedPercentage;
|
||||
private String finishedPercentage;
|
||||
|
||||
private Long runningTargetsCount;
|
||||
private Long runningTargetsCount;
|
||||
|
||||
private Long scheduledTargetsCount;
|
||||
private Long scheduledTargetsCount;
|
||||
|
||||
private Long cancelledTargetsCount;
|
||||
private Long cancelledTargetsCount;
|
||||
|
||||
private Long errorTargetsCount;
|
||||
private Long errorTargetsCount;
|
||||
|
||||
private Long finishedTargetsCount;
|
||||
private Long finishedTargetsCount;
|
||||
|
||||
private Long notStartedTargetsCount;
|
||||
private Long notStartedTargetsCount;
|
||||
|
||||
private Boolean isActionRecieved = Boolean.FALSE;
|
||||
private Boolean isActionRecieved = Boolean.FALSE;
|
||||
|
||||
private String totalTargetsCount;
|
||||
private String totalTargetsCount;
|
||||
|
||||
private RolloutRendererData rolloutRendererData;
|
||||
private RolloutRendererData rolloutRendererData;
|
||||
|
||||
public RolloutRendererData getRolloutRendererData() {
|
||||
return rolloutRendererData;
|
||||
}
|
||||
public RolloutRendererData getRolloutRendererData() {
|
||||
return rolloutRendererData;
|
||||
}
|
||||
|
||||
public void setRolloutRendererData(RolloutRendererData rendererData) {
|
||||
this.rolloutRendererData = rendererData;
|
||||
}
|
||||
public void setRolloutRendererData(final RolloutRendererData rendererData) {
|
||||
this.rolloutRendererData = rendererData;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the createdDate
|
||||
*/
|
||||
public String getCreatedDate() {
|
||||
return createdDate;
|
||||
}
|
||||
/**
|
||||
* @return the createdDate
|
||||
*/
|
||||
public String getCreatedDate() {
|
||||
return createdDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param createdDate
|
||||
* the createdDate to set
|
||||
*/
|
||||
public void setCreatedDate(final String createdDate) {
|
||||
this.createdDate = createdDate;
|
||||
}
|
||||
/**
|
||||
* @param createdDate
|
||||
* the createdDate to set
|
||||
*/
|
||||
public void setCreatedDate(final String createdDate) {
|
||||
this.createdDate = createdDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the modifiedDate
|
||||
*/
|
||||
public String getModifiedDate() {
|
||||
return modifiedDate;
|
||||
}
|
||||
/**
|
||||
* @return the modifiedDate
|
||||
*/
|
||||
public String getModifiedDate() {
|
||||
return modifiedDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param modifiedDate
|
||||
* the modifiedDate to set
|
||||
*/
|
||||
public void setModifiedDate(final String modifiedDate) {
|
||||
this.modifiedDate = modifiedDate;
|
||||
}
|
||||
/**
|
||||
* @param modifiedDate
|
||||
* the modifiedDate to set
|
||||
*/
|
||||
public void setModifiedDate(final String modifiedDate) {
|
||||
this.modifiedDate = modifiedDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the finishedPercentage
|
||||
*/
|
||||
public String getFinishedPercentage() {
|
||||
return finishedPercentage;
|
||||
}
|
||||
/**
|
||||
* @return the finishedPercentage
|
||||
*/
|
||||
public String getFinishedPercentage() {
|
||||
return finishedPercentage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param finishedPercentage
|
||||
* the finishedPercentage to set
|
||||
*/
|
||||
public void setFinishedPercentage(final String finishedPercentage) {
|
||||
this.finishedPercentage = finishedPercentage;
|
||||
}
|
||||
/**
|
||||
* @param finishedPercentage
|
||||
* the finishedPercentage to set
|
||||
*/
|
||||
public void setFinishedPercentage(final String finishedPercentage) {
|
||||
this.finishedPercentage = finishedPercentage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the runningTargetsCount
|
||||
*/
|
||||
public Long getRunningTargetsCount() {
|
||||
return runningTargetsCount;
|
||||
}
|
||||
/**
|
||||
* @return the runningTargetsCount
|
||||
*/
|
||||
public Long getRunningTargetsCount() {
|
||||
return runningTargetsCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param runningTargetsCount
|
||||
* the runningTargetsCount to set
|
||||
*/
|
||||
public void setRunningTargetsCount(final Long runningTargetsCount) {
|
||||
this.runningTargetsCount = runningTargetsCount;
|
||||
}
|
||||
/**
|
||||
* @param runningTargetsCount
|
||||
* the runningTargetsCount to set
|
||||
*/
|
||||
public void setRunningTargetsCount(final Long runningTargetsCount) {
|
||||
this.runningTargetsCount = runningTargetsCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the scheduledTargetsCount
|
||||
*/
|
||||
public Long getScheduledTargetsCount() {
|
||||
return scheduledTargetsCount;
|
||||
}
|
||||
/**
|
||||
* @return the scheduledTargetsCount
|
||||
*/
|
||||
public Long getScheduledTargetsCount() {
|
||||
return scheduledTargetsCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param scheduledTargetsCount
|
||||
* the scheduledTargetsCount to set
|
||||
*/
|
||||
public void setScheduledTargetsCount(final Long scheduledTargetsCount) {
|
||||
this.scheduledTargetsCount = scheduledTargetsCount;
|
||||
}
|
||||
/**
|
||||
* @param scheduledTargetsCount
|
||||
* the scheduledTargetsCount to set
|
||||
*/
|
||||
public void setScheduledTargetsCount(final Long scheduledTargetsCount) {
|
||||
this.scheduledTargetsCount = scheduledTargetsCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cancelledTargetsCount
|
||||
*/
|
||||
public Long getCancelledTargetsCount() {
|
||||
return cancelledTargetsCount;
|
||||
}
|
||||
/**
|
||||
* @return the cancelledTargetsCount
|
||||
*/
|
||||
public Long getCancelledTargetsCount() {
|
||||
return cancelledTargetsCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cancelledTargetsCount
|
||||
* the cancelledTargetsCount to set
|
||||
*/
|
||||
public void setCancelledTargetsCount(final Long cancelledTargetsCount) {
|
||||
this.cancelledTargetsCount = cancelledTargetsCount;
|
||||
}
|
||||
/**
|
||||
* @param cancelledTargetsCount
|
||||
* the cancelledTargetsCount to set
|
||||
*/
|
||||
public void setCancelledTargetsCount(final Long cancelledTargetsCount) {
|
||||
this.cancelledTargetsCount = cancelledTargetsCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the errorTargetsCount
|
||||
*/
|
||||
public Long getErrorTargetsCount() {
|
||||
return errorTargetsCount;
|
||||
}
|
||||
/**
|
||||
* @return the errorTargetsCount
|
||||
*/
|
||||
public Long getErrorTargetsCount() {
|
||||
return errorTargetsCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param errorTargetsCount
|
||||
* the errorTargetsCount to set
|
||||
*/
|
||||
public void setErrorTargetsCount(final Long errorTargetsCount) {
|
||||
this.errorTargetsCount = errorTargetsCount;
|
||||
}
|
||||
/**
|
||||
* @param errorTargetsCount
|
||||
* the errorTargetsCount to set
|
||||
*/
|
||||
public void setErrorTargetsCount(final Long errorTargetsCount) {
|
||||
this.errorTargetsCount = errorTargetsCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the finishedTargetsCount
|
||||
*/
|
||||
public Long getFinishedTargetsCount() {
|
||||
return finishedTargetsCount;
|
||||
}
|
||||
/**
|
||||
* @return the finishedTargetsCount
|
||||
*/
|
||||
public Long getFinishedTargetsCount() {
|
||||
return finishedTargetsCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param finishedTargetsCount
|
||||
* the finishedTargetsCount to set
|
||||
*/
|
||||
public void setFinishedTargetsCount(final Long finishedTargetsCount) {
|
||||
this.finishedTargetsCount = finishedTargetsCount;
|
||||
}
|
||||
/**
|
||||
* @param finishedTargetsCount
|
||||
* the finishedTargetsCount to set
|
||||
*/
|
||||
public void setFinishedTargetsCount(final Long finishedTargetsCount) {
|
||||
this.finishedTargetsCount = finishedTargetsCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the notStartedTargetsCount
|
||||
*/
|
||||
public Long getNotStartedTargetsCount() {
|
||||
return notStartedTargetsCount;
|
||||
}
|
||||
/**
|
||||
* @return the notStartedTargetsCount
|
||||
*/
|
||||
public Long getNotStartedTargetsCount() {
|
||||
return notStartedTargetsCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param notStartedTargetsCount
|
||||
* the notStartedTargetsCount to set
|
||||
*/
|
||||
public void setNotStartedTargetsCount(final Long notStartedTargetsCount) {
|
||||
this.notStartedTargetsCount = notStartedTargetsCount;
|
||||
}
|
||||
/**
|
||||
* @param notStartedTargetsCount
|
||||
* the notStartedTargetsCount to set
|
||||
*/
|
||||
public void setNotStartedTargetsCount(final Long notStartedTargetsCount) {
|
||||
this.notStartedTargetsCount = notStartedTargetsCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the isActionRecieved
|
||||
*/
|
||||
public Boolean getIsActionRecieved() {
|
||||
return isActionRecieved;
|
||||
}
|
||||
/**
|
||||
* @return the isActionRecieved
|
||||
*/
|
||||
public Boolean getIsActionRecieved() {
|
||||
return isActionRecieved;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param isActionRecieved
|
||||
* the isActionRecieved to set
|
||||
*/
|
||||
public void setIsActionRecieved(final Boolean isActionRecieved) {
|
||||
this.isActionRecieved = isActionRecieved;
|
||||
}
|
||||
/**
|
||||
* @param isActionRecieved
|
||||
* the isActionRecieved to set
|
||||
*/
|
||||
public void setIsActionRecieved(final Boolean isActionRecieved) {
|
||||
this.isActionRecieved = isActionRecieved;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the totalTargetsCount
|
||||
*/
|
||||
public String getTotalTargetsCount() {
|
||||
return totalTargetsCount;
|
||||
}
|
||||
/**
|
||||
* @return the totalTargetsCount
|
||||
*/
|
||||
public String getTotalTargetsCount() {
|
||||
return totalTargetsCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param totalTargetsCount
|
||||
* the totalTargetsCount to set
|
||||
*/
|
||||
public void setTotalTargetsCount(final String totalTargetsCount) {
|
||||
this.totalTargetsCount = totalTargetsCount;
|
||||
}
|
||||
/**
|
||||
* @param totalTargetsCount
|
||||
* the totalTargetsCount to set
|
||||
*/
|
||||
public void setTotalTargetsCount(final String totalTargetsCount) {
|
||||
this.totalTargetsCount = totalTargetsCount;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ import org.eclipse.hawkbit.repository.SoftwareManagement;
|
||||
import org.eclipse.hawkbit.repository.model.AssignmentResult;
|
||||
import org.eclipse.hawkbit.repository.model.DistributionSet;
|
||||
import org.eclipse.hawkbit.repository.model.NamedEntity;
|
||||
import org.eclipse.hawkbit.repository.model.PollStatus;
|
||||
import org.eclipse.hawkbit.repository.model.RolloutGroup;
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModule;
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModuleType;
|
||||
import org.eclipse.hawkbit.repository.model.TargetInfo.PollStatus;
|
||||
import org.eclipse.hawkbit.repository.model.TargetUpdateStatus;
|
||||
import org.eclipse.hawkbit.repository.model.TotalTargetCountStatus;
|
||||
import org.eclipse.hawkbit.repository.model.TotalTargetCountStatus.Status;
|
||||
@@ -781,10 +781,10 @@ public final class HawkbitCommonUtil {
|
||||
* base software module description
|
||||
* @return BaseSoftwareModule new base software module
|
||||
*/
|
||||
public static SoftwareModule addNewBaseSoftware(final String bsname, final String bsversion, final String bsvendor,
|
||||
final SoftwareModuleType bstype, final String description) {
|
||||
public static SoftwareModule addNewBaseSoftware(final SoftwareManagement softwareManagement, final String bsname,
|
||||
final String bsversion, final String bsvendor, final SoftwareModuleType bstype, final String description) {
|
||||
final SoftwareManagement swMgmtService = SpringContextHelper.getBean(SoftwareManagement.class);
|
||||
SoftwareModule newSWModule = new SoftwareModule();
|
||||
SoftwareModule newSWModule = softwareManagement.generateSoftwareModule();
|
||||
newSWModule.setType(bstype);
|
||||
newSWModule.setName(bsname);
|
||||
newSWModule.setVersion(bsversion);
|
||||
|
||||
Reference in New Issue
Block a user