public void execute(List<BlueprintDto> result) { if (result.size() > 0) { LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>(); for (BlueprintDto blueprintDto : result) { if (blueprintDto.isActive()) { valueMap.put(blueprintDto.getId(), blueprintDto.getName()); } } blueprints.setValueMap(valueMap); } else { SC.logWarn(MESSAGES.geodeskSettingsWarnNoBlueprints()); } } });
public void execute(List<BlueprintDto> result) { if (result.size() > 0) { LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>(); for (BlueprintDto blueprintDto : result) { if (blueprintDto.isActive()) { // only needed for superadmin as list isn't filtered there valueMap.put(blueprintDto.getId(), blueprintDto.getName()); } } blueprints.setValueMap(valueMap); blueprints.clearValue(); blueprints.setDisabled(false); } else { SC.say(MESSAGES.chooseBlueprinWarnNoBlueprints()); save.setDisabled(true); } } });
private ListGridRecord toGridRecord(BlueprintDto blueprint) { ListGridRecord record = new ListGridRecord(); record.setAttribute(FLD_ID, blueprint.getId()); record.setAttribute(FLD_NAME, blueprint.getName()); record.setAttribute(FLD_LIMIT_TO_TERRITORY, blueprint.isLimitToCreatorTerritory()); record.setAttribute(FLD_PUBLIC, blueprint.isPublic()); record.setAttribute(FLD_ACTIVE, blueprint.isActive()); record.setAttribute(FLD_GEODESKSACTIVE, blueprint.isGeodesksActive()); return record; }
private ListGridRecord toGridRecord(GeodeskDto loket) { ListGridRecord record = new ListGridRecord(); record.setAttribute(FLD_ID, loket.getId()); record.setAttribute(FLD_NAME, loket.getName()); record.setAttribute(FLD_BLUEPRINT, loket.getBlueprint().getName()); record.setAttribute(FLD_AUTHOR, loket.getLastEditBy()); record.setAttribute(FLD_PUBLIC, loket.isPublic()); record.setAttribute(FLD_ACTIVE, loket.isActive() && loket.getBlueprint().isGeodesksActive()); record.setAttribute(FLD_ACTIONS, " "); record.setAttribute(FLD_GEODESKID, loket.getGeodeskId()); record.setAttribute(FLD_OWNER, loket.getOwner() != null ? loket.getOwner().getName() : MESSAGES.geodeskGridColumnOwnerNoOwner()); record.setAttribute(FLD_OBJECT, loket); return record; }
public void setBlueprint(BlueprintDto blueprint) { form.clearValues(); this.blueprint = blueprint; if (blueprint != null) { blueprintName.setValue(blueprint.getName()); clientApplicationName.setValue(blueprint.getUserApplicationKey()); lastEditBy.setValue(blueprint.getLastEditBy()); lastEditDate.setValue(DATE_FORMATTER.format(blueprint.getLastEditDate())); active.setValue(blueprint.isActive()); geodesksActive.setValue(blueprint.isGeodesksActive()); publiek.setValue(blueprint.isPublic()); limitToLoketTerritory.setValue(blueprint.isLimitToCreatorTerritory()); limitToUserTerritory.setValue(blueprint.isLimitToUserTerritory()); limitToLoketTerritory.setDisabled(!blueprint.isPublic()); limitToUserTerritory.setDisabled(blueprint.isPublic()); } fireChangedHandler(); }
bp.setLimitToUserTerritory(dto.isLimitToUserTerritory()); bp.setGeodesksActive(dto.isGeodesksActive()); bp.setName(dto.getName()); bp.setPublic(dto.isPublic()); bp.setApplicationClientWidgetInfos(dto.getApplicationClientWidgetInfos());
bp.setLimitToUserTerritory(dto.isLimitToUserTerritory()); bp.setGeodesksActive(dto.isGeodesksActive()); bp.setName(dto.getName()); bp.setPublic(dto.isPublic()); bp.setApplicationClientWidgetInfos(dto.getApplicationClientWidgetInfos());