@Override public ResponseEntity<MgmtTag> updateDistributionSetTag( @PathVariable("distributionsetTagId") final Long distributionsetTagId, @RequestBody final MgmtTagRequestBodyPut restDSTagRest) { final DistributionSetTag distributionSetTag = distributionSetTagManagement .update(entityFactory.tag().update(distributionsetTagId).name(restDSTagRest.getName()) .description(restDSTagRest.getDescription()).colour(restDSTagRest.getColour())); final MgmtTag response = MgmtTagMapper.toResponse(distributionSetTag); MgmtTagMapper.addLinks(distributionSetTag, response); return ResponseEntity.ok(response); }
private DistributionSetTag createDistributionSetTag() { final DistributionSetTag updateTag = distributionSetTagManagement .create(entityFactory.tag().create().name("DsTag")); return distributionSetTagManagement.update(entityFactory.tag().update(updateTag.getId()) .description("My name is " + updateTag.getName()).colour("default")); }
private void updateExistingTag(final Tag targetObj) { final TagUpdate update = getEntityFactory().tag().update(targetObj.getId()).name(getTagName().getValue()) .description(getTagDesc().getValue()) .colour(ColorPickerHelper.getColorPickedString(getColorPickerLayout().getSelPreview())); getDistributionSetTagManagement().update(update); getEventBus().publish(this, new DistributionSetTagTableEvent(BaseEntityEventType.UPDATED_ENTITY, (DistributionSetTag) targetObj)); getUiNotification().displaySuccess(getI18n().getMessage("message.update.success", targetObj.getName())); }
private void updateExistingTag(final Tag targetObj) { final TagUpdate update = getEntityFactory().tag().update(targetObj.getId()).name(getTagName().getValue()) .description(getTagDesc().getValue()) .colour(ColorPickerHelper.getColorPickedString(getColorPickerLayout().getSelPreview())); getDistributionSetTagManagement().update(update); getEventBus().publish(this, new DistributionSetTagTableEvent(BaseEntityEventType.UPDATED_ENTITY, (DistributionSetTag) targetObj)); getUiNotification().displaySuccess(getI18n().getMessage("message.update.success", targetObj.getName())); }